-9

I would like to make android button and able to launch other application if already installed and go to S specified url if not yet installed.

Harshad Pansuriya
  • 20,189
  • 8
  • 67
  • 95
test
  • 70
  • 6

3 Answers3

1
<a href="intent:#Intent;action=your.example.namespace.CUSTOMACTION;package=your.example.namespace;component=your.example.namespace/.activity.YourActivity;S.extraValueName=WOW;end">
Launch App

PHP_RIDER
  • 355
  • 1
  • 12
0
Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.package.name");
startActivity(launchIntent);

OR

Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setComponent(new ComponentName("com.package.name","com.package.name.MainActivity"));
startActivity(intent);
Rahul
  • 1,380
  • 1
  • 10
  • 24
0

You can call specific application if you know the package name.

How do I programmatically launch a specific application in Android?

Community
  • 1
  • 1
Anuj Sharma
  • 4,294
  • 2
  • 37
  • 53