2

I know I can open Activity with Intent but I am trying to open particular Activity from my application.

Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.3rdPartyApplcation");
if (launchIntent != null) 
{
     startActivity(launchIntent);
}

Example:- My application is A I have to open Settings page of Application B which is 3rd party application, I also know the activity name.

How to open this settings page via intent

Zoe
  • 27,060
  • 21
  • 118
  • 148
Akshay Katariya
  • 338
  • 4
  • 16

1 Answers1

1

First you need to find out the package name of the app u want to launch using intent along with the activity name which u want to launch directly from your app.

 Intent intent=new Intent();
 intent.setComponent(new ComponentName("com.3rdPartyApplcation.packagename", "com.3rdPartyApplcation.packagename.SettingsActivity"));
 startActivity(intent);
Akshay Chopde
  • 670
  • 4
  • 10