Android - launching an application from an instance of ApplicationInfo

If I have an ApplicationInfo instance of a specific application, how can I make an intention to launch the application?

I tried

Intent intent = new Intent(ApplicationInfoInstance.packageName);

but that gives an exception. The application is installed, so the exception is not related to this.

I think I need to use

setClassName (String packageName, String className);

Can someone direct me to get these two values? Since most of my applications return NULL forApplicationInfoInstance.className;

Thank.

+5
source share
1 answer

If I have an ApplicationInfo instance of a specific application, how can I make an intention to launch the application?

There is no such thing as “launching an application” in Android. An “application” can have zero, one or more actions that are located in the launcher and designed to be launched.

getLaunchIntentForPackage() PackageManager, Intent, ( null, Intent).

+8

All Articles