Skip to content

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