ThrowMsg(WrtDeviceApis::Commons::PlatformException, "no type request type");
}
- int pid = appsvc_run_service(passData, reqId, sqldataControlCommonCallback, (void*)NULL);
+ int pid = 0;
+
+ for (int index = 0; index < 3; index++)
+ {
+ pid = appsvc_run_service(passData, reqId, sqldataControlCommonCallback, (void*)NULL);
+
+ if (pid >= 0)
+ break;
+
+ usleep(300 * 1000);
+ LoggerD("Launch Retry" << (index + 1));
+ }
+
if (pid < 0)
{
auto cellularOn = true;
void* connectionHandle;
if (CONNECTION_ERROR_NONE == connection_create(&connectionHandle)) {
- connection_type_e connectionType;
- if (CONNECTION_ERROR_NONE == connection_get_type(connectionHandle,
- &connectionType)) {
- if (CONNECTION_TYPE_CELLULAR != connectionType) {
+ connection_cellular_state_e cellularState;
+ if (CONNECTION_ERROR_NONE == connection_get_cellular_state (connectionHandle,
+ &cellularState)) {
+ if (CONNECTION_CELLULAR_STATE_OUT_OF_SERVICE == cellularState || CONNECTION_CELLULAR_STATE_FLIGHT_MODE == cellularState) {
cellularOn = false;
- LoggerW("Cellular connection is not active. GSM features off.");
+ LoggerW("Cellular State Error" << cellularState);
}
} else {
LoggerE("Can't obtain state of cellular connection");