Android Question Best way to allow different apps to share settings

Kevin

Well-Known Member
Licensed User
Longtime User
I might try to get away from using DirExternal just to avoid the user needing to approve of it. The thing is, I don't know how else to achieve the same effect.

Basically, I have three apps that are all related to each other and I store a copy of their settings in an external folder just so they can read each other's settings. One example is so that when the user tries the free version of one app then buys the paid version, I wanted the paid version to read the settings without the user having to redo the app's setup. This is one reason why I am considering a paid "unlocker" app, but it still wouldn't solve the problem of the extra related apps not being able to share or see each other's settings.

How else can I achieve this other than using external storage?
 

Kevin

Well-Known Member
Licensed User
Longtime User
This is what I figured, so I'll keep using external storage. When I add the functionality to ask the user to allow the app to access external storage I will mention why they should do so and the consequences of not allowing it.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
When I add the functionality to ask the user to allow the app to access external storage I will mention why they should do so and the consequences of not allowing it.
If you watch the video tutorial you will see that I'm saying that you usually shouldn't call rp.Check. In this case you should use it:
B4X:
Dim rp As RuntimePermissions
If rp.Check(rp.PERMISSION_WRITE_EXTERNAL_STORAGE) = False Then
   MsgboxAsync("Permission is required...", "title")
   Wait For Msgbox_Result (Unused As Int)
End If
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
   Log("You can access external storage")
End If
 
Upvote 0
Top