Qt World Summit: Register Today!

QAndroidJni - Is it possible to pass a native callback function to java class?

  • For example, Android's network service discovery manager has a method called registerService(), which the third parameter is a callback for success / fail. I see there is a way to register native methods, but I'm not sure if it is possible to do callbacks / the glue needed.

    nsdm.callObjectMethod("registerService", "(Ljava/lang/Object;ILjava/lang/some_type?;)V", nsdServiceInfo, port, my_static_cpp_method);

Log in to reply