RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_RhodesApplication_createRhodesApp (JNIEnv *env, jclass) { // Start Rhodes application rho_rhodesapp_create(rho_native_rhopath()); RHODESAPP().setNetworkStatusMonitor(s_network_status_monitor); }
RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_RhodesApplication_createRhodesApp (JNIEnv *env, jclass) { android_setup(env); if (!set_capabilities(env)) { RAWLOG_ERROR("Capabilities setup failed"); return; } // Start Rhodes application rho_rhodesapp_create(rho_native_rhopath()); }
RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_RhodesService_createRhodesApp (JNIEnv *env, jobject) { jclass clsRE = getJNIClass(RHODES_JAVA_CLASS_RUNTIME_EXCEPTION); if (!clsRE) return; struct rlimit rlim; if (getrlimit(RLIMIT_NOFILE, &rlim) == -1) { env->ThrowNew(clsRE, "Can not get maximum number of open files"); return; } if (rlim.rlim_max < (unsigned long)RHO_FD_BASE) { env->ThrowNew(clsRE, "Current limit of open files is less then RHO_FD_BASE"); return; } if (rlim.rlim_cur > (unsigned long)RHO_FD_BASE) { rlim.rlim_cur = RHO_FD_BASE; rlim.rlim_max = RHO_FD_BASE; if (setrlimit(RLIMIT_NOFILE, &rlim) == -1) { env->ThrowNew(clsRE, "Can not set maximum number of open files"); return; } } if (!set_capabilities(env)) return; // Init SQLite temp directory sqlite3_temp_directory = (char*)g_sqlite_journals_path.c_str(); const char* szRootPath = rho_native_rhopath(); // Init logconf rho_logconf_Init(szRootPath); // Disable log to stdout as on android all stdout redirects to /dev/null RHOCONF().setBool("LogToOutput", false); RHOCONF().saveToFile(); LOGCONF().setLogToOutput(false); // Add android system log sink LOGCONF().setLogView(rho::common::g_androidLogSink); // Start Rhodes application rho_rhodesapp_create(szRootPath); }
RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_Rhodes_createRhodesApp (JNIEnv *env, jobject, jstring path) { g_rootPath = rho_cast<std::string>(path); // Init SQLite temp directory sqlite3_temp_directory = (char*)"/sqlite_stmt_journals"; const char* szRootPath = rho_native_rhopath(); // Init logconf rho_logconf_Init(szRootPath); // Disable log to stdout as on android all stdout redirects to /dev/null RHOCONF().setBool("LogToOutput", false); RHOCONF().saveToFile(); LOGCONF().setLogToOutput(false); // Add android system log sink LOGCONF().setLogView(rho::common::g_androidLogSink); // Start Rhodes application rho_rhodesapp_create(szRootPath); }
RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_RhodesApplication_createRhodesApp (JNIEnv *env, jclass) { // Start Rhodes application rho_rhodesapp_create(rho_native_rhopath()); }