Android:创建没有GPS硬件的模拟器 [英] Android : create simulator without GPS hardware

查看:178
本文介绍了Android:创建没有GPS硬件的模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我收到有关 ACCESS_FINE_LOCATION权限的谷歌通知时。据我了解,如果我们不向您的清单中添加android.hardware.location.gpsuses-feature ,它也可以在非GPS硬件设备上看到。



如果我添加我的应用程序不会显示给他们,我不想这样做。



我想请检查应用程序对没有 GPS硬件的设备的反应情况。


来自Google Play商店的实际信息



如何为此创建模拟器? > 需要采取的措施:如果您的应用需要GPS硬件正常运行,您需要明确添加android.hardware.location.gps使用功能到您的清单。



有什么改变



2016年10月15日发生的一项更改,会影响使用ACCESS_FINE_LOCATION但未明确使用android.hardware.location.gps用途的API版本21(Android 5.0,Lollipop)或更高版本的应用-特征。展望未来,这些应用程序将可用于安装在没有GPS硬件的设备上。在大多数情况下,这不会成为问题,因为基于Wi-Fi和基于Cell-ID的位置为这些应用的典型操作提供了足够高的保真度。但是,任何需要GPS硬件的应用程序,例如GPS导航器,都应该明确地将android.hardware.location.gpsuses-feature添加到他们的清单中。



如果您的应用程序需要GPS才能正常运行,并且您的清单声明中不包含android.hardware.location.gps,您的用户可能会遇到糟糕的应用程序体验。


详细了解此更改


As I got notification from google about the ACCESS_FINE_LOCATION permissions. As I understand if we don't add "android.hardware.location.gps" uses-feature to your manifest it will visible to non GPS hardware device also.

If I add that my application wont display to them and I don't want to do that.

I want to check that how app is reacting on device that not having GPS Hardware. How can I create simulator for this?

Actual message from Google Play Store

Action required: If your app requires GPS hardware to operate properly, you will need to explicitly add the "android.hardware.location.gps" uses-feature to your manifest.

What’s changing

We’re making a change on October 15th, 2016 that will affect apps targeting API version 21 (Android 5.0, Lollipop) or higher that use ACCESS_FINE_LOCATION but don't explicitly have the "android.hardware.location.gps" uses-feature. Going forward, these apps will be available to install on devices that don't have GPS hardware. In most cases this won't be an issue since Wi-Fi and Cell-ID based location provides high enough fidelity for the typical operation of these apps. However, any apps that require GPS hardware, such as GPS navigators, should explicitly add the "android.hardware.location.gps" uses-feature to their manifest.

If your app requires GPS to function properly and you do not include android.hardware.location.gps in your manifest declaration, your users may have a poor app experience.

Read More about this change here

解决方案

You can try this on the real device. For example, Lenovo A369i doesn't have GPS Hardware. If you don't have real device without GPS you can create corresponding virtual device. Go to Android Virtual Device Manager -> Create Virtual Device -> New Hardware Profile. There you can find GPS checkbox, so you should switch off it and you will create device without GPS.

这篇关于Android:创建没有GPS硬件的模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆