We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
check soft request status.
// Tracking.log([permissions] ${k} permissions are ${current});
[permissions] ${k} permissions are ${current}
if (current === "denied" || current === "limited") {
// Tracking.setUserProperty(userPropertyKey, "false");
return reject(MAP_RESULTS[current]);
} else if (current === "granted") {
// Tracking.setUserProperty(userPropertyKey, "true");
return resolve("authorized");
}
if (response === "granted") {
} else {
return reject(MAP_RESULTS[response]);
});
react-unifier/src/Permissions.ts
Line 23 in ab36212
// import {Tracking} from "./Tracking"; // import capitalize from "lodash/capitalize"; import {Platform} from "react-native"; // import Permissions from "react-native-permissions"; import {PermissionKind, PermissionStatus} from "./Common"; export async function requestPermissions(kind: PermissionKind): Promise<PermissionStatus> { return new Promise(async (resolve, reject) => { return "denied"; }); // const userPropertyKey = `PermissionsFor${capitalize(kind)}`; // let k = kind; // let options: any = undefined; // if (kind === "locationAlways") { // k = "location"; // options = { type: "always" }; // } // if (Platform.OS === "android" && k === "notification") { // return; // } // // TODO check soft request status. // const current = await Permissions.check(MAP[k] as any); // // Tracking.log(`[permissions] ${k} permissions are ${current}`); // if (current === "denied" || current === "limited") { // // Tracking.setUserProperty(userPropertyKey, "false"); // return reject(MAP_RESULTS[current]); // } else if (current === "granted") { // // Tracking.setUserProperty(userPropertyKey, "true"); // return resolve("authorized"); // } // const response = await Permissions.request(MAP[k] as any, options); // if (response === "granted") { // // Tracking.setUserProperty(userPropertyKey, "true"); // return resolve("authorized"); // } else { // // Tracking.setUserProperty(userPropertyKey, "false"); // return reject(MAP_RESULTS[response]); // } // }); }
c14c07455f510dfb84a07cd79048d504a884a011
The text was updated successfully, but these errors were encountered:
No branches or pull requests
check soft request status.
// Tracking.log(
[permissions] ${k} permissions are ${current}
);if (current === "denied" || current === "limited") {
// Tracking.setUserProperty(userPropertyKey, "false");
return reject(MAP_RESULTS[current]);
} else if (current === "granted") {
// Tracking.setUserProperty(userPropertyKey, "true");
return resolve("authorized");
}
if (response === "granted") {
// Tracking.setUserProperty(userPropertyKey, "true");
return resolve("authorized");
} else {
// Tracking.setUserProperty(userPropertyKey, "false");
return reject(MAP_RESULTS[response]);
}
});
react-unifier/src/Permissions.ts
Line 23 in ab36212
c14c07455f510dfb84a07cd79048d504a884a011
The text was updated successfully, but these errors were encountered: