main-executable: add '-e' cmdline option

Some multi-platform apps accept cmdline options using the `-e` option
of `am`. For example, you can now use `-e unity='<unity cmdline>'`
to pass cmdline arguments to a unity game.
This commit is contained in:
Mis012
2024-05-22 12:24:11 +02:00
parent 14e870c9b5
commit 54dd61da3d
3 changed files with 40 additions and 1 deletions

View File

@@ -157,6 +157,9 @@ void set_up_handle_cache(JNIEnv *env)
handle_cache.drawable.class = _REF((*env)->FindClass(env, "android/graphics/drawable/Drawable"));
handle_cache.drawable.draw = _METHOD(handle_cache.drawable.class, "draw", "(Landroid/graphics/Canvas;)V");
handle_cache.drawable.setBounds = _METHOD(handle_cache.drawable.class, "setBounds", "(IIII)V");
handle_cache.intent.class = _REF((*env)->FindClass(env, "android/content/Intent"));
handle_cache.intent.putExtraCharSequence = _METHOD(handle_cache.intent.class, "putExtra", "(Ljava/lang/String;Ljava/lang/CharSequence;)Landroid/content/Intent;");
}
void extract_from_apk(const char *path, const char *target) {