Languages

Menu
Sites
Language
GPS location for Gear S2 standalone application

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?

 

Edited by: YEONGJONG LEE on 15 Feb, 2016

Responses

3 Replies
Marco Buettner

As far I know only the Gear S2 3G-model has GPS support. If u have the non-3G-model u need a companion app for location data.

AVSukhov

Hello,

As Marco Buettner comment, Gear S2 have GPS only in the 3G model.

So, i think you can use companion type of app to receive coords from host-side app (mobile).

YEONGJONG LEE
static void 
__state_changed_cb(location_service_state_e state, void *user_data)
{
   service_state = state;
}

but sometimes the function is called and 'state' return 'LOCATIONS_SERVICE_ENABLED', then I can get current latitude, longitude.

i think it is possible to standalone app for location data on Gear S2 bluetooth-model.

problem is 'sometimes'.. not 'always'