Directly on the code:
//get the app to jump through the package name, create the intent objectIntent Intent = Getpackagemanager (). Getlaunchintentforpackage ("Cn.easier.intelligencesystem"); //If intent is empty here, say the name does not install the application to jump if(Intent! =NULL) { //Here's the same thing as the activity pass parameter, don't worry about how to pass the parameters, and the receiving parameters are the same as the activity and activity parameters.startactivity (Intent); } Else { //do not install app to jump, remindToast.maketext (Getapplicationcontext (), "Yo, download and install the app now!", Toast.length_long). Show (); }
If you are going to pass a parameter, you can pass it as normal intent, and the activity of the target receives the parameter as well.
In front of this is the activity that jumps directly to the other app's main.
Other than that. You can do this if you want to jump to the specified activity.
New ComponentName ("PackageName", "ClassName"); Intent.setcomponent (CN);
Yes, so you can jump directly to the specified activity.
Android-launch another app