Android - Control of applications the user wants to install
I need a BroadCast receiver or something like that that I can use when the user WANTS to开发者_运维知识库 install an application. That would mean, when the user presses Install - is there something that is broadcasted so that I can catch in my app and forbid the try to install that app?
And if not - is there a mechanism to do this as workaround? I.e. when the application is installed - to be silently uninstalled? I need to have control on which app the user wants to install.
Thanks
That would mean, when the user presses Install - is there something that is broadcasted so that I can catch in my app and forbid the try to install that app?
Fortunately, no.
And if not - is there a mechanism to do this as workaround? I.e. when the application is installed - to be silently uninstalled?
Fortunately, no.
I need to have control on which app the user wants to install.
Fortunately for Android users, you don't have that right.
You are welcome to write your own firmware, put it on your own phones, and distribute those phones.
There are a intent to catch the install and unistall
<receiver android:name=".IntentReceiver">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data android:scheme="package" />
</intent-filter>
</receiver>
The question was answered here Android - How to intercept the 'Install application' intent
精彩评论