Android Question where to CheckAndRequest

catster

Member
Licensed User
Longtime User
What is the best place to call CheckAndRequest if I need PERMISSION_WRITE_EXTERNAL_STORAGE as early as possible?

I known I cannot call checkandrequest in starter service. But seems android can start with any activity.

I have a database wrapper service receive request and write to database. What is the best practice to get folder permission for this service? I do not prefer RuntimePermissions.GetSafeDirDefaultExternal because the database file is shared across applications.
 
Last edited:
I known I cannot call checkandrequest in starter service. But seems android can start with any activity.
Best not to use starter service or activities.

Put it in B4XMainPage with B4XPages.

And remember that if it is a Google Play app then the external storage permission is irrelevant.
 
Upvote 0
Thanks Erel. What is the proper way of sharing a file across two apps without PERMISSION_WRITE_EXTERNAL_STORAGE ? seems GetSafeDirDefaultExternal cannot be shared across two apps.
 
Upvote 0
 
Upvote 0

Similar Threads

Back
Top