[Diagnostic Plugin] How to know the result of the permissions in SwitchToSettings?

Forge Component
(2)
Published on 2017-03-01 by Domingos Gomes
2 votes
Published on 2017-03-01 by Domingos Gomes

Hey, when I call switchToSettings in android:

cordova.plugins.diagnostic.switchToSettings(Success,Fail);


this opens the menu but ends the execution flow. 

I want to open the menu change permissions and then consult the permissions for any changes!

At this moment I cannot consult them because SwitchToSettings breaks the execution flow.

In IOS this works as intended,


Is it a bug in the plugin or am I doing somenthing wrong?

Hi Diogo ,

Plugin is working as per documentation .

Please open link https://github.com/dmlg94/cordova-diagnostic-plugin

and search cordova.plugins.diagnostic.switchToSettings .

Here is the details ,given in documentation 

Opens settings page for this app.

On Android, this opens the "App Info" page in the Settings app.

On iOS, this opens the app settings page in the Settings app. This works only on iOS 8+ - iOS 7 and below will invoke the errorCallback.

Please revert if you have any doubt.