/*
* 动态shen'qing申请 申请权限
*/
bool Widget::requestPermission(const QString &permission) {
QtAndroid::PermissionResult r = QtAndroid::checkPermission(permission);
if(r == QtAndroid::PermissionResult::Denied) {
QtAndroid::requestPermissionsSync( QStringList() << permission );
r = QtAndroid::checkPermission(permission);
if(r == QtAndroid::PermissionResult::Denied) {
return false;
}
}
return true;
}