[F/OS] SharedDB - Store / Retrieve data between applications

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…

No, As I said earlier.

Will the namespace and its key-value pairs get cleared after app uninstall?

1 Like

Yes. Like it happens in TinyDB.

1 Like

Hay SharedDB extension Developer. We know That TinyDB and SharedDB stored in in under root permission. I want to backup TinyDB or SharedDB to sd card and get restored as per requirement.

Is any alternative way to do this ? Using SharedDB ?
Is there any way to backup this data using “Titenium Backup” app ??

Is it possible to add (like tinydb)

image

How will App2(GET) know the packagename for App1(SET) without hardcoding…

as it has been said earlier, this mode is deprecated, see also Save key-value data  |  Android Developers

Caution: The MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE modes have been deprecated since API level 17. Starting with Android 7.0 (API level 24), Android throws a SecurityException if you use them. If your app needs to share private files with other apps, it may use a FileProvider with the FLAG_GRANT_READ_URI_PERMISSION . For more information, also see Sharing Files

my guess is, this will not work anymore with the new Android file access restrictions in SDK30?
@Jaxparrow did you test it in MIT App Inventor, which already targets SDK30?

Taifun

1 Like

Correct:
image

1 Like

No, I didn’t test. Sure, I will implement alternate way of doing this and update the extension asap. Thanks for your information.

PS : This extension won’t be getting any update anymore since this workaround isn’t working on new devices. The source is on the first post. Feel free to check out if you want to learn more.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.