Getting null from 'getLastKnownLocation' on SDK

前端 未结 6 1360
星月不相逢
星月不相逢 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

    Have you set the permissions in your AndroidManifest.xml? You need these permissions in order to access the user's location with an application:

    
    
    

提交回复
热议问题