为什么我的 Android 应用程序没有在原生脚本的 iBeacons 中请求许可?

问题描述

let options = {
    iOSAuthorisationType : BeaconLocationoptionsIOSAuthType.Always,androidAuthorisationType: BeaconLocationoptionsAndroidAuthType.Coarse,androidAuthorisationDescription: "Location permission needed"
}
var nativescriptIbeacon = new NativescriptIbeacon(callback,options);

if (!nativescriptIbeacon.isAuthorised()){
        //alert(1)
        console.log("NOT Authorised");
        nativescriptIbeacon.requestAuthorization().then(() =>{
            console.log("Authorised by the user");
            nativescriptIbeacon.bind();
        },(e) => {
            console.log("Authorisation denied by the user");
        })
    } else {
        //alert(2)
        console.log("Already authorised");
        nativescriptIbeacon.bind();
    }

这是一个用 nativescript-ibeacons 创建的应用程序,我试图获得位置的许可以使信标工作 为什么它可以在 iOS 上运行,但它在 Android 上不起作用? 在我的 Android 手机上,当我启动我的应用程序时,它不会请求任何权限弹出

解决方法

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

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

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