aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AndroidManifest.xml15
-rw-r--r--jni/Android.mk13
-rw-r--r--jni/Application.mk1
-rw-r--r--jni/main.c22
4 files changed, 51 insertions, 0 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
new file mode 100644
index 0000000..d2399c0
--- /dev/null
+++ b/AndroidManifest.xml
@@ -0,0 +1,15 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.arslaancodes.mokuassistant">
+
+ <uses-sdk android:minSdkVersion="9" />
+ <application android:label="moku Assistant" android:hasCode="false">
+ <activity android:name="android.app.NativeActivity">
+ <meta-data android:name="android.app.lib_name"
+ android:value="moku" />
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ </application>
+</manifest>
diff --git a/jni/Android.mk b/jni/Android.mk
new file mode 100644
index 0000000..d9fbd00
--- /dev/null
+++ b/jni/Android.mk
@@ -0,0 +1,13 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := moku
+LOCAL_SRC_FILES := main.c
+LOCAL_LDLIBS := -llog -landroid
+
+LOCAL_STATIC_LIBRARIES := android_native_app_glue
+
+include $(BUILD_SHARED_LIBRARY)
+
+$(call import-module,android/native_app_glue)
+
diff --git a/jni/Application.mk b/jni/Application.mk
new file mode 100644
index 0000000..9ddd3c4
--- /dev/null
+++ b/jni/Application.mk
@@ -0,0 +1 @@
+APP_ABI := arm64-v8a
diff --git a/jni/main.c b/jni/main.c
new file mode 100644
index 0000000..f309e64
--- /dev/null
+++ b/jni/main.c
@@ -0,0 +1,22 @@
+#include <android_native_app_glue.h>
+#include <android/log.h>
+
+void android_main(struct android_app *state) {
+ /* Declarations */
+ struct android_poll_source *source;
+ int events;
+
+ /* Code starts here */
+ app_dummy();
+
+ /* do stuff here */
+
+ while (1) {
+ if (ALooper_pollAll(-1, NULL, &events, (void**)&source) >= 0) {
+ if (source) {
+ source->process(state, source);
+ }
+ }
+ /* more stuff here */
+ }
+}