Created
July 16, 2024 03:45
-
-
Save devstar0209/0259929deb8a124541097fec3a4cf363 to your computer and use it in GitHub Desktop.
Launch another app from your app app in parallel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent intent = new Intent(Intent.ACTION_VIEW); | |
intent.setData(Uri.parse(uri)); | |
if (packageName != null && !packageName.equals("")) { | |
intent.setPackage(packageName); | |
} | |
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // add this line to lanuch in parallel or comment if launch inside your app. | |
// intent.putExtras(extras); | |
startActivity(intent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment