0

I have array of objects with base64 code strings(images conveted to base64) stored in database, i want to pass array of objects with intent to update activitys UI. What is the best way to do this, maybe there are other ways to handle this? Now it seems that my picture strings are too big and transaction is rejected.

Class:

public class Action extends SugarRecord implements Parcelable{
    String name;//database url https://activities-xxxx.firebaseio.com/
    long date;
    String description;
    String picture;
    int actionId;
...
}
Void
  • 1,129
  • 1
  • 8
  • 21

1 Answers1

0

You might just pass the ID of the object and load it again from your new Activity.

Or maybe

Get the stored path and pass it along.

Victor Hugo Montes
  • 1,270
  • 1
  • 17
  • 28
  • I wanted to place all the databaseWork inside IntentService, so it would just send data as a broadcast =(. But with this 1mb limit on intents it seemd imposible. – Void Oct 19 '16 at 11:29
  • What about get the stored path and send that instead? Pass such amount of data through intent might not be allowed. – Victor Hugo Montes Oct 19 '16 at 11:34
  • 1
    I think i will save it with something like universalImageLoader and then get it from localstorage =/ – Void Oct 19 '16 at 11:39
  • Storing it in local memory or something looks more performatic. Just save the path into your data base. Here's a thread explaining more how to store images in Android. http://stackoverflow.com/questions/17674634/saving-and-reading-bitmaps-images-from-internal-memory-in-android – Victor Hugo Montes Oct 19 '16 at 11:43