在离子中启用GPS

问题描述

我尝试在Android上建立离子地理定位项目。使用位置精度 插件和Android权限。一切似乎都正常,但是Android Permissions无效。我单击按钮地理位置以获取在不离开应用程序的情况下打开GPS的权限,但我什么都没有显示! 。控制台中只有一个错误
ERROR Error: Uncaught (in promise): Object: {"code":-1,"message":"A request is already in progress"}
  

方法位置:

async location() {

  this.p.checkPermission(this.p.PERMISSION.ACCESS_FINE_LOCATION).then(
    result => {
      if (!result.hasPermission)
         this.la.canRequest().then((canRequest: boolean) => {
          console.log(canRequest)

          if(!canRequest) {
            // the accuracy option will be ignored by iOS
            this.la.request(this.la.REQUEST_PRIORITY_HIGH_ACCURACY).then(
              () => console.log('Request successful'),error => console.log('Error requesting location permissions',error)
            );
          }
        
        });
      else {
      }
    },e=>{
      alert("2"+e)

    })
}

请问有什么想法吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)