Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,294 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello everybody. I have very strange problem. I need simply start GPS - get actual position - save it - stop GPS. Repeat every 5 minutes for example.
Lets start with simply start - get - stop. I am trying to figure it out why it is not working. It is working first time. Start - Get position - Stop. After, lets say, 30 second I call this exactly the same function again. And nothing happend. Location is not changing (yes, I am in other location...) and GPS is not working. I really dont know why.
try
{
Tizen.Location.Locator locator;
locator = new Locator(LocationType.Hybrid);
// START
locator.Start();
// GET
Tizen.Location.Location location = locator.GetLocation();
if (location != null)
{
latitude.Text = location.Latitude.ToString();
longitude.Text = location.Longitude.ToString();
}
else
{
latitude.Text = "not found";
longitude.Text = "";
}
// STOP ... I try every possible variants of those below. It simply HARD-stop GPS and never start again. Simply when you call STOP and after you call START - it will not start again..
locator.Stop();
//locator.Dispose();
//locator = null;
}
Is there are any tizen, c#, .Net, xamarin guru, who help me with this flustrating problem? :-)