Skip to content

Commit 405bcab

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents e0095ee + 1cbf0af commit 405bcab

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- min SDK 16 (Android Jellybean 4.1)
66
- written in Java
77

8-
Simplified SharedPreferences, do it all in 1 line of code. JetDB goes the extra mile by allowing you to save/retreive ArrayLists and Lists of Objects with a simple, single line of code. It's never been easier.
8+
Simplified SharedPreferences, do it all in 1 line of code. JetDB goes the extra mile by allowing you to save/retreive ArrayLists,Lists of Objects and arrays with a simple, single line of code. It's never been simpler and quicker.
99

1010
## Installation
1111

@@ -24,35 +24,43 @@ Add the dependency to your module build.gradle:
2424

2525
```java
2626
dependencies {
27-
implementation 'com.github.Binary-Finery:JetDB:1.0.3'
27+
implementation 'com.github.Binary-Finery:JetDB:1.0.4'
2828
}
2929
```
3030

3131
## Example Usage
3232

3333
save List of custom objects:
3434
```java
35-
JetDB.putListOfObjects(context, listObject, "usersKey");
35+
JetDB.putListOfObjects(context, listObject, "key");
3636
```
3737
get List of custom objects:
3838
```java
39-
List<User> users = JetDB.getListOfObjects(context, User.class, "usersKey");
39+
List<User> users = JetDB.getListOfObjects(context, User.class, "key");
4040
```
4141
save ArrayList:
4242
```java
43-
JetDB.putStringList(context, listObject, "namesKey");
43+
JetDB.putStringList(context, listObject, "key");
4444
```
4545
get ArrayList:
4646
```java
47-
ArrayList<String> names = JetDB.getStringList(context, "namesList");
47+
ArrayList<String> names = JetDB.getStringList(context, "key");
48+
```
49+
save array:
50+
```java
51+
JetDB.putCharArray(context, charArrayObject, "key");
52+
```
53+
get array:
54+
```java
55+
char [] chars = JetDB.getCharArray(context, "key");
4856
```
4957
save single data:
5058
```java
51-
JetDB.putBoolean(context, true, "activeKey");
59+
JetDB.putBoolean(context, true, "key");
5260
```
5361
get single data:
5462
```java
55-
boolean isActive = JetDB.getBoolean(context, "activeKey", defaultValue);
63+
boolean isActive = JetDB.getBoolean(context, "key", defaultValue);
5664
```
5765

5866
Please note: other data types can be used (Integer, Float etc) in addition to the ones in the example usages above

0 commit comments

Comments
 (0)