Android: Open Dialog For Select Audio
I need to allow user to select some audiofile from his media library. Here's what I'm trying to do: Intent tmpIntent = new Intent( Intent.ACTION_PICK,
Solution 1:
Well, I have seen in LogCat what happens when I open music select dialog, and I got what I need. This code works for me:
IntenttmpIntent=newIntent(RingtoneManager.ACTION_RINGTONE_PICKER);
startActivityForResult(tmpIntent, 0);
If I want to get, say, notifications sounds only, then I need to put extra, just like that:
IntenttmpIntent=newIntent(RingtoneManager.ACTION_RINGTONE_PICKER);
tmpIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_NOTIFICATION);
startActivityForResult(tmpIntent, 0);
Post a Comment for "Android: Open Dialog For Select Audio"