Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add $util.getPermissions to action type #247

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

Akir4d
Copy link

@Akir4d Akir4d commented Sep 22, 2018

Added new action for android-jasonette to get permissions on android 6+,
it returns "success" if android task of permissions is done, "error" if those permissions are already granted. As options you have to put permissions comma separated you need to granted, as example "permissions": "CAMERA,ACCESS_FINE_LOCATION".

Full code example:

"$load":{
"type": "$util.getPermissions",
"options": {
"permissions": "CAMERA,ACCESS_FINE_LOCATION"
},
"error": {
"trigger": "start"
},
"success": {
"type": "$util.alert",
"options": {
"title": "Read before continue",
"description": "Press "OK" to continue.\n- Press "CANCEL" to exit."
},
"success": {
"type": "$flush",
"success": {
"type": "$reload"
}
},
"error": {
"type": "$close"
}
}
}

Paolo Rampino added 3 commits September 22, 2018 17:09
Added new action for android-jasonette to get permissions on android 6+,
it returns "success" if android task of permissions is done, "error" if those permissions are already granted. As options you have to put permissions comma separated you need to granted, as example "permissions": "CAMERA,ACCESS_FINE_LOCATION".

Full code example:

"$load":{
          "type": "$util.getPermissions",
          "options": {
            "permissions": "CAMERA,ACCESS_FINE_LOCATION"
          },
          "error": {
            "trigger": "start"
          },
          "success": {
            "type": "$util.alert",
            "options": {
              "title": "Read before continue",
              "description": "Press \"OK\" to continue.\n- Press \"CANCEL\" to exit."
            },
            "success": {
              "type": "$flush",
              "success": {
                "type": "$reload"
              }
            },
            "error": {
              "type": "$close"
            }
          }
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant