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.
This extension is discontinued and won’t be getting any updates in the future.
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
This event fires when getting data from other Applications only. Fires if any problem occurs with packagename not found or namespace not found.
Properties
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
You can use this to store value in the Shared Preference Database. Namespace property will be used as namespace.
You can use this to get value within the current application in the Shared Preference Database. Namespace property will be used as namespace.
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.
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.
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.
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.
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.
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…