Zeev Goldstein Well-Known Member Licensed User Longtime User Mar 2, 2021 #1 hi, until sdk 28 i could ask permission to access external memory and once got it i could read / write to external memory now with sdk 29/30 i can't get the permission - the app crashes is there a new way to do so or i'm (as usuall) am making something wrong ? the code did not change - it was working perfectly on 28 thanks
hi, until sdk 28 i could ask permission to access external memory and once got it i could read / write to external memory now with sdk 29/30 i can't get the permission - the app crashes is there a new way to do so or i'm (as usuall) am making something wrong ? the code did not change - it was working perfectly on 28 thanks
Erel B4X founder Staff member Licensed User Longtime User Mar 2, 2021 #2 Carefully read: android.jar / targetSdkVersion / minSdkVersion Upvote 0
Zeev Goldstein Well-Known Member Licensed User Longtime User Mar 2, 2021 #3 thanks. will do... Upvote 0
Zeev Goldstein Well-Known Member Licensed User Longtime User Mar 3, 2021 #4 Erel said: Carefully read: android.jar / targetSdkVersion / minSdkVersion Click to expand... Erel, did read the link you sent me. got more confused and did not see answer to my question i also think it is not really relevant (sorry...) as google demands any new app or update to be of sdk 29 or 30 as i said - on 28 all worked perfectly. so if i go back to 28 - and want to update the app i will get problems from google so i must obey their ruls i need to access external memory to retrieve some data and then i changed the app to store it in internal memory but i need this access to get the stored data how do i get it ? thanks Upvote 0
Erel said: Carefully read: android.jar / targetSdkVersion / minSdkVersion Click to expand... Erel, did read the link you sent me. got more confused and did not see answer to my question i also think it is not really relevant (sorry...) as google demands any new app or update to be of sdk 29 or 30 as i said - on 28 all worked perfectly. so if i go back to 28 - and want to update the app i will get problems from google so i must obey their ruls i need to access external memory to retrieve some data and then i changed the app to store it in internal memory but i need this access to get the stored data how do i get it ? thanks
Erel B4X founder Staff member Licensed User Longtime User Mar 3, 2021 #5 All your questions are answered in that thread: Upvote 0
Zeev Goldstein Well-Known Member Licensed User Longtime User Mar 3, 2021 #6 Erel said: All your questions are answered in that thread: View attachment 108994 Click to expand... Erel, sorry for being a pest... i'm not trying to use these permissions or commands i am trying to get permission For Each permission As String In Array(rp.PERMISSION_READ_PHONE_STATE, rp.PERMISSION_READ_EXTERNAL_STORAGE, rp.PERMISSION_CAMERA) if i omit the external memory read permission - it works when i use it the app crashes what i need is this SaveDir = File.DirDefaultExternal and then to read some data stored there and move it to internal and no more external on 28 all fine 29 or 30 - crash what can i do to overcome this hurdle ? thanks again (and i'm not trying to test your patience ) Upvote 0
Erel said: All your questions are answered in that thread: View attachment 108994 Click to expand... Erel, sorry for being a pest... i'm not trying to use these permissions or commands i am trying to get permission For Each permission As String In Array(rp.PERMISSION_READ_PHONE_STATE, rp.PERMISSION_READ_EXTERNAL_STORAGE, rp.PERMISSION_CAMERA) if i omit the external memory read permission - it works when i use it the app crashes what i need is this SaveDir = File.DirDefaultExternal and then to read some data stored there and move it to internal and no more external on 28 all fine 29 or 30 - crash what can i do to overcome this hurdle ? thanks again (and i'm not trying to test your patience )
Erel B4X founder Staff member Licensed User Longtime User Mar 3, 2021 #7 Accessing FIle.DirDefaultExternal is trivial. Just use RuntimePermissions.GetSafeDirDefaultExternal. No permission needed. Upvote 0
Accessing FIle.DirDefaultExternal is trivial. Just use RuntimePermissions.GetSafeDirDefaultExternal. No permission needed.
Zeev Goldstein Well-Known Member Licensed User Longtime User Mar 3, 2021 #8 do i use this in manifest or code ? Upvote 0
Zeev Goldstein Well-Known Member Licensed User Longtime User Mar 3, 2021 #9 Erel said: Accessing FIle.DirDefaultExternal is trivial. Just use RuntimePermissions.GetSafeDirDefaultExternal. No permission needed. Click to expand... ok, now it doesn't crash i use For Each permission As String In Array(rp.PERMISSION_READ_PHONE_STATE, rp.PERMISSION_CAMERA, rp.GetSafeDirDefaultExternal("")) the app asks for first 2 permissions and not for the 3rd so i don't get the permission i know i'm missing something here... help... Upvote 0
Erel said: Accessing FIle.DirDefaultExternal is trivial. Just use RuntimePermissions.GetSafeDirDefaultExternal. No permission needed. Click to expand... ok, now it doesn't crash i use For Each permission As String In Array(rp.PERMISSION_READ_PHONE_STATE, rp.PERMISSION_CAMERA, rp.GetSafeDirDefaultExternal("")) the app asks for first 2 permissions and not for the 3rd so i don't get the permission i know i'm missing something here... help...
DonManfred Expert Licensed User Longtime User Mar 3, 2021 #10 Zeev Goldstein said: rp.GetSafeDirDefaultExternal("") Click to expand... ... is not a Permission Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Mar 3, 2021 #11 Runtime Permissions (Android 6.0+ Permissions) Upvote 0
Zeev Goldstein Well-Known Member Licensed User Longtime User Mar 3, 2021 #12 DonManfred said: ... is not a Permission Click to expand... thanks so what should i do ? i know i miss something and got lost can anyone bale me out ? Erel said: Runtime Permissions (Android 6.0+ Permissions) Click to expand... OK - got it to work thank you so much for assisting and patience thanks again Upvote 0
DonManfred said: ... is not a Permission Click to expand... thanks so what should i do ? i know i miss something and got lost can anyone bale me out ? Erel said: Runtime Permissions (Android 6.0+ Permissions) Click to expand... OK - got it to work thank you so much for assisting and patience thanks again