Android 如何发布在带有GPS的设备上使用GPS而在没有GPS的设备上不使用GPS的应用程序?

Android 如何发布在带有GPS的设备上使用GPS而在没有GPS的设备上不使用GPS的应用程序?,android,gps,Android,Gps,我的应用程序在谷歌播放。今天支持5215台设备。应用程序在AndroidManifest.xml中包含以下内容: <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> 和权限都包括在内 android.hardware.LO

我的应用程序在谷歌播放。今天支持5215台设备。应用程序在
AndroidManifest.xml
中包含以下内容:

 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
和权限都包括在内

android.hardware.LOCATION
android.hardware.location.GPS
android.hardware.location.NETWORK
android.permission.ACCESS_COARSE_LOCATION
android.permission.ACCESS_FINE_LOCATION
问题是,我们的客户的设备没有GPS,而Google Play中的应用程序在此设备上不可用

我已经读到,我可以使用
android:required=“false”
参数添加
标记。所以我补充说:

<uses-feature android:name="android.hardware.LOCATION" android:required="false"/>
<uses-feature android:name="android.hardware.location.GPS" android:required="false"/>
<uses-feature android:name="android.hardware.location.NETWORK" android:required="false"/>

没有任何变化,相同的5215台设备。但是,如果我删除对android.permission.ACCESS\u FINE\u LOCATION权限的请求,则可以使用5856台设备(新增641台)


怎么了?如何同时发布适用于带GPS和不带GPS设备的应用程序?

这是您需要的

<uses-feature android:name="android.hardware.location.gps" android:required="false" />


GPS
不同于
GPS

虽然我不确定,但如果您要求

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>


无论您指定什么,它都会使gps设置为真。找到答案的唯一可靠方法是暂时忽略受支持设备的数量,在play store中发布您的应用程序,并使用此处显示的清单,然后尝试在有gps芯片组和无gps芯片组的设备中下载应用程序。

,但它是有效的:我从开发者控制台的表中复制了“android.hardware.location.GPS”值。谢谢。IIRC无论何时使用清单中的
使用功能
,所有内容都始终是小写的