![]() ![]() In this function, again, we are not in an activity context and cannot present our own dialogs. This crashes because an alert box cannot be called from a non-activity context, which seems to be what we have when we are in onDisableRequested().ĪdminReceiver has a function onReceive(), which gets called on any events. I tried to put another alert box in that function. Thus we have to wipe the device before that time.ĪdminReceiver has a function onDisableRequested(), which returns CharSequence. Official documentation does not say this clearly, but it seems that the admin is already disabled when onDisable() is called. I have also verified that isAdminActive() returns false at that time. Thus the app cannot use the wipeData() function at all (a security exception is thrown). However, it appears that onDisable() is called after the admin has been disabled. I tried to wipe the device in that function. ![]()
0 Comments
Leave a Reply. |