As Mark suggests it's always good to leave the user a choice.

However if you really want to start that player you can add to the intent
its package name, so that the filtering is limited to that package.

intent.setPackage("com.mobo...");


Hope it helps,
Yuvi

DroidAhead
http://www.droidahead.com

On Thu, Feb 23, 2012 at 8:27 PM, Mark Murphy <mmur...@commonsware.com>wrote:

> On Thu, Feb 23, 2012 at 2:15 PM, bob <b...@coolfone.comze.com> 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 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
>



-- 
YuviDroid
Check out Launch-X <http://android.yuvalsharon.net/launchx.php> (a widget
to quickly access your favorite apps and contacts!)
http://android.yuvalsharon.net

-- 
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

Reply via email to