Hey guy, Could anybody help me resolved this prob...
# android
t
Hey guy, Could anybody help me resolved this problem.?
😶 2
i
your Parscal size too large.
t
@itnoles I only pass text between two activities . Hmm
k
Something is taking 655KB in there
t
@Kirill Grouchnikov No I don’t have any mistake with it because I checked all of the object before I pass the data , No one in there more than 655KB . Thanks you ❤️ . The parcel in my app limit at 1MB
Screen Shot 2021-03-19 at 11.12.26.png
Hmm . @Kirill Grouchnikov May be I take quite a lot of singleton method to pass data in my app or i save lots of data with shared. Is it is problem?
@Kirill Grouchnikov Could you have the way to resolved it ?
u
Create method in application class and store data in static variable and then access it from any activity
👎 1
b
You can also always just store large text into a file, and pass the file name across.
Or a
ParcelFileDescriptor
of the open file.
t
@Umar Ata I use kotlin for my project . I pass data in a companion object . It like static method in java language. So, It isn’t my mistake . Thank you very muck ❤️
@baxter yeah . I think i need to review my project again . Thanks 🙏
u
@baxter writing data in file is good aproach when we need to store data permanently. Also it needs storage permission and I am not sure the OP app has that
t
@baxter I think
ParcelFileDescriptor
it’s not best practice
b
@Umar Ata you only need permission for writing outside app private space.
u
@baxter please share a working sample that works without storage permission and read/write files
u
I will try this and let you know @baxter If it works so I will share on gist