I'm trying to get laocation in the Service Application, but I'm facing a lot of errors instead of location data. I'm wondering why the same code works fine in a simple UI Application, I'm sorry about the lengthy post but some of the Errors (from the log file) which I think related to the location tracking, are given below to get an idea about what's going on:
//Location Related E 2672 SLP_LBSPLUGIN gps_plugin_brcm.c: brcm_gps_request(5819) > [PLGN] SAP DISCONNECTED. ignor result E 2672 LBS_SERVER_GPS dump_log.c: gps_dump_log(302) > Add dump log [lbs_server_status [0] = TRUE E 2672 LBS_SERVER_GPS server.c: _gps_server_gps_event_cb(2339) > Failed get reference time E 2672 LBS_SERVER_GPS dump_log.c: gps_dump_log(302) > Add dump log [GPS_EVENT_GET_REF_LOCATION(0x300) from [GPS Plugin] W 2672 LBS_SERVER_GPS server.c: _gps_server_gps_event_cb(2249) > Request(GPS_EVENT_GET_REF_LOCATION) from GPS Plugin > get reference location with Timeout[20] from LBS Provider E 2672 LBS_SERVER_GPS dump_log.c: gps_dump_log(302) > Add dump log [START COMPANION-WPS from [lbs-server/get_ref_location] W 2750 STARTER hw_key.c: _powerkey_timer_cb(754) > [_powerkey_timer_cb:754] _powerkey_timer_cb, powerkey count[1] W 2750 STARTER hw_key.c: _powerkey_timer_cb(906) > [_powerkey_timer_cb:906] clock visibility[0] pressed lcd status[1], current lcd status[1] pressed pm state[1] W 2750 STARTER dbus-util.c: dbus_util_get_call_status(324) > [dbus_util_get_call_status:324] call status[0] type[1] E 2674 TRM_SERVER Add_Trace_Log :: AppLaunchHomeLock W 2750 AUL launch.c: app_request_to_launchpad_for_uid(301) > request cmd(0) : appid(com.samsung.w-home), target_uid(5001) W 2179 AMD amd_product_safemode.c: _amd_get_safe_mode(34) > Safe mode value = 0 W 2750 STARTER pkg-monitor.c: __app_status_resume_cb(471) > [__app_status_resume_cb:471] Resume request [2774] W 2774 W_HOME HomeApp.cpp: onAppControl(193) > [0;35mfirstLaunch:0[0;m W 2774 CAPI_APPFW_APP_CONTROL app_control.c: app_control_error(116) > [app_control_get_extra_data] KEY_NOT_FOUND(0xffffff82) W 2774 CAPI_APPFW_APP_CONTROL app_control.c: app_control_error(116) > [app_control_get_extra_data] KEY_NOT_FOUND(0xffffff82) W 2774 W_HOME HomeApp.cpp: _onAppControl(238) > [0;35mapp operation:http://tizen.org/appcontrol/operation/main[0;m W 2774 W_HOME HomeApp.cpp: _onAppControl(242) > [0;35mhome operation:powerkey[0;m E 2672 LBS_SERVER_COMPANION server.c: _consumer_event_cb(983) > Start Session, error : -200 W 2774 W_HOME HomeMainCtrl.cpp: handleAppControl(345) > [0;35mcommand:powerkey[0;m E 2672 LBS_CONSUMER_PLUGIN lbs_plugin_consumer_main.c: _start_session(698) > lbs consumer plugin failed to send [start session]:[-4] E 2674 TRM_SERVER Add_Trace_Log :: AppLaunchLock //Other Errors W 8335 MESSAGE_PORT message_port_common.c: read_socket(153) > read_socket: 11 , sleep and retry ... E 2889 CAPI_MEDIA_CONTROLLER media_controller_main.c: __mc_main_check_connection(37) > [31m[No-error] Timer is Called but there is working Process, connection_cnt = 3[0m E 114 WMS wms_event_handler.c: _wms_event_handler_cb_nomove_detector(18100) > _wms_event_handler_cb_nomove_detector is called
Here's some information about the project:
I followed this tutorial to launch a service app from the host app. Both the host and service applications have the following privileges:
- http://tizen.org/privilege/appmanager.launch
- http://tizen.org/privilege/location
- http://tizen.org/privilege/healthinfo
Using the MessagePort, Both applications communicate with each other like this:
- Host App sends a message to Service App about executing a required method.
- Service App executes that particular method and sends feedback to the host app (e.g. Location Tracking Started).
- Host App recieves the feedback and then updates the UI accordingly.
Here's the sample code which I manipulated for the Location Tracking in my Service App.