WangDaYeeeeee / GeometricWeather

A Material Design Weather Application
GNU Lesser General Public License v3.0
2.43k stars 186 forks source link

Get location from baidu or amap failed when refused OP_Read_Phone_State #83

Closed TsukihiAraragi closed 5 years ago

TsukihiAraragi commented 5 years ago

In latest version, location permission has granted but I cannot get location via baidu or amap location service when refused OP_READ_PHONE_STATE , only baidu ip and native work. I don't think that OP_READ_PHONE_STATE must be needed for getting location. Check it, please.

WangDaYeeeeee commented 5 years ago

READ_PHONE_STATE isn't a required permission for Baidu Location Service and AMap Location Service. However, some devices may fail to locate through Baidu Location Service or AMap Location Services due to the lack of this permission. And using Native API or Baidu IP Location Service does not require granting this permission.

I will adjust the permisson policy of GeometricWeather in the next version. It will only request READ_PHONE_STATE permission for the first time to locate, so you can use Baidu Location Service or AMap Location Service to locate even if you don't grant the READ_PHONE_STATE permission.

TsukihiAraragi commented 5 years ago

@WangDaYeeeeee Thanks, now it works when I refused READ PHONE STATE and READ/WRITE EXTERNAL STORAGE, but I thinks it shouldn't request these permissions after users refused it 2 times or more. Otherwise, which datas will be uploaded to tecent bugly server if I granted it all permission?