diff --git a/Android/app/src/main/cpp/native.cpp b/Android/app/src/main/cpp/native.cpp index 986634ee..835381bf 100644 --- a/Android/app/src/main/cpp/native.cpp +++ b/Android/app/src/main/cpp/native.cpp @@ -74,58 +74,18 @@ string cppExec(const char *cmd) { extern "C" JNIEXPORT jstring JNICALL -Java_com_dergoogler_mmrl_Lib_test(JNIEnv *env, jclass clazz) { - string hello = "Hello from C++"; - return env->NewStringUTF(hello.c_str()); -} - -extern "C" -JNIEXPORT jstring JNICALL -Java_com_dergoogler_mmrl_Lib_baseUrl(JNIEnv *env, jclass clazz) { - string result = "file:///android_asset/"; - return env->NewStringUTF(result.c_str()); -} - -extern "C" -JNIEXPORT jstring JNICALL -Java_com_dergoogler_mmrl_Lib_interfaceName(JNIEnv *env, jclass clazz) { - string result = "android"; - return env->NewStringUTF(result.c_str()); -} - -extern "C" -JNIEXPORT jstring JNICALL -Java_com_dergoogler_mmrl_Lib_getStorageKey(JNIEnv *env, jclass clazz) { - string result = "localstorage"; - return env->NewStringUTF(result.c_str()); -} - -extern "C" -JNIEXPORT jstring JNICALL -Java_com_dergoogler_mmrl_Lib_getUserAgent(JNIEnv *env, jclass clazz) { - string result = "MMRL"; - return env->NewStringUTF(result.c_str()); -} - -extern "C" -JNIEXPORT jstring JNICALL -Java_com_dergoogler_mmrl_Lib_pageContent(JNIEnv *env, jclass clazz, jstring cssInject) { +Java_com_dergoogler_components_ModuleView_pageContent(JNIEnv *env, jclass clazz, + jstring cssInject) { string doctype = R"()"; string htmlStart = R"()"; string headStart = R"()"; string styleVendor = R"()"; string styleApp = R"()"; string meta = R"()"; - string cssInject1 = R"()"; - string cssInjectResult = - cssInject1 + cssInject2 + cssInject3 + cssInject4 + cssInject5 + cssInject6 + - cssInject7; + string cssInject1 = R"()"; + string cssInjectResult = cssInject1 + cssInject2 + cssInject3; string headEnd = R"()"; string bodyStart = R"()"; string app = R"()"; diff --git a/Android/app/src/main/java/com/dergoogler/components/ModuleView.java b/Android/app/src/main/java/com/dergoogler/components/ModuleView.java index 0c406a7a..28cfb3f5 100644 --- a/Android/app/src/main/java/com/dergoogler/components/ModuleView.java +++ b/Android/app/src/main/java/com/dergoogler/components/ModuleView.java @@ -20,6 +20,15 @@ public class ModuleView extends WebView { private final WebSettings webSettings; + static { + System.loadLibrary("native-lib"); + } + /** + * Returns the html page to load. This is to prevent js injection though the html page with