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 stands with Ukraine
  • 25,310
  • 18
  • 114
  • 149
Akshay Katariya
  • 338
  • 2
  • 14

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
  • 650
  • 4
  • 10