aaronk Well-Known Member Licensed User Longtime User Feb 17, 2018 #1 Hi, I am trying to get my head around the runtime permissions. Under the IDE log it has 'List permissions'. In the image below is the list of permissions it has listed for my app. Do I need to request each of those permissions, or is there one that I request that might request multiple at the same time? (I understand I only need to request it the once, even knowing it's listed multiple times) I noticed that (I know the Write_external_storage permission could be removed by using GetSafeDirDefaultExternal.) Also what about the last permission. (${applicationId}.permission.C2D_MESSAGE) how do I request that one? How do I request that one, as it looks like it's referencing the application ID ?
Hi, I am trying to get my head around the runtime permissions. Under the IDE log it has 'List permissions'. In the image below is the list of permissions it has listed for my app. Do I need to request each of those permissions, or is there one that I request that might request multiple at the same time? (I understand I only need to request it the once, even knowing it's listed multiple times) I noticed that (I know the Write_external_storage permission could be removed by using GetSafeDirDefaultExternal.) Also what about the last permission. (${applicationId}.permission.C2D_MESSAGE) how do I request that one? How do I request that one, as it looks like it's referencing the application ID ?
DonManfred Expert Licensed User Longtime User Feb 17, 2018 #2 aaronk said: (${applicationId}.permission.C2D_MESSAGE Click to expand... is set in the manifest. It is not a dangerous permission. You need to use runtime permissions lib for all DANGEROUS Permissions. All with a * at the end in the List.... Upvote 0
aaronk said: (${applicationId}.permission.C2D_MESSAGE Click to expand... is set in the manifest. It is not a dangerous permission. You need to use runtime permissions lib for all DANGEROUS Permissions. All with a * at the end in the List....
aaronk Well-Known Member Licensed User Longtime User Feb 17, 2018 #3 DonManfred said: You need to use runtime permissions lib for all DANGEROUS Permissions. All with a * at the end in the List.... Click to expand... Oh. That makes it easy. Thanks for confirming. Upvote 0
DonManfred said: You need to use runtime permissions lib for all DANGEROUS Permissions. All with a * at the end in the List.... Click to expand... Oh. That makes it easy. Thanks for confirming.
Erel B4X founder Staff member Licensed User Longtime User Feb 18, 2018 #4 BTW, you don't really need to handle WRITE_EXTERNAL_STORAGE permission if you follow the runtime permissions tutorial. Upvote 0
BTW, you don't really need to handle WRITE_EXTERNAL_STORAGE permission if you follow the runtime permissions tutorial.
aaronk Well-Known Member Licensed User Longtime User Feb 18, 2018 #5 Erel said: BTW, you don't really need to handle WRITE_EXTERNAL_STORAGE permission if you follow the runtime permissions tutorial. Click to expand... Do you mean: Use RuntimePermissions.GetSafeDirDefaultExternal("") instead of File.DirDefaultExternal. The parameter passed is an optional subfolder that will be created under the default folder. Click to expand... If so, then when I create a SQL database then it's visible to other apps. I was using File.DirInternal and it's not visible to other apps, but requires the WRITE_EXTERNAL_STORAGE permission. Unless there is something I am missing or if there is another way in doing it? Upvote 0
Erel said: BTW, you don't really need to handle WRITE_EXTERNAL_STORAGE permission if you follow the runtime permissions tutorial. Click to expand... Do you mean: Use RuntimePermissions.GetSafeDirDefaultExternal("") instead of File.DirDefaultExternal. The parameter passed is an optional subfolder that will be created under the default folder. Click to expand... If so, then when I create a SQL database then it's visible to other apps. I was using File.DirInternal and it's not visible to other apps, but requires the WRITE_EXTERNAL_STORAGE permission. Unless there is something I am missing or if there is another way in doing it?
Erel B4X founder Staff member Licensed User Longtime User Feb 18, 2018 #6 aaronk said: Unless there is something I am missing Click to expand... File.DirInternal doesn't require any permission. Upvote 0
aaronk said: Unless there is something I am missing Click to expand... File.DirInternal doesn't require any permission.
Erel B4X founder Staff member Licensed User Longtime User Feb 18, 2018 #7 Search your code for File.DirDefaultExternal or File.DirRootExternal. Upvote 0
aaronk Well-Known Member Licensed User Longtime User Feb 18, 2018 #8 I know what I did wrong. I am going to use File.DirInternal in the final release but during development (so I can see the database with an external app) was using File.DirDefaultExternal. Soon as I switched to File.DirInternal it no longer requires this permission. Upvote 0
I know what I did wrong. I am going to use File.DirInternal in the final release but during development (so I can see the database with an external app) was using File.DirDefaultExternal. Soon as I switched to File.DirInternal it no longer requires this permission.