Android locationManager requestLocationUpdates不起作用
我正在开发一个列出最接近用户的餐厅的应用程序.当点击刷新按钮时,它会列出用户当前位置的餐馆.我正在使用位置管理器,只有当活动进入前台(onResume)才能请求更新,以避免电池的不断使用.当应用程序进入onPause()时,位置更新被停止.当我通过终端传递更新时,它在模拟器上工作正常. 问题: 当我改变我的位置(比如开车5英里远)时,我打开我的应用程序和活动来显示最近的餐厅,需要很长时间(4-5分