if I do:
Code: Select all
Uri urit = Uri.parse("file:///storage/emulated/0/Music/somemusicfile.mp3");
Intent vlcIntent = new Intent(Intent.ACTION_VIEW);
vlcIntent.setPackage("org.videolan.vlc.debug");
vlcIntent.setDataAndTypeAndNormalize(urit, "audio/*");
vlcIntent.putExtra("from_start", true);
startActivity(vlcIntent);
But if "file:///storage/emulated/0/Music/somemusicfile.mp3" is in an EditText it will play:
Code: Select all
Uri urit = Uri.parse(uritext.getText().toString());
Intent vlcIntent = new Intent(Intent.ACTION_VIEW);
vlcIntent.setPackage("org.videolan.vlc.debug");
vlcIntent.setDataAndTypeAndNormalize(urit, "audio/*");
vlcIntent.putExtra("from_start", true);
startActivity(vlcIntent);