Pin lock the android devices using scricpt in geo fencing
The script commands
can, in principle, be used. However, as accurate GPS/location information may not be readily available in a timely manner due to received signal strength and other reasons, there can be unexpected locking/unlocking of your devices that annoy your device end-user.
thanks for I try these both commands (lock ,unlock) it is working . but it is locking only screen like power button lock . in this case user can unlock it .
I want to put pattern lock or Pin lock or change the lockdown.
can you please suggest on this ??
Use "resetpassword 12345" where 12345 is the pin code you are wanting to use, then use the lock command to lock the screen.
The effect of "lock" and "unlock" script command always depends on the lockscreen mode selected. Pattern or PIN modes are considered not as safe as password mode. Even though PIN or password can be changed with "resetpassword" script command, I just can't imagine how you can practically use this approach to restore to the original PIN or password set by the device end-user (which an administrator should not know) when his/her device gets back inside the geofence. The problem gets worse if you have hundreds of device to manage, as you don't want all devices to have the same password, and you need one script and one rule to restore the password for each device even if you know the password.
I reckon what you actually want is to have some/all of the apps on your kiosk/application-run-control blacklist/whitelist not accessible when the device exit the geofence(s) set. If so, a simple way to do is to create a child device-group to your current production device-group, and set a geofence alert event rule with action to "relocate" to this child device-group when device exits the geofence, while another geofence alert rule with action to "relocate" child device-group device to the parent device-group when the device enters the geofence. As the child device group inherits all profile/rules/advanced-settings policies from the parent device group by default, you just need to change the kiosk/application-run-control profile payload to select what apps can be accessed when a device is in the child device group.
As said in my first post in this thread, the challenge is how to overcome the GPS/location data availability issue, and tuning of various parameters to prevent undesirable oscillating UI with real-life uncertain location data estimated from GPS/cellular. This approach using "relocate" action adds another level of complexity - the device must be on-line for MobiControl server to initiate the "relocate" action.
thanks team it is working with unlock and resetpassword command combination