add JS and JAVA reflection test tips for AppActivity.java

This commit is contained in:
knoxHuang
2016-06-13 18:06:18 +08:00
parent fb6d6d7b8a
commit 048266e40b
5 changed files with 21 additions and 1 deletions
@@ -33,8 +33,11 @@ import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.Bundle;
import android.view.WindowManager;
// For JS and JAVA reflection test, you can delete it if it's your own project
import android.app.AlertDialog;
import android.content.DialogInterface;
// -------------------------------------
// The name of .so is specified in AndroidMenifest.xml. NativityActivity will load it automatically for you.
// You can use "System.loadLibrary()" to load other .so files.
@@ -76,7 +79,8 @@ public class AppActivity extends Cocos2dxActivity{
}
private static native boolean nativeIsDebug();
// For JS and JAVA reflection test, you can delete it if it's your own project
public static void showAlertDialog(final String title,final String message) {
// Here be sure to use runOnUiThread
app.runOnUiThread(new Runnable() {