Getting null from 'getLastKnownLocation' on SDK

前端 未结 6 1365
星月不相逢
星月不相逢 2020-12-01 19:52

I have a problem related to the Location API.

I tried the following code:

LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SER         


        
6条回答
  •  时光说笑
    2020-12-01 20:35

    If you're running the code in the emulator, any calls to get the GPS location will return null until you explicitly update the location (via Eclipse or ADB).

提交回复
热议问题