Tell me how in android to implement the transition from one application to another by pressing the appropriate button?

To be more precise, I need to switch to Skype from my application when I click on the "Skype" button.

    1 answer 1

    If Skype is installed, it will start, otherwise the Skype page in the market will open:

    Intent intent = getActivity().getPackageManager().getLaunchIntentForPackage("com.skype.raider"); if (intent != null) { // start the activity intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); } else { // bring user to the market // or let them choose an app? intent = new Intent(Intent.ACTION_VIEW); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setData(Uri.parse("market://details?id="+"com.skype.raider")); startActivity(intent); } 
    • Thank you very much! Tell me where else to get this address (com.skype.raider) for other applications? For example, for viber, whatsapp, etc. - Artem Novikov
    • You can google (intent for launch viber / whatsap / *** android) and in the first 3 links will be the answer. - Nikotin N
    • Or you find an application in the market, for example, Viber. his link is play.google.com/store/apps/details?id=com.viber.voip . at the end of the link we see its ID. - Nikotin N