// Create the location manager handle
if (location_manager_create(LOCATIONS_METHOD_GPS, &s_geolocation_data.manager) != LOCATIONS_ERROR_NONE)
{
- LOGE("Failed to create location manager");
+ dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create location manager");
return false;
}
if (pos_cb != LOCATIONS_ERROR_NONE || sat_cb != LOCATIONS_ERROR_NONE)
{
- LOGE("Failed to register callbacks for location manager");
+ dlog_print(DLOG_ERROR, LOG_TAG, "Failed to register callbacks for location manager");
geolocation_manager_service_destroy();
return false;
// Get last location information
if (location_manager_get_last_position(s_geolocation_data.manager, &altitude, &init_coords->latitude, &init_coords->longitude, &timestamp) != LOCATIONS_ERROR_NONE)
{
- LOGE("Failed to get last location");
+ dlog_print(DLOG_ERROR, LOG_TAG, "Failed to get last location");
return false;
}
location_error_e ret = gps_status_get_satellite(s_geolocation_data.manager, &num_of_active, satellites_count, &timestamp);
if (ret != LOCATIONS_ERROR_NONE)
{
- LOGE("Failed to get satellite data [%d]", ret);
+ dlog_print(DLOG_ERROR, LOG_TAG, "Failed to get satellite data [%d]", ret);
// Satellite data is not supported on Tizen Emulator - satellite count remains at 0
}
</pre>
// Send position update through message port
if (_geolocation_manager_position_coords_send(coords))
{
- LOGI("Position updated to %f, %f", latitude, longitude);
+ dlog_print(DLOG_INFO, LOG_TAG, "Position updated to %f, %f", latitude, longitude);
}
else
{
- LOGE("Failed to send position update");
+ dlog_print(DLOG_ERROR, LOG_TAG, "Failed to send position update");
}
}
}
// Send satellite count update through message port
if (_geolocation_manager_satellites_count_send(num_of_inview))
{
- LOGI("Satellite count updated: inview %d", num_of_inview);
+ dlog_print(DLOG_INFO, LOG_TAG, "Satellite count updated: inview %d", num_of_inview);
}
else
{
- LOGE("Failed to send satellite count update");
+ dlog_print(DLOG_ERROR, LOG_TAG, "Failed to send satellite count update");
}
}
}
// Check remote port state from GPS consumer
if (message_port_check_remote_port(REMOTE_APP_ID, REMOTE_PORT, &exists) != MESSAGE_PORT_ERROR_NONE)
{
- LOGE("Failed to check remote port");
+ dlog_print(DLOG_ERROR, LOG_TAG, "Failed to check remote port");
geolocation_manager_service_destroy();
return false;
if (!exists)
{
- LOGE("Remote port is not registered");
+ dlog_print(DLOG_ERROR, LOG_TAG, "Remote port is not registered");
}
</pre>
// Send initial data to GPS consumer port
if (!_geolocation_manager_init_data_send())
{
- LOGE("Failed to send init data - create timer to periodically try to send data");
+ dlog_print(DLOG_ERROR, LOG_TAG, "Failed to send init data - create timer to periodically try to send data");
ecore_timer_add(SEND_DATA_INTERVAL, _geolocation_manager_init_data_send_cb, NULL);
}
</pre>
if (!b)
{
- LOGE("Failed to create bundle, the coords will not be sent");
+ dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create bundle, the coords will not be sent");
return false;
}
if (!b)
{
- LOGE("Failed to create bundle, the satellites will not be sent");
+ dlog_print(DLOG_ERROR, LOG_TAG, "Failed to create bundle, the satellites will not be sent");
return false;
}
{
if (!b)
{
- LOGE("Can not send message, the bundle is NULL");
+ dlog_print(DLOG_ERROR, LOG_TAG, "Can not send message, the bundle is NULL");
return false;
}
if (ret != MESSAGE_PORT_ERROR_NONE)
{
- LOGE("Failed to send message: error %d", ret);
+ dlog_print(DLOG_ERROR, LOG_TAG, "Failed to send message: error %d", ret);
return false;
}
</script>
</body>
-</html>
\ No newline at end of file
+</html>