Android Question KVS module to KVS Library[Solved]

Roger Daley

Well-Known Member
Licensed User
Longtime User
Hi All,

More out of curiosity than need for a solution.

I have an app using KVS 1.01 module, I attempted change this to KVS library and failed.

1. Remove KVS module from project
2. Add KVS library [NOT KVS2]
3. Change all KVS.getObject and all KVS.putObject lines to KVS.get and KVS.Put.
4. Compile and run with the resulting error log.

Logger connected to: samsung SM-A705YN
--------- beginning of main
** Activity (main) Create, isFirst = true **
keyvaluestore_get (java line: 86)
java.util.zip.ZipException: unknown compression method
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:183)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
at java.io.DataInputStream.readByte(DataInputStream.java:268)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readByte(B4XSerializator.java:150)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:318)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ReadObject(B4XSerializator.java:129)

5. Restore KVS Module all working.

Something in me says "It ain't broke, don't fix it" but it is a puzzle.
Any ideas? Is there post that I've missed?

Regards Roger
 

Roger Daley

Well-Known Member
Licensed User
Longtime User
You will need to start with a new database (or add code that converts the old database). The old version with PutSimple / GetSimple is not compatible with the later versions.
Thanks Erel, mystery solved.
Unless someone has code to convert dB from V1.01 to dB for KVS library version lying around l will leave it alone. 🙄

Regards Roger
 
Upvote 0
Top