how to use android dialog in cocos2d-x


#1

Hi!everyonehow to do!


#2

As I know, to use native interfaces and controls you should use NDKHelper class.


#3

You can use CCMessageBox which wraps the native dialog, but it’s not directly going to let you use Android Dialog.

The direct way to do this is to add a JNI invocation and call a Java method from C++ and create your AlertDialog in the Java code.


#4

Zapp Zappescu wrote:

As I know, to use native interfaces and controls you should use NDKHelper class.

I have done it!!thank you!


#5

Hello, Jie zhang!
I am in nightmare of using JNI and NDKHelper class.
Could you explain how to fix your problem?
Thanks.