Thanks for the assistance martin, you helped me clean things up a little bit. As for the sound, i just used audacity and looped it to a 3 minute sound. If i can't find my tablet in 3 minutes, i'll try again.
for anyone curious, how i'm getting the "findnexus" command is with one of the several free texting programs. As long as i have data of some kind, and it has notifications for new messages, i'm golden.
Part of my reasoning for this is the new google toy on their site didn't work so well for me. For one, as a tablet, there is no "ring", so i couldn't make it ring, and the location reporting took a bit to get going.
I've managed to cobble together this. : (image)
What i think this is doing is playing the sound, then activating GPS with a 30 second timeout. If it times out, it triggers exception (is the location empty? if true, switch to passive location if false, email location!). If it doesn't time out, it goes and emails the location. Each method after it does the same, tries to find location, if it times out it moves on, checking if it got location data first. If it did, it switches over to email, if not, we continue on. Looping back to GPS once all three have been tried.
If anyone knows a way to clean this up more, let me know.
I'd like to possibly make it so turning off the sound INITIATES the gps sweep, or.. if it asks for a password and doesn't get it, it initiates the sweep.. or even after 60 seconds, it locks down the tablet with a passcode (is it possible to set security to passcode, and SET the passcode, via automagic? ) so that basically if someone ELSE picks up my tablet, or even takes it, i can lock them out, and have it's location sent to me so i can handle them myself.
Yeah, i'm going kinda over the top with security, i know. However, i paid $300 usd for this thing and i enjoy having it. I don't want anyone else to have any option of keeping it, even if it means i break down their door myself.