1

i currently have a class that uses bitmap. however it is not serializable due to bitmap. Right now i am wondering which are the best ways to deal with it.

Should i be storing it on the cache or sdcard? How ong does bitmap saved in cache or sdcard stays? is there any tutorial for doing those

ericlee
  • 2,703
  • 11
  • 43
  • 68

1 Answers1

3

You can pass bitmap object from one activity to another.Take a look at the following:

Bitmap implements Parcelable, so you could always pass it in the intent:

Intent intent = new Intent(this, NewActivity.class);
intent.putExtra("BitmapImage", bitmap);

and retrieve it on the other end:

Bitmap bitmap = (Bitmap) intent.getParcelableExtra("BitmapImage");
dark_shadow
  • 3,503
  • 11
  • 56
  • 81