I would like to launch some external programs by creating an intent.
Example: opening the Android Music Album manager "Music"
Dim Intent1 As Intent
Intent1.Initialize(Intent1.ACTION_MAIN, "")
Intent1.SetComponent("com.android.music/.MusicBrowserActivity")
StartActivity(Intent1)
Now this works fine as long as this application package is really installed on the phone/tablet. But on some devices it's not, replaced by something else or possibly removed by the end user => nasty error message for the end user:sign0085:
1. Does anybody have a code sample how to verify the existence of the component (here: com.android.music) and of the activity to launch (here: MusicBrowserActivity) BEFORE actually starting the activity.
2. It seems you can (sometimes?) simply use a generalized descriptor for a certain package/component rather than the exact package name. Example for opening 'GoggleMaps':
SIMPLY
Intent1.SetComponent("googlemaps")
INSTEAD OF LENGTHY (AND POSSIBLY WRONG)
Intent1.SetComponent("com.google.android.apps.m4ps/com.google.android.maps.MapsActivity")
=> where can I find a list of this simplified descriptors such as "googlemaps"
=> is it possible to verify the existence of targeted component ?
3. Similar to (2): is there a list of all the MIME types?
Thanks for your help!
Example: opening the Android Music Album manager "Music"
Dim Intent1 As Intent
Intent1.Initialize(Intent1.ACTION_MAIN, "")
Intent1.SetComponent("com.android.music/.MusicBrowserActivity")
StartActivity(Intent1)
Now this works fine as long as this application package is really installed on the phone/tablet. But on some devices it's not, replaced by something else or possibly removed by the end user => nasty error message for the end user:sign0085:
1. Does anybody have a code sample how to verify the existence of the component (here: com.android.music) and of the activity to launch (here: MusicBrowserActivity) BEFORE actually starting the activity.
2. It seems you can (sometimes?) simply use a generalized descriptor for a certain package/component rather than the exact package name. Example for opening 'GoggleMaps':
SIMPLY
Intent1.SetComponent("googlemaps")
INSTEAD OF LENGTHY (AND POSSIBLY WRONG)
Intent1.SetComponent("com.google.android.apps.m4ps/com.google.android.maps.MapsActivity")
=> where can I find a list of this simplified descriptors such as "googlemaps"
=> is it possible to verify the existence of targeted component ?
3. Similar to (2): is there a list of all the MIME types?
Thanks for your help!