Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Serializable RecordMesg

Rank

Total Posts: 23

Joined 2013-02-06

PM

Is it possible to let RecordMesg implement Serializable to allow private file storage in Android? A Json approach seems more complicated.
Tom      
RankRankRank

Total Posts: 91

Joined 2012-10-12

PM

-Is there some reason you can't use the FileOutputStream approach in FileEncoder?      
Rank

Total Posts: 23

Joined 2013-02-06

PM

FileEncoder cannot be appended. It would be programmatically simpler and faster to save ArrayList<RecordMesg> to private storage in Android when one wanted to reopen an Activity.

This is not possible unless RecordMesg Class is defined as Serializable.

I've implemented a work-around by decoding a XML file that is recorded simultaneously. XML parser is faster than JSON parser.