简体   繁体   中英

How to store Non-serializable object to sqlite in android ? or also you can suggest any another way to store nonserializable arralylist objest

I was to store nonserializable object to sqlite in android. but its give me error of object is not Serializable. i just want to know, is that possible or any another way to store this objects ?

Thanks in advance.

Go through below,

class MyArrayList<BlutoothGattService> extends ArrayList<BlutoothGattService> implements Serializable{

}

Then use this class instead of ArrayList and you can easily Serialize object of this class.

I think it will help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM