}
JNIEXPORT void JNICALL
-Java_org_navitproject_navit_Navit_NavitMain( JNIEnv* env, jobject thiz, jobject activity, jobject lang, int version, jobject display_density_string)
+Java_org_navitproject_navit_Navit_NavitMain( JNIEnv* env, jobject thiz, jobject activity, jobject lang, int version, jobject display_density_string, jobject path)
{
- char *strings[]={"/data/data/org.navitproject.navit/bin/navit",NULL};
+ char *strings[]={NULL,NULL};
const char *langstr;
const char *displaydensitystr;
android_version=version;
dbg(0,"*****displaydensity=%s\n",displaydensitystr);
setenv("ANDROID_DENSITY",displaydensitystr,1);
(*env)->ReleaseStringUTFChars(env, display_density_string, displaydensitystr);
+ strings[0]=(*env)->GetStringUTFChars(env, path, NULL);
main_real(1, strings);
+ (*env)->ReleaseStringUTFChars(env, path, strings[0]);
+
}
JNIEXPORT void JNICALL
// --> dont use!! NavitMain(this, langu, android.os.Build.VERSION.SDK_INT);\r
Log.e("Navit", "android.os.Build.VERSION.SDK_INT="\r
+ Integer.valueOf(android.os.Build.VERSION.SDK));\r
- NavitMain(this, langu, Integer.valueOf(android.os.Build.VERSION.SDK), my_display_density);\r
+ NavitMain(this, langu, Integer.valueOf(android.os.Build.VERSION.SDK), my_display_density, NAVIT_DATA_DIR+"/bin/navit");\r
// CAUTION: don't use android.os.Build.VERSION.SDK_INT if <uses-sdk android:minSdkVersion="3" />\r
// You will get exception on all devices with Android 1.5 and lower\r
// because Build.VERSION.SDK_INT is since SDK 4 (Donut 1.6)\r