I want to pass an audio file from the mobile app to the wear app. From android developer guidelines I know it can be done through assests. But I need a sample code on how the file with .amr extension could be added in the asset and passed.
Asked
Active
Viewed 83 times
0
-
Have you looked at the official docs, like http://developer.android.com/training/wearables/data-layer/assets.html? There is enough material to get you going. – Ali Naddaf Jan 22 '16 at 16:12
-
I looked into that link already, it has an example for passing image only through asset. – Android_dev_new Jan 22 '16 at 16:52
-
1That page shows how to build an asset by calling Asset.createFromBytes(byte[]), so it doesn't care if it is an image or something else; you need to learn how to do I/O in java to read a file into bytes; you can't expect to find an example that exactly uses an *.amr file! – Ali Naddaf Jan 22 '16 at 17:03