On Thu, Feb 23, 2012 at 2:15 PM, bob <[email protected]> wrote:
> I have this code for playing back a movie:
>
> Movie_Player.play_movie("/mnt/sdcard/movie1.mpg", this);
Never hardwire paths. Use Environment.getExternalStorageDirectory().
> public class Movie_Player {
>
> public static void play_movie(String file_path, Activity a)
> {
> Intent intent = new Intent();
> intent.setAction(android.content.Intent.ACTION_VIEW);
> File file = new File(file_path);
> intent.setDataAndType(Uri.fromFile(file), "video/*");
> a.startActivity(intent);
> }
>
> }
>
> The problem is it pops up a list and makes the user choose the movie-
> player app. Is there an easy
> way I can tell it to use Mobo Video Player
> (com.mobo.video.player.arm5)?
Please allow the user to choose whatever video player they want.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy
Android Training in DC: http://marakana.com/training/android/
--
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