Languages

Menu
Sites
Language
Segmentation fault when launching locator service

I'm using the v4 emulator, and trying to follow this guide (https://developer.tizen.org/development/guides/.net-application/location-and-sensors/location-information) 

I have run into two issues: following the Getting the Current Location section, I did this:

 

 protected override void OnStart()
        {
            // Handle when your app starts
            var locator = new global::Tizen.Location.Locator(Tizen.Location.LocationType.Hybrid);
            locator.LocationChanged += Locator_LocationChanged;
            locator.ServiceStateChanged += Locator_ServiceStateChanged;
            locator.Start();
            
        }

But when it hits locator.Start(), I get a segmentation fault.

I also noticed that Visual Studio doesn't recognize the existence of any properties defined here: (https://developer.tizen.org/dev-guide/csapi/api/Tizen.Location.Locator.html#Tizen_Location_Locator_EnableMock).

 

For instance, I get an erro when I try to get/set EnableMock, StayInterval.

 

How do I fix this? How do I start the location service correctly?

Responses

2 Replies
Peter Kolichikov

Might be important, this was on the v4 emulator (btw, is there a non preview version).

However, when I run the v5 emulator, I get:

System.UnauthorizedAccessException: Accesibility not allowed
   at Tizen.Location.Locator.Start()

 

Which is weird, since I have added the location privilege to the manifest.  

Juwon(Julia) Ahn

Hi Peter,

First of all, please check if you get the user's consent to use the user's location data.

Request the user's permission is required for location privilege.

https://developer.tizen.org/development/guides/.net-application/security/privacy-related-permissions

https://developer.tizen.org/development/training/.net-application/security-and-api-privileges

When I check Location sample app on Tizen wearab 4.0 emulator, it works.

You can inject the location data through `Emulator Control Panel`.

  Right click on emulator >  Location  > right click on map image + click inject markers button 

      or manually put altitude/longtitude/latitude/horizontal accuracy values + press inject location button

https://developer.tizen.org/development/visual-studio-tools-tizen/tools/emulator-control-panel