My tablets are going to be used in public places and i want to avoid theft without chaining the tablet to the table.
One of ideas i came up with is to lock the tablet when it is out of certain wi-fi range, so tablet comes unusable for thief.
The lock should also apply after reboot.
If possible, then probably this lock wouldn't survive reinstalling, but that's fine.
I know that this idea has flaws, but i just want to know is it even possible?
Perhaps a system service that runs on boot?
Yes, this is possible. Check out this answer for an example of how to set the lock.
What you can do is call that once a wifi goes out of reach, and remove it again once the wifi is near.