GPS location for Gear S2 standalone application

GPS location for Gear S2 standalone application

BY 15 Feb 2016 Native Application Development

I want to get current latitude, longitude in my Gear S2 BT standalone application.

I found this document

https://developer.tizen.org/dev-guide/2.4.0/org.tizen.tutorials/html/native/location/location_tutorial_n.htm

but it’s not working in Gear S2 bluetooth model.

if I use the function

ret = location_manager_set_service_state_changed_cb(manager, __state_changed_cb, NULL);

the callback function ‘__state_changed_cb’ isn’t called.. actually it is called rarely.(I dont know when the function ‘__state_changed_cb’ is called.)

if I use the function

     location_manager_request_single_location(manager,100,location_manager_request_single_location_cb,NULL);

the function is always timeout. but when i use the fuction, i can see notification ‘ searching useing GPS…’ on my smartphone.

if I use the fuction

ret = location_manager_get_last_location(manager, &altitude, &latitude, &longitude,
                                         &climb, &direction, &speed, &level, &horizontal, 
                                         &vertical, &timestamp);


I can get last latitude, longitude. but i want get current latitude, longitude.

 

of course i called

location_manager_create(LOCATIONS_METHOD_GPS, &manager);
location_manager_start(manager);

 

what is my missing point?

 

Written by