Android Question KeyValues - Counting total saved keys

rleiman

Well-Known Member
Licensed User
Longtime User
Hi Everyone,

I used KeyValues to store several keys with PutSimple1(). I would like to know how to find out what that total number of stored keys is.

Thanks.
 

sorex

Expert
Licensed User
Longtime User
never used the key stuff myself but you might try this

type you keystorename and the .
and see if there is something like count, lenght, size available.
 
Upvote 0

rleiman

Well-Known Member
Licensed User
Longtime User
KVStore.ListKeys.Size

But I have to check: it returns the number of all keys, which include all types of data, including bitmaps

Thanks everyone for your quick replies.

Hi LucaMs,

Thanks for the coding. It worked perfect for my app.

Here's the coding I used:

B4X:
intTotalPresetsSaved = kvPresetsList.ListKeys.Size
 
Upvote 0
Top