0

Is there is way to tell to:

Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE ); 

do not create images at all, but return data in [] bytes??

0

1 Answer 1

1

You may want to use startActivityForResult to get the image and the convert it yourself:

Get the image using the method in the accepted answer of this question: Android camera intent

and convert the resulting bitmap to a byte array as in this one: converting Java bitmap to byte array

Sign up to request clarification or add additional context in comments.

5 Comments

ooo, I see... but basically there is not way, as far as I know to force mentioned above Intent do not create image?? The reason I want to eliminate image creation - is that now it creates 2 images: in sdcard/ and sdcard/DCIM/....
honestly, it's not problem for me do delete image under /sdcard/ root, the problem I can't find working example to find dynamic path to gallery(which would work in any android)... and finally: because I'm going to save image to DB - I see it as too expensive operation within program....
@Steve, using those links, you will create the Bitmap object in memory, not a bitmap file. There's nothing to delete!
looks very promising!!!!
+1 for sharing my question =)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.