user7867367
user7867367

Reputation:

How to customize ACTION_IMAGE_CAPTURE?

Is it possible to use ACTION_IMAGE_CAPTURE and customize some parts of the code? If yes, how?

I would like to add some Toast in the code. I know that there is the method onActivityResult to add some actions at the moment of the end of the activity.

But I would like to add some actions (ig. Toast) in other moments: for example when the user taps the screen to take the picture but before saving the picture.

Upvotes: 0

Views: 57

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007544

Write your own camera app, where you provide an activity that implements ACTION_IMAGE_CAPTURE. Then, you can do whatever you want within that activity.

If, instead, you are asking how you can modify the code of hundreds of other camera apps that supply the world's ACTION_IMAGE_CAPTURE implementations, that is not possible.

Also, note that there is no requirement that the user tap the screen to take a picture using a camera app. They might set up a timer in the app, with the picture being taken after the timer elapses. Or, they might press a hardware CAMERA button, or press something on a Bluetooth remote, etc.

Upvotes: 0

Related Questions