hi,
I have a button that when a user clicks it, he should see a list of
audio files, then he can select one, and my app knows what he selects.
the following codes work fine on g1 and mytouch 3g(aka g2), but always
throw a activity not found exception for Intent.ACTION_GET_CONTENT or
Intent.ACTION_PICK:
protected void onClick() {
super.onClick();
Intent intent = null;
intent = new Intent(Intent.ACTION_PICK);
try{
startActivityToPickSong(intent);
}catch(android.content.ActivityNotFoundException e){
intent = new Intent(Intent.ACTION_GET_CONTENT);
startActivityToPickSong(intent);
}
}
private void startActivityToPickSong(Intent intent){
intent.setData(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI);
parent.startActivityForResult(intent,
req_song_pic);
}
what's going on here?
Kai
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en