Abhi wrote:
> Thanks Mark.
>
> Can you give an example for launching the Youtube app from within my
> app? I have tried startActivity() to open up Gallery this way:
>
> Intent intent2 = new Intent();
> intent2.setClassName("com.android.camera",
> "com.android.camera.GalleryPicker");
> intent2.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
> startActivity(intent2)
>
> Couldn't understand how to do it with other apps.
You will need to use methods on PackageManager to determine an
appropriate activity to use for that package.
getLaunchIntentForPackage() is probably worth trying.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy
Android 1.5 Programming Books: http://commonsware.com/books.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---