On Thu, Mar 7, 2013 at 12:48 PM, JavaSrvcs <jvsr...@gmail.com> wrote: > I want to write an app that will do the following when run: > > remove a device administrator (manually on the device can go to > Settings->Security->Device Administrators) and uncheck
This is not possible via the SDK. The user is welcome to uncheck that checkbox manually. > Applications->clear cache There's a hook for that somewhere, though I forget where off the top of my head. > drop/clear all application data This is not possible via the SDK. Moreover, it is not necessary if you are going to remove the application. > force stop the application This is not possible via the SDK. Moreover, it is not necessary if you are going to remove the application. > then remove the application You can begin an uninstall from the SDK via startActivity() and an appropriate UNINSTALL Intent, but the user has to be involved in the process. > I then want to download and re-install the application (from Google Play or > a direct url to a .apk that I have). You can download and begin an install from the SDK via startActivity() and an Intent with the proper Uri (and MIME type for a local APK file), but the user has to be involved in the process. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.6 Available! -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.