Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 293
Registered: ‎10-15-2012
My Device: bb10 developer
My Carrier: Orange

app permissions

When enabling a permission (through the Settings -> Security -> Permissions screen) - does an app instantly get granted that permission, or does it need to be restarted?

 

For example, an app starts and access_shared is disabled. The user then enables the permission - can the app then start reading data from the user's shared files directory? At the moment I'm trying to open a sqlite database and its failing - but starts working after the app has restarted.

 

thanks

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: app permissions

I've not seen this documented anywhere and possibly it differs depending on the permission.

 

I think you answered your own question, however...

 

I've just done a quick check on this and it seems, at least for file permission, that the permission is read only on app start. If the permission is on when started , and subsequently turned off, a write is still allowed while the app is running and vice versa.

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 293
Registered: ‎10-15-2012
My Device: bb10 developer
My Carrier: Orange

Re: app permissions

thanks.. 

 

yes I didn't see this documented either. But I just noticed a small bit of sample code in the docs (App Permissions) - that pops up a dialog saying "you have to restart the app after changing permissions". Definitely in the case of file permissions, observed behaviour indicates a restart is required.

 

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: app permissions

I agree, further testing would be needed on the other permissions to make sure.
I will leave a comment on the docs to try and get a clarification.

If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.