First the phone has to find out it was stolen. I believe the idea is that, from a website, the person says that the phone was stolen and information is sent to the same.
For App x Server communication (if this is the case), I believe you should find out about webservice.
The App may ask the server once in a while if it is stolen or not, and get a response.
Leaving the app "hidden" is not possible. The "owner" of the phone can see in the tasks that this app exists and is running.
You can call some software that takes photos from inside the "security app", take a photo and take it from the gallery.
Or you can take the photo straight from your app.
One of the answers here should solve part of your doubt:
https://stackoverflow.com/questions/2729267/android-camera-intent
Here’s how to get the image that’s in the gallery, if that’s the case.
http://blog.vogella.com/2011/09/13/android-how-to-get-an-image-via-an-intent/
More useful information.
http://developer.android.com/guide/topics/media/camera.html#capture-picture
This might help: http://stackoverflow.com/questions/21467806/simple-way-to-hide-capturing-camera-on-android
– Piovezan
You can try for a minimum size preview generated by the service. Please note this answer: http://stackoverflow.com/a/10268650
– Guilherme Bernal
hmm wasn’t exactly how I wanted it... I’m trying to find some example to see how it does but I can’t find anything.
– peterq
your app will be an anti-theft app or did you just use it for comparison? "(...)without the user noticing, as in the anti-theft programs(...)" implied that you just used as an example and want to use in a different project
– athosbr99
I want to do an example of anti-theft for a job. I have the api ready and all architecture OK. But I’m not able to develop this feature. I wanted an example of how to take photos without Preview.
– peterq