In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Android installation and uninstall the specific operation of the program, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.
For programming enthusiasts, the Android mobile operating system is a very practical system. They can develop various Android applications to meet their own application needs. Here we will first explain to you the specific steps of installing and uninstalling the Android program.
In the source code of the Android installation uninstaller, we know:
< activity android:name=".PackageInstallerActivity"> < intent-filter> < action android:name="android.intent.action.VIEW" /> < category android:name="android.intent.category.DEFAULT" /> < data android:scheme="content" /> < data android:scheme="file" /> < data android:mimeType="application/vnd.android.package-archive" /> < /intent-filter> < /activity> < activity android:name=".UninstallerActivity"> < intent-filter> < action android:name="android.intent.action.VIEW" /> < action android:name="android.intent.action.DELETE" /> < category android:name="android.intent.category.DEFAULT" /> < data android:scheme="package" /> < /intent-filter> < /activity>Because according to the permissions inside, we can install a program from the SD card:
String fileName = Environment.getExternalStorageDirectory ()
+ "/ myApp.apk"
Intent intent = new Intent (Intent.ACTION_VIEW)
Intent.setDataAndType (Uri.fromFile (new File (fileName)
"application/vnd.android.package-archive")
StartActivity (intent)
To uninstall a program during the Android installation and uninstaller operation
Uri packageURI = Uri.parse ("package:com.android.myapp")
Intent uninstallIntent = new Intent
(Intent.ACTION_DELETE, packageURI)
StartActivity (uninstallIntent)
Installation of non-market programs is not supported by default, so judge
Int result = Settings.Secure.getInt (getContentResolver ()
Settings.Secure.INSTALL_NON_MARKET_APPS, 0)
If (result = = 0) {
/ / show some dialog here
/ /...
/ / and may be show application settings dialog manually
Intent intent = new Intent ()
Intent.setAction (Settings.ACTION_APPLICATION_SETTINGS)
StartActivity (intent)
}
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.