Why GPS location can not be stop and started...? (Tizen / Xamarin wearable development)

Roman Rusz 21 Reputation points

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.

   Tizen.Location.Locator locator;
   locator = new Locator(LocationType.Hybrid);

   // START

   // GET
   Tizen.Location.Location location = locator.GetLocation();

   if (location != null)
      latitude.Text =  location.Latitude.ToString();
      longitude.Text =  location.Longitude.ToString();
      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 = null;


Is there are any tizen, c#, .Net, xamarin guru, who help me with this flustrating problem? :-)

A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,809 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
6,946 questions
No comments
{count} votes