public boolean hasGPSDevice(Context context)
   {
    final LocationManager mgr = (LocationManager)context.getSystemService(Context.LOCATION_SERVICE);
    if ( mgr == null ) return false;
    final List<String> providers = mgr.getAllProviders();
    if ( providers == null ) return false;
    return providers.contains(LocationManager.GPS_PROVIDER);
    }

相关文章:

  • 2021-07-06
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-22
猜你喜欢
  • 2021-12-23
  • 2022-12-23
  • 2021-09-26
  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案