Android 模拟器';GPS和网络的hasSystemFeature是否始终返回false?

Android 模拟器';GPS和网络的hasSystemFeature是否始终返回false?,android,networking,gps,hardware,Android,Networking,Gps,Hardware,可以使用hasSystemFeature()检查Android中硬件的可用性。但是,当我尝试调用context.getPackageManager().hasSystemFeature(PackageManager.FEATURE\u LOCATION\u GPS)和 context.getPackageManager().hasSystemFeature(PackageManager.FEATURE\u LOCATION\u NETWORK)在模拟器上,两个命令都返回false 尽管仿真器有一

可以使用
hasSystemFeature()
检查Android中硬件的可用性。但是,当我尝试调用
context.getPackageManager().hasSystemFeature(PackageManager.FEATURE\u LOCATION\u GPS)
context.getPackageManager().hasSystemFeature(PackageManager.FEATURE\u LOCATION\u NETWORK)
在模拟器上,两个命令都返回false


尽管仿真器有一个GPS,这是事实。有什么问题吗?如果仿真器有GPS或网络硬件,如何签入仿真器?

尝试为仿真器设置自己的纬度和经度: 遵循以下步骤: 使用DDMS

->go to your android/tools directory, and launch the DDMS tool
->select the Emulator Control Tab
->fill the Location Controls fields with the longitude and latitude values
->press the Send button