Pls help, I'm having a problem in terms of getting the GPS coordinate
I'm following this link but the GPS Coordinate is not working.
https://developer.xamarin.com/recipes/android/os_device_resources/gps/get_current_device_location/
IDK why, but the codes seems correct for me
Thanks in advance
Answers
Hello @Enohara
have you got any error ...put a break point and see what's happens.
what is it the problem ..? convert the coordinates to address OR to have the coordinate ?
@ChristopheBERNARD , I follow every step but when i try to run the application, nothing happens. Do i need to add some Nuget or any plugins?
THIS IS MY MAIN ACTIVITY
{
[Activity(Label = "GetCurrentLocation", MainLauncher = true)]
public class MainActivity : Activity, ILocationListener
{
static readonly string TAG = "X:" + typeof (MainActivity).Name;
TextView addressText;
Location currentLocation;
LocationManager locationManager;
But just as I said, i follow every steps so it's just the same.
Thanks in advance
@Enohara have you set the permission in the manifest ?
android.permission.ACCESS_FINE_LOCATION
android.permission.ACCESS_COARSE_LOCATION
code seems to be nice
Already did sir but still no result
@Enohara
i suppose you have a result as : current location is null and
addressText.Text = "Can't determine the current address. Try again in a few minutes"; ???
move with the device and i suppose the gps is actif ?
I try moving but still, there's noting to show for coordinates
i can't understand normally all worked i have a few sample i will look inside and i come again
Can i have those sample sir?
walk with the device and wait it's take some time before work ..
you code is good i'm sure i have open my few sample and it's worked but few minutes before to have lat long