1

How can I skip the "are you sure" dialog while uninstalling an android app from another app?

Ahmad
  • 69,608
  • 17
  • 111
  • 137
pru
  • 123
  • 1
  • 12
  • Sounds pretty much like something you are not supposed to do. There are means to prevent exactly those things to happen. It's a security feature you shouldn't circumvent. Sounds to me like you are trying to programm something malicious. – André Stannek Sep 20 '12 at 13:22
  • You will need firmware access to do that. – Vipul Sep 20 '12 at 13:25
  • @pru, you are still stuck at same position, what's your actual requirement ? why you want to perform such action ? – Lucifer Sep 20 '12 at 13:29
  • @lucifer I want to force uninstalling of an app from my app – pru Sep 20 '12 at 13:35
  • @pru, but dont you think it's not a valid thing to do, you must require permission, otherwise, anyone can create a virus kind of application that can un-install all the apps from device. – Lucifer Sep 20 '12 at 13:38
  • try this [link](http://paulononaka.wordpress.com/2011/07/02/how-to-install-a-application-in-background-on-android/) i just got it from Rinkal's answer – Lucifer Sep 20 '12 at 13:42
  • @lucifer Suppose I dont want my student to use a specific app and I want to force him not use the app – pru Sep 20 '12 at 13:42

2 Answers2

3

I guess that is not possible due to android security policy. And that policies have reasons to be there.

Otherwise every app would be able to uninstall another one causing troubles to the users if that operation is performed by a rogue app.

mariosangiorgio
  • 5,520
  • 4
  • 32
  • 46
1

You have no control over other apps as far as install/uninstall, basic Android security.

The best you can do is have your app check for the existence of the app you are concerned about your students using and not letting your app run if it is present.

Then it is up to the student. They have the choice to uninstall said app to allow yours to run, or not run your app.

Barak
  • 16,318
  • 9
  • 52
  • 84