B4J Library KeyValueStore class

This is a port of this class: http://www.b4x.com/android/forum/th...ple-and-efficient-key-value-data-store.26317/

Note that you need to add the following attribute to your project:
B4X:
#AdditionalJar: sqlite-jdbc-3.7.2

If you want to use PutEncryptedObject / GetEncryptedObject then you need to download BouncyCastle and add another #AdditionalJar: http://www.b4x.com/android/forum/threads/share-encrypted-data-with-b4a.35482/#content

KeyValueStore v2 is available here: https://www.b4x.com/android/forum/threads/b4x-keyvaluestore-2-simple-powerful-local-datastore.63633/
 

Attachments

  • KeyValueStore.zip
    5.6 KB · Views: 978
Last edited:

Locutus

Member
Licensed User
Longtime User
This is a port of this class: http://www.b4x.com/android/forum/th...ple-and-efficient-key-value-data-store.26317/

If you want to use PutEncryptedObject / GetEncryptedObject then you need to download BouncyCastle and add another #AdditionalJar: http://www.b4x.com/android/forum/threads/share-encrypted-data-with-b4a.35482/#content

Even if you don't want to use encryption you will still need to download the jRandomAccessFile.zip from the above BouncyCastle link and install it over the existing libraries for this class to work. Otherwise it fails on compile.
 

Theera

Well-Known Member
Licensed User
Longtime User
Hi all,
If you want to use PutEncryptedObject / GetEncryptedObject then you need to download BouncyCastle and add another #AdditionalJar: http://www.b4x.com/android/forum/threads/share-encrypted-data-with-b4a.35482/#content

In the post#1 ,I copy bcprov-jdk15on-150.jar into additional library folder and then add #AdditionalJar: bcprov-jdk15on-150 at Project Attributes of the example in the post#1,but I've never seen what is different. Please someone help explain to me clearly. What's something be wrong?
 

bluedude

Well-Known Member
Licensed User
Longtime User
I'm trying to do below with KeyValue store class but it does not work:

Type itemRecord (ID As String, Description As String )

Dim newRecord As itemRecord
Dim recordID As String

newRecord.Initialize
newRecord.ID ="test"
recordID = "record:" & newRecord.ID
newRecord.Description ="This is a test"
kvs.PutObject(recordID,newRecord)

Getting an error it cannot store the object.
 
Top