src/utilities.cpp
void SendKeypressEventToAndroid(int android_key_code) {
  jobject activity = AndroidGetActivity(true);
  if (!activity)
    return;
  JNIEnv *env = AndroidGetJNIEnv();
  jclass fpl_class = env->GetObjectClass(activity);
  jmethodID method_id =
      env->GetMethodID(fpl_class, "SendKeypressEventToAndroid", "(I)V");
  env->CallVoidMethod(activity, method_id, android_key_code);
  env->DeleteLocalRef(fpl_class);
  env->DeleteLocalRef(activity);
}
// Sends a keypress event to the android system.  This will show up in android
// indistinguishable from a normal user key press
Sends a keypress event to the android system.  This will show up in android
indistinguishable from a normal user key press
Sends a keypress event to the android system . This will show up in android indistinguishable from a normal user key press
void SendKeypressEventToAndroid(int android_key_code) {
  jobject activity = AndroidGetActivity(true);
  if (!activity)
    return;
  JNIEnv *env = AndroidGetJNIEnv();
  jclass fpl_class = env->GetObjectClass(activity);
  jmethodID method_id =
      env->GetMethodID(fpl_class, "SendKeypressEventToAndroid", "(I)V");
  env->CallVoidMethod(activity, method_id, android_key_code);
  env->DeleteLocalRef(fpl_class);
  env->DeleteLocalRef(activity);
}
void SendKeypressEventToAndroid ( int android_key_code ) { jobject activity = AndroidGetActivity ( true ) ; if ( ! activity ) return ; JNIEnv * env = AndroidGetJNIEnv ( ) ; jclass fpl_class = env -> GetObjectClass ( activity ) ; jmethodID method_id = env -> GetMethodID ( fpl_class , " " , " " ) ; env -> CallVoidMethod ( activity , method_id , android_key_code ) ; env -> DeleteLocalRef ( fpl_class ) ; env -> DeleteLocalRef ( activity ) ; }
Sends a keypress event to the android system.
Sends a keypress event to the android system .