Skip to content Skip to sidebar Skip to footer

How To Launch The Third-party Android Applications I Installed Through Intent Directly?

we can launch android market application from: Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData('market://details?id=packgename'); startActivity(intent); My questi

Solution 1:

In order to do that, you need to find the following info for the application you want to start:

  • Package
  • Startup Class

You can obtain this info if you start third-party app regularly, and in the LogCat inspect the trace.

Then, you just fill in following intent with the info you obtained:

IntentstartupIntent=newIntent();
    ComponentNamedistantActivity=newComponentName("com.third.exampleapp", "com.third.exampleapp.StartupClass");
    startupIntent.setComponent(distantActivity);
    startupIntent.setAction(Intent.ACTION_MAIN);
    startActivity(startupIntent);    

Please note that it is very bad practice to start standard Android system Intents this way.

Post a Comment for "How To Launch The Third-party Android Applications I Installed Through Intent Directly?"