How do I prompt the user for "Device Administrator" on Tasker? I made a Tasker app via the Tasker App Factory that locks the screen based on various occasions. My app works fine except from the initial run which would require the user to enable it as "Device Administrator". How do I prompt the user to do this instead of having to instruct them to go to Settings > Security > Device Administrators? I'm quite positive it has to be done by using Send intent (a Tasker function) but I'm not sure how to go about doing it.

Just to clarify, I want to show the user the dialog box for "Device Administrator" automatically on first open of the app.



Okay so I tried using Intent Intercept but even that, doesn't seem to intercept the Device Administrator prompt. See my video below on how the Device Administrator prompt appears when I select it to be enabled on Secure Settings (a Tasker plugin).

http://www.youtube.com/watch?v=TprkAYoDVDI

As you can see above, Intent Intercept never prompted me and the Device Administrator dialog still popped up.
I'm no expert on intents but this is the best answer I can offer...

There are intents that can enable the Device Admin status but since Tasker is not yet a device admin I don't think your prompt will allow the user to enable this directly.   

The next best thing would be to have Tasker open the Device Administration settings page with a popup that instructs them to enable it.  

In tasker, using the "Settings Dialog Action" you can create an action that opens to the Security Settings page but the user would have to manually go to the next step to open the "Device Administror" menu.  You can create a popup message directing what to do with the "Alert/Popup Action".

If you want to go directly to the Device Administror Menu you may be able to do that with the "Misc/Send Intent Action."  To find specific intent for the Device Admin Menu you can try an app called Inent Interceptor.  If you are able to identify the specific intent that opens that menu it's pretty straight forward from there.