I want play audio file, which is on sdcard, with intent String path = Environment.getExternalStorageDirectory().getAbsolutePath (); File audioFile = new File(path, "westron.mp3"); Intent intent = new Intent(Intent.ACTION_VIEW); Uri uri = Uri.fromFile(audioFile); intent.setData(uri);
try{ if (uri != null) { startActivity(intent); } }catch(Exception e){} but it is giving error activity not found exception. it is working for content provider why it is not work for external file --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---