我在手机中建立了以下代码,任何地方都没有错误,但是当我单击按钮时,我需要检查设备位置是否启用,但是使用下面的代码没有任何反应我正在使用android 7.0版本,有人可以帮我吗请,我只需点击此链接How to programmatically enable and disable GPS in Ionic Framework or Cordova
start(){
this.locationAccuracy.canRequest().then((canRequest: boolean) => {
if(canRequest) {
this.locationAccuracy.request(this.locationAccuracy.REQUEST_PRIORITY_HIGH_ACCURACY).then(() => {
console.log('Request successful.')
},
error => {
console.log('Error requesting location permissions', error)
}
);
}
});
}