The location function has been stopped because you do not agree with the privacy compliance policy.
Please recheck the setAgreePrivacy interface
升级百度SDK的时候,遇到:The location function has been stopped because you do not agree with the privacy compliance policy. Please recheck the setAgreePrivacy interface这种提示,并且无法获取定位,查询官方文档之后才发现再使用之前需要调用setAgreePrivacy
解决方案:为了进一步加强对最终用户个人信息的安全保护措施,从定位SDK v9.2.9版本起,请开发者务必确保调用SDK任何接口前先调用隐私合规接口setAgreePrivacy,否则可能会无法正常使用相关功能。如下:
LocationClient.setAgreePrivacy(true);