Languages

Menu
Sites
Language
GPS Service Not Available in Native Service on Hybird Application

Hello, All!

 

I am developing Hybrid application, where it uses gps service on native.

My gps is already enabled and This application includes the location previleges.

But, there is an error, LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE.

 

---------------------------ERROR LOG-----------------------------

Level   |  Tag                                                |    Message

Error   |  CAPI_LOCATION_MANAGER   |    locations.c: _convert_error_code(68) > LOCATIONS_ERROR_SERVICE_NOT_AVAILABLE(0xfd400003) : corefw error(0x2)

I am using Tizen 2.3.0_Rev2 SDK.

Please help me if one resolves this issue.

 

Thank you

Best regards,

Responses

11 Replies
Jean Yang

Hi, 

Please confirm if the GPS is aviable in your location, use the Android or ios phone to do the campare, also, if you provide more info will be helpful.

colin Rao

Hi,

Can be more description about when & where the error was raised. Example, which function was called while the error raised. 

Mostly, the GPS will not working in building, at least you need to put the device to nearby the window.

신동하 Shin

Thank you, All!

I will try this one more time by working application in the outside.

If there is also this error, I will ask you for help.

 

Thank you.

Best regards!

AVSukhov

Hello,

This error may observed if Location Manager is unable to run on the requested device due to weak radio reception.

Therefore it is better to test the outside or at least you should let nearby the window.

I hope this will help you

신동하 Shin

I tested the application in the outside. But, there was same error.. ㅠㅠ

When I got the location, an error was location service not available and the location value was 0.

Please help me.. I upload my code.

 

location_manager_h l_manager;

// start manager
static void start_location_manager() {
    int ret = location_manager_create(LOCATIONS_METHOD_GPS, &l_manager);
    dlog_print(DLOG_INFO, "location", "start location success? %s", ret == 0 ? "Yes" : "No");
    location_manager_set_position_updated_cb(l_manager, position_updated, 2, (void*) l_manager);
    location_manager_start(l_manager);
}

static void position_updated(double latitude, double longitude, double altitude,
        time_t timestamp, void *user_data)
{

    double altitude, latitude, longitude, climb, direction, speed;
    double horizontal, vertical;
    location_accuracy_level_e level;
    time_t timestamp;
    int ret = location_manager_get_location(manager, &altitude, &latitude,
            &longitude, &climb, &direction, &speed, &level, &horizontal,
            &vertical, &timestamp);
    dlog_print(DLOG_INFO, "location", "get current location success? %s", ret == 0 ? "Yes" : "No");  

     ==> this log's result is No! 

    dlog_print(DLOG_DEBUG, "location", "%f", altitude);

     ==> this log's result is 0. 

}

Marco Buettner

Which device?

신동하 Shin

my device is samsung z1.

colin Rao

Did you checked the parameter's value of the callback function(position_updated). As I understand, this callback will be called while it get the GPS data. 

kunqing wang

hi sir:

I hava just met the same issues with you.How do you solve this questions? reply to me thanks sincerely.

Jirka Prazak

Can you please post your code. The above code from 2015 has several issues if you are using something similar. It should not even compile, there is variable redefinition and he is fetching a new location in the call back and so on.

-Jirka

Jean Yang

I have an suggestiong, you can change another tizen phone to try this.