I need to make the phone available for all people in a building, for example. If someone were to try to walk outside of the building with the phone, the phone would shut down or a loud alarm would sound. Any thoughts?

Do you mean by accident (forgot that you had the phone in your pocket) or on purpose (theft)? Most answers so far only work for the first case. For the second case you need something that will survive the user doing a factory reset on the phone before walking out. Not aware of anything that can do that.
–
user4188May 11 '11 at 23:49

Yes, on purpose. We are trying to use the android platform for patients to fill out forms in an office, but need to find a way to keep them from leaving the premise.
–
LeighMay 12 '11 at 18:32

In this case I don't think you can do much against a factory-reset and walk-out. Your best bet may be to have the phone have a constant network connection to one of your servers telling the server where it is and the server sounding an alarm if it loses contact or doesn't approve the location. However this does not tell you where the phone is or who has it and it also may cause frequent false alarms if the network drops out for other reasons.
–
user4188May 12 '11 at 23:57

3 Answers
3

Have Tasker send an E-mail when the phone leaves the building. You read the E-mail and mark the phone as "stolen" in Prey. Prey gives you a lot of options about how you want your phone to react to being marked as stolen. You can lock it down and force the GPS to stay active as long as the battery isn't dead, letting you know where the device is.