This object is in archive! 

TransactionTooLargeException

Hubert shared this question 5 years ago
Answered

Hi,


I'm sending points to Locus over the API function

ActionDisplayPoints.INSTANCE.sendPacksSilent(context, data, false);
This is working very fine, until I zoom out. When i send more points at once, i get a exception.

Exception when sending broadcast to ComponentInfo{menion.android.locus.pro/com.asamm.locus.api.android.ApiEventsReceiver} android.os.TransactionTooLargeException: data parcel size 526000 bytes


Do you have an idea how to avoid this exception? How can i determine the size of the transaction?

Can i just split my amount of points and call locus several times?

Replies (2)

photo
1

Good day Hubert,

I'm surprised to see system complain about even 500kb big content, should be close to 1-2Mb.

Anyway please check this: https://github.com/asamm/locus-api/wiki/Display-points-on-a-map#sending-huge-number-of-pointspacks

If you will have smaller data, use the method you use. Anyway for larger content, the above method should help.

Let me know if it works for you.

Menion

photo
1

Hi Menion,

for the moment it was helpful just zu split my point list and call the function twice.

So this topic could be closed.

Thanks for your advice.

Hubert

Replies have been locked on this page!