[Free] SharedDB - Store / Retrieve data between applications

SharedDB

Shared db uses Shared Preferences in WORLD_READABLE mode which can make another applications read the data. For example if you store a value in Application1. It can be accessed ( Read only ) by Application which is not possible in normal Preferences.

Notes

  • Do Not use to Store Confidential/Important data in this DB. Other applications can also read the data. ( If you are storing information like this, Please Encrypt your data before Storing and Decrypt it once after Retrieving )

  • Do not use the same the namespace if you are using TinyDB which will interfere with this SharedDB.

Blocks

Events

component_event

This event fires when getting data from other Applications only. Fires if any problem occurs with packagename not found or namespace not found.

Properties

component_set_get

You can change the Namespace as your need. (Ignore the warning)
This property will be used when getting/storing information with the current app

Methods

component_method(4)

You can use this to store value in the Shared Preference Database. Namespace property will be used as namespace.

component_method(5)
You can use this to get value within the current application in the Shared Preference Database. Namespace property will be used as namespace.

component_method(3)

You can use this block to get value from other applications by the parameters.
This block won’t use the namespace property. Fires ErrorOccured if any error occurs.

FAQ ( Read before posting questions ):

Read FAQ

1.Is this SharedDB an online database?
No, It works using the SharedPreferences class like the TinyDB does. Your data is stored on the device and will be cleared once uninstalled or if they clear the application data.

2.What’s the difference between TinyDB and this extension?
This extension uses a different permission mode to store data. It stores using the WORLD_READABLE where TinyDB uses MODE_PRIVATE where the data can be stored/retrieved/modified only by the applicaton. But, in SharedDB, any application ( knowing it’s namespace and tag names ) can read the values.

3.What about the data security?
Yes, other applications can still read the data if they know your namespace and tag ( Only using SharedPreferences ) names. The user cannot access them without root. This happens even with TinyDB too. Root users can do anything in both DB’s which uses the same class. So, It is recommended to Encrypt your data on both DB’s (TinyDB and SharedDB)

Opensource

You can take a look at the code to see how I made this extension or contribute to this in the future.

Downloads

:open_file_folder: Aix: com.jaxparrow.shareddb.aix (5.8 KB)

:open_file_folder: Apk - This doesn’t need any example or hardwork to get it working. This apps are here to test it and showing how it works.

SharedStore : SharedStore.apk (5.4 MB)

SharedGet : SharedGet.apk (6.2 MB)

Credits

Developed using Rush. Thanks to @Shreyash for making extension development even easier.

21 Likes

And this is gonna be SO useful for people, literally. Amazing job :partying_face:!

2 Likes

Thanks for your supportive words

1 Like

Excellent This will worth 100% nice job @Jaxparrow keep :kodular:oding

1 Like

Great contribution. I think. I didn’t understand properly how it works​:upside_down_face:. Can you give me an example what type data should we store in this method

2 Likes

It works same like TinyDB. You can store anything. String, int, boolean, list, dictionary.

I think I am the one who caused this doubt. I named Data instead of Value. Changed them now. Thanks for noticing.

You mean user can access shared prefs of other apps using this extension? :thinking:

1 Like

No. With this, we can create WORLD_READABLE Shared preferences which’ data can be retrieved by other applications. By using this, you can Store/Retrieve value (data) between multiple apps.

1 Like

My only question is how does this work if MODE_WORLD_READABLE was deprecated in API 17?

I tested in Api 23. Deprecated means that it is still available. But, not recommended. Now, you can create a user group and define them in the Manifest. For example, declaring the package names in the both application and making them as a group will make the data readable by only these two applications. But, that’s not possible in kodular and even if it’s possible. We should create an extension for each and every project that we’re creating.

1 Like

I didn’t even know how badly I needed this extension. Thank you very much @Jaxparrow I just wanted to connect my applications on users phone. I’ve been thinking of other ideas but now it’s easy.
I’ll respond more about this extension after I use it.

1 Like

Nice extension man… :+1:

So it will work just like firebase, gsheet… but the matter is we can visit them but in this db we can visit but can get the data.

1 Like

This is not like Firebase or database. This just works like TinyDB. But, the extra thing you get when using this is you can get the value (data) on other applications too…

If you store a variable called Jack assigned to name in application1.

You can get the name value by the packagename > namespace > tag even in Appllication2.

This SharedDB works across applications. So, you can easily store preferences in 1 app and get them in the other one.

1 Like

I got it, here the package name is, In which app you wanna get it that one… very nice. It means data can be shared between yours app only and there is no way for others to steal our informations. Super work man…

And here your misunderstood. Other apps can get if they know which namespace and tags that we are using.

There is one solution for that. We can Encrypt our data on storing and Decrypt on the other app.

Very nice extension, thank you so much for your contribution! :heart: :heart_eyes:
Just one question, does it works without internet? :sweat_smile:

2 Likes

It does. …

1 Like

It works just like TinyDB. It works on local storage. But, with WORLD_READABLE permission which lets other applications to read the DB.

can we use it in two different mobiles?

i mean store data from one mobile and get the same data from another mobile…