代码之家  ›  专栏  ›  技术社区  ›  prom85

Settings.Secure-LOCATION_MODE已弃用-可供选择的写入方式

  •  0
  • prom85  · 技术社区  · 6 年前

    根据 this 旗帜 Settings.Secure.LOCATION_MODE 已在API 28中被否决。有没有别的办法 这个场景?(我不想读这个值,可以通过 LocationManager )

    或者,我是否可以相信以下内容仍然适用于所有设备?(它在我的android派设备上工作,例如):

    Settings.Secure.putInt(contentResolver, Settings.Secure.LOCATION_MODE, Settings.Secure.LOCATION_MODE_OFF)
    Settings.Secure.putInt(contentResolver, Settings.Secure.LOCATION_MODE, Settings.Secure.LOCATION_MODE_HIGH_ACCURACY)
    

    我只是想知道,如果上面的一些设备可能会失败,或者如果我可以保存继续使用它们,即使在API 28或更高。。。

    0 回复  |  直到 6 年前