android Programming Glossary: ondisablerequested
How to unlock screen programmatically? http://stackoverflow.com/questions/14352648/how-to-unlock-screen-programmatically onEnabled Context context Intent intent showToast context Sample Device Admin enabled @Override public CharSequence onDisableRequested Context context Intent intent return This is an optional message to warn the user about disabling. @Override public void..
How to wipe Android device when device admin is deactivated? http://stackoverflow.com/questions/9298364/how-to-wipe-android-device-when-device-admin-is-deactivated the user says yes then another small dialog is presented with the text provided by the application's AdminReceiver in onDisableRequested . If the user then says yes I want to wipe the entire device. How to accomplish this I tried everything searched long for.. disabled when onDisable is called. Thus we have to wipe the device before that time. AdminReceiver has a function onDisableRequested which returns CharSequence. I tried to put another alert box in that function. This crashes because an alert box cannot.. because an alert box cannot be called from a non activity context which seems to be what we have when we are in onDisableRequested . AdminReceiver has a function onReceive which gets called on any events. In this function again we are not in an activity..
|