I have an app that has some sounds, stored into raw folder of my project. For now it's only possible to reproduce it inside my app (by use MediaPlayer object). Now i would know if is possible to take this files, and share it via intent (for example by using whatsapp intent)
Asked
Active
Viewed 423 times
0
-
check this to write a raw file to other directories. http://stackoverflow.com/a/8664527/603744 – Andro Selva Jan 22 '15 at 20:41
1 Answers
0
You can copy the file to internal storage and use FileProvider to publish a Uri to the file that you can use with the ACTION_SEND Intent.
Or, you can try my StreamProvider to skip the copy-the-file part and publish a Uri straight from the raw resource.
Or, you can try using an android.resource Uri, but few apps support it for things like ACTION_SEND. Using either of the previous two approaches will give you better compatibility.
CommonsWare
- 986,068
- 189
- 2,389
- 2,491