huawei-mobile-services - (Flutter)华为定位套件-经纬度null

标签 huawei-mobile-services

我正在尝试使用华为定位服务(融合定位服务)来获取经度和纬度。但我得到的回复都是空的。

然后,我调用 requestLocationUpdates() 方法来获取设备位置并更新缓存。但我得到了 PlatformException。我可以知道为什么吗?

enter image description here

enter image description here

我当前使用华为定位套件的代码:

enter image description here

enter image description here

enter image description here

enter image description here

日志: enter image description here

最佳答案

我在项目中尝试了你的代码,它似乎有效。

您能否检查一下agconnect-services.json和 key 文件是否放置在正确的位置,如下所示:

项目截图:

enter image description here

并且该API已在AppGallery Connect中启用:

AGConnect 截图:

enter image description here

关于huawei-mobile-services - (Flutter)华为定位套件-经纬度null,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69495596/

相关文章:

android - 如何访问HMS推送通知的payload?

android - 某些设备上的 Animator/AnimatorSet 问题

android - 是否可以在华为设备上创建重定向到华为应用程序库的 firebase 动态链接

centos - gammu收不到短信

android - 从Health Kit发送步骤后,步骤在Huawei Health应用程序上不可见

r - 在 R 中将字符转换为 HMS

android - 华为 map 和位置套件 - 在 LocationCallback 中调用 getMapAsync() 时出现错误

java - 错误 org.omg.CORBA.MARSHAL 序列长度太大

java - 华为Map Kit Activity打开很慢

huawei-mobile-services - appgallery connect.上传包。出现未知错误。请稍后再试