The example in this article describes how Android simply determines whether a APK has been installed. Share to everyone for your reference, specific as follows:
Privateboolean isappinstalled (String uri) {
Packagemanager pm = Getpackagemanager ();
Boolean installed =false;
try{
Pm.getpackageinfo (uri,packagemanager.get_activities);
Installed =true;
} catch (Packagemanager.namenotfoundexception e) {
installed =false;
}
return installed;
}
Just use this method to check the name of the application package you need to determine:
if (isappinstalled ("Com.yourpackage.package")) {
//app installed
}
else{
//app not installed
}
For more information on Android-related content readers can view the site: "Android View tips Summary", "Android Programming activity Operating Skills Summary", "Android operation SQLite Database Skills Summary", " Android operation JSON format data tips summary, "Android Database Operation skills Summary", "Android File Operation skills Summary", "Android programming development of SD card Operation Summary", "Android Development introduction and Advanced Course", " Android Resource Operation tips Summary and the "Android Controls usage Summary"
I hope this article will help you with the Android program.