lundi 25 mai 2015

Saving audio content Uri in sharedpreference to play later

I am trying to design an alarm app where audio is played when the device is shaken. I am selecting the audio from file system using "ACTION_GET_CONTENT" in intent with ActivityForResult....I am able to fetch the content uri, saving it in sharedpreference and playin it with mediaplayer on a different activity passing the uri in intent. But, once I close my app and reopen it and try to play the audio from the uri in sharedprederence, the audio is not played... What can be done so that I can play audio from saved content uri in sharedpreference?

Aucun commentaire:

Enregistrer un commentaire