I would have a question to ask you about a problem I am having regarding the passage of a Bitmap image from an activity secondary to the main Activity. In the secondary activity I have a videoView, I have set up a button that, when pressed, extracts a frame from the videoView. The code I used to extract the frame in bitmap format is as follows:
videoField.setDrawingCacheEnabled(true);
videoField.buildDrawingCache();
Bitmap bm = videoField.getDrawingCache();
System.out.println(bm);
Intent intent = new Intent(this, MainActivity.class);
intent.putExtra("BitmapImage", bm);
startActivity(intent);
After doing this in the onCreate () of the main Activity, get the bitmap image as follows:
Intent intent = getIntent();
Bitmap bitmap = (Bitmap) intent.getParcelableExtra("BitmapImage");
The problem is that when I get the bitmap image, the variable is always null, and i cant't set it on imageView. I can't understand the reason because if I print the value of the bitmap image in the secondary class it is present. Can anybody help me.
Thanks in advance