Getting location name using Latitude and Longitude value in android

前端 未结 2 1885
伪装坚强ぢ
伪装坚强ぢ 2020-12-20 08:07

I have written following code to get location name

package demo.gps.locname;

import java.io.IOException;
import java.util.List;
import java.util.Locale;

/         


        
相关标签:
2条回答
  • 2020-12-20 08:43

    Hey you just use this code Android Location based services In this code you change LocationManager.GPS_PROVIDER to LocationManager.Network_PROVIDER. all the best

    0 讨论(0)
  • 2020-12-20 08:48

    The

    <uses-library android:name="com.google.android.maps" />

    should be contained in the <application> node and not the <activity> node. That should fix the problem because as of now, you are not requesting for the maps permission.

    0 讨论(0)
提交回复
热议问题