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.
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.
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); } Source: https://ru.stackoverflow.com/questions/595330/
All Articles