Is that the same as Device Administrator?You won't be able to do that unless your app has SYSTEM permissions, and even so, a question might pop up asking the user to wipe data yes/no.
If you need to wipe the device you could use the Device Manager.
You could use the Device Administrator Lib, but I believe it will wipe the device if the unlock password has been entered wrong X number of times, a shell command will still need system access.
'wipe data
Dim r As Reflector
r.Target = admin
r.Target = r.GetField("dm")
r.RunMethod2("wipeData", 0, "java.lang.int")
How did you test it? With emulator or a phone?Just if anyone wanted to know, I found the code use it with the Device Admin library:
B4X:'wipe data Dim r As Reflector r.Target = admin r.Target = r.GetField("dm") r.RunMethod2("wipeData", 0, "java.lang.int")