My wife's company want to loan android tablets (Nexus 7's with 5.0 in the pilot) to clients for the duration of a consultation. Restricted profiles in lollypop make this more achievable. Question : is there a way when the client has finished to wipe his/her data automatically? Obviously an app would be ideal but writing something might work. The use cases are basically privacy (obviously) but also ensuring that users don't leave anything inappropriate for the next user.
I currently write java apps on unix but am a novice with android. Is it possible for instance to write something that listens for a profile change event? A restricted user "template" with allowed apps prepopulated so the user profile could be quickly deleted and recreated?