I have an activity that allows me to take an image from the camera, and I want to send this image to the parent activity as an add-on. However, if I'm really trying to add an image to an intent, suddenly the finish() call never does anything, and my activity never closes.
Here are some of my codes:
public void onPictureTaken(byte[] imageData, Camera c) { if (imageData != null) {
The odd thing is, if I comment on the call to putExtra() , then everything works correctly (without an image, of course), and my activity closes, and I fall into the parent's onActivityResult() callback. But if I leave the line, then the activity never closes and the callback never fires.
I tried putting more trivial things in add-ons such as strings, and it all worked fine. putExtra() allowed to accept a byte array, and I even tried to wrap it as a bitmap and send it, but it doesn't work either. The only thing I can think of is that I simply should not transfer something big in intention, and in this case, I think, I just try to write it to a file. It's just that writing to a file should be slower than just passing a reference to an array of bytes, so I'm trying to do it this way.
Any ideas? Thanks in advance:)
Phone: Samsung Galaxy S API Level: 7
source share