4

How to block installation of other application using device administrator app in android. How can we code it to restrict the installation of the application using device administration application?

please help me out.

amity
  • 942
  • 1
  • 8
  • 24
  • 1
    you can check the answers for following questions. http://stackoverflow.com/questions/10900928/uninstall-app-silently-with-system-priveleges http://stackoverflow.com/questions/7470314/receiving-package-install-and-uninstall-events http://stackoverflow.com/questions/5499025/android-notification-app – Aruna Jul 31 '12 at 18:23

2 Answers2

1

As far as I know for android version up to ICS (<= 3.2) Your app (device admin) cannot block installation of another apps. You can only handle the even that new app was installed/uninstalled.

Maxim
  • 4,152
  • 8
  • 50
  • 77
0

I guess you should create a receiver for this action android.app.action.ACTION_INSTALL_PACKAGE check if the package is the one you want to block also follow the instructions from the Android page on How to create Device Admin Applications

SERPRO
  • 10,015
  • 8
  • 46
  • 63
  • Thank you SERPRO.. I will check it and inform to you – amity May 18 '12 at 13:55
  • Hi SERPRO, I have place receiver for this package, its not work for other application installation detection. – amity May 21 '12 at 05:56
  • You should edit your question and add the code you have so far.. Also.. did you set your app as admin? – SERPRO May 21 '12 at 07:41
  • Hi SERPRO, I have place receiver, but I cannot able to set application as a admin, can you please help me for implementation of device admin for my app – amity May 24 '12 at 06:07
  • Like I said in the previous comment.. update your question with your code so far, so more people can help you – SERPRO May 25 '12 at 12:37