栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

adb shell cmd location

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

adb shell cmd location

1 需求

  • 查询位置服务状态
    • adb shell cmd location is-location-enabled
  • 开启或关闭 位置服务
    • ​​​​​​​adb shell cmd location set-location-enabled true

2 语法

Location service commands:
  help or -h
    Print this help text.
  is-location-enabled [--user ]
    Gets the master location switch enabled state. If no user is specified,
    the current user is assumed.
  set-location-enabled true|false [--user ]
    Sets the master location switch enabled state. If no user is specified,
    the current user is assumed.
  providers
    The providers command is followed by a subcommand, as listed below:

    add-test-provider  [--requiresNetwork] [--requiresSatellite]
      [--requiresCell] [--hasMonetaryCost] [--supportsAltitude]
      [--supportsSpeed] [--supportsBearing]
      [--powerRequirement ]
      [--extraAttributionTags ,,...]
      Add the given test provider. Requires MOCK_LOCATION permissions which
      can be enabled by running "adb shell appops set 
      android:mock_location allow". There are optional flags that can be
      used to configure the provider properties and additional arguments. If
      no flags are included, then default values will be used.
    remove-test-provider 
      Remove the given test provider.
    set-test-provider-enabled  true|false
      Sets the given test provider enabled state.
    set-test-provider-location  --location ,
      [--accuracy ] [--time 

3 示例


4 参考资料

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/950662.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号