Closed
Description
Register handler method with requestPermission(“the.name”, “callbackName”), with the callback being passed true or false according to the outcome of the permission request operation:
void setup() {
requestPermission("android.permissions.BODY_SENSORS", "initSensors");
}
void initSensors(boolean granted) {
if (granted) {
// init sensors
} else {
// error handling
}
}