Android 模拟器发送网络提供商更新

标签 android ddms android-location

如何将更新发送到 Android 模拟器,就像它们来自“网络”提供商一样。 DDMS 似乎作为“gps”提供商发送,无法更改它。

最佳答案

不幸的是,据我所知,您无法在模拟器中使用“网络”提供程序。

Note: Providing mock location data is injected as GPS location data, so you must request location updates from GPS_PROVIDER in order for mock location data to work.

http://developer.android.com/guide/topics/location/strategies.html#MockData

关于Android 模拟器发送网络提供商更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14489064/

相关文章:

android - 管理 fragment ,公共(public)静态 viewpager

安卓 L : Fast scroll for the RecyclerView

java - 如何禁用和启用 android ScrollView 上的滚动?

android - android log util 中的行号

java - 服务启动时尝试调用位置权限但应用程序崩溃

java - Android GpsStatus 始终有零颗卫星

Android Unity - 更改启动器 Activity

android - 为什么在使用 DDMS Dump View 时 View 在 Android 中包含子项

java - future 的功能还需要 AssetManager 吗?

java - 获取带有挂起 Intent 的位置更新会返回空位置