-
Notifications
You must be signed in to change notification settings - Fork 1
Run External App
levching edited this page Apr 15, 2020
·
3 revisions
In order to perform such an action, you need to use a combination of AN_Activity, AN_Intent, and AN_PackageManager classes. See the example below.
using SA.Android.App;
using SA.Android.Content;
using SA.Android.Content.Pm;
...
var pm = AN_MainActivity.Instance.GetPackageManager();
AN_Intent startAppIntent = pm.GetLaunchIntentForPackage("com.facebook.katana");
if(startAppIntent == null) {
AN_Logger.Log("App with Id: com.facebook.katana not found on device");
return;
}
startAppIntent.AddCategory(AN_Intent.CATEGORY_LAUNCHER);
AN_MainActivity.Instance.StartActivity(startAppIntent);
You can learn more about how the Package manager may be used with the PackageManager Guide.
Reliable and high-quality Unity Development service. Let's Talk!
Website | AssetStore | LinkedIn | Youtube | Scripting Reference
- Build Info
- Dark Mode
- Package Info
- Runtime Permissions
- Run External App
- Immersive Mode
- PackageManager
- Popups & Preloaders
- Rate Us Dialog
- Activity
- Intent
- Settings Page
- Media Player
- Date Picker Dialog
- Time Picker Dialog
- Locale
- Wheel Picker Dialog
- Developer Console Setup
- Connecting to The Service
- Purchase Flow
- Transactions Validation
- Subscriptions
- Licensing
- Getting Started
- Games Sing-in
- Server-side API Access
- Leaderboards
- Achievements
- Saved Games
- Image Manager
- Settings Intent