Skip to content Skip to sidebar Skip to footer

How To Create An Auto-upload Android Picture App?

I am trying to create an app that automatically uploads a picture to my server. The idea is that a user creates a picture with the native/normal camera and my app gets a notificati

Solution 1:

Right now i don't believe there is a Broadcast that is fired for a camera capture event that other activities can listen to.

But here's what you can do. Declare an intent filter for "android.intent.action.CAMERA_BUTTON" and provide it the highest priority - 999

This will give you a handle on the broadcast fired by the native camera. However this would steal the broadcast from the native app. So you might have to handle saving the file yourself, or formulate a hack to give back control to the native app.

Don't know if there is a better way. Also can't say much about the use-case of third-party cameras.

EDIT:

On further inspection, there is a better way. Listening to android.media.action.IMAGE_CAPTURE would yield better results and should fit right into your requirements.


Post a Comment for "How To Create An Auto-upload Android Picture App?"