How to take photo via services on android?

Asked

Viewed 449 times

0

I need to develop an app to take photos without the user noticing, as in the anti-theft programs that exist today.

I need the phone to open the camera app and take a picture when the phone or phone receives an alert that was stolen.

How can I delve into this research and get a solution?

  • This might help: http://stackoverflow.com/questions/21467806/simple-way-to-hide-capturing-camera-on-android

  • You can try for a minimum size preview generated by the service. Please note this answer: http://stackoverflow.com/a/10268650

  • 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.

  • 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

  • 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.

1 answer

1

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

  • Yes... but I have the whole structure and I have the api ready for the Anti-theft App.The only function I’m really struggling with is the camera. I got a few times but the quality of the front camera got dark and in some devices the app gives error. What I want is to take picture without the camera preview.

  • @Arilsoncarmo, you can simply reduce the area of preview to the minimum possible (1px x x 1px) and 'hide' in some corner of the interface.

  • Is there any example?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.