Android Question Android Manifest & Runtime Permissions

RichardN

Well-Known Member
Licensed User
Longtime User
Having watched the tutorial several times, could someone please clarify for me....

1. Do ALL 'dangerous permissions' (where required) need to be added to the manifest file or is it only:
android.permission.WRITE_EXTERNAL_STORAGE ?

2. Erel's suggestion that CheckAndRequest(Rp.XXXXX_XXXXX) is handled in the Activity_Resume event appears not to work in the case of Google Maps where the DP is invoked when the layout containing the MapFragment in it is loaded. You are forced to handle it right at the beginning of Activity_Create instead?

3. The following DP's...

android.permission.ACCESS_COARSE_LOCATION and,
android.permission.ACCESS_FINE_LOCATION

...are needed when adding Google maps. Is it correct to assume that BOTH be satisfied by merely executing CheckAndRequest for ACCESS_FINE_LOCATION ?

Thanks.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Do ALL 'dangerous permissions' (where required) need to be added to the manifest file or is it only:
android.permission.WRITE_EXTERNAL_STORAGE ?
1. You don't need to add any dangerous permission to the manifest editor. They will be added automatically.

There is a special case with WRITE_EXTERNAL_STORAGE where you need to add it for old devices when you don't really need the external permission as you are using GetSafeDirDefaultExternal.

2. You need to request the permission before you use it. The best way to handle it with Google Maps is to make sure that the "my location" property is disabled in the designer, request the permission in the Ready event and enable the location if the user allowed it.

3. Yes.
 
Upvote 0
Top