About 199,000 results
Open links in new tab
  1. How to Call Java methods using JavaScript on Android - Cocos

    With the Cocos Creator Android build, developers can call Java static methods directly in JavaScript. Doing so is very simple: var result = jsb.reflection.callStaticMethod(className, …

  2. jsb.reflection.callStaticMethod not working - Stack Overflow

    Dec 21, 2014 · I am trying to make a call from JS to Java , following this tutorial. Here is the javascript code: var r = jsb.reflection.callStaticMethod ("org/cocos2dx/javascript/AppActivity", ...

  3. jsb.reflection.callStaticMethod调用失败,提示找不到方法怎么办…

    Jun 17, 2025 · 在使用 `jsb.reflection.callStaticMethod` 调用 Java 静态方法时,如果出现“找不到方法”的错误,通常由以下原因导致:1) 方法名拼写错误或大小写不匹配;2) 包路径或类名书写 …

  4. jsb.reflection.callStaticMethod () - java "onCreate ()" not run!

    Feb 28, 2021 · Hi, I’m trying to get GPS location from Android to JS with Creator 2.4.3 So from some tut I have been told to call java from js using jsb.reflection.callStaticMethod () From a …

  5. jsb.reflection.callStaticMethod - Programmer Sought

    jsb.reflection.callStaticMethod, Programmer Sought, the best programmer technical posts sharing site.

  6. JavaScript to Java Reflection · cocos-creator-docs

    In callStaticMethod method, we need to pass Java class name, method name, method signature and parameters, and we can get the return value from Java. The Java class name and method …

  7. Cocos Creator 2.1 Manual - JavaScript to Java Reflection

    In Cocos Creator Android build, you can call Java static methods directly in JavaScript. Its usage is very simple: var result = jsb.reflection.callStaticMethod(className, methodName, …

  8. creator-docs/java-reflection.md at v3.0 - GitHub

    In callStaticMethod method, pass the Java class name, method name, method signature with parameters, and get the return value from Java. The Java class name and method signature …

  9. Calling Ads to start using jsb.reflection - Cocos Creator - Cocos …

    Jul 12, 2023 · Javascript method to call ad : startAddBtn () { jsb.reflection.callStaticMethod ("org/cocos2dx/javascript/AppActivity", "startAd", " ()V"); does anyone know how can i call a …

  10. JavaScript and iOS/macOS Communication with Reflection

    In the native.reflection.callStaticMethod method, by passing the Objective-C class name, method name, and arguments, you can directly call the Objective-C static method and obtain the …