CCNotification on js-binding?

Hello,

I have a Java code (from android) that must call javascript function asynchronous.

How can I do that?

I know how to call java code from javascript and how to call javascript code from java (using JNI), but I don’t know how to post a notification to a class once something happens in JAVA.

For example:
On java you have connection with a server, and the server tells you that you have to increase coins by 30, how can I refresh the label “coins” without pulling the data?

CCNotifications could be my solution, but I think they don’t work on js-bindings. I’m wrong?

IIRC, NotificationCenter was not binded in JSB, because it is implemented purely on JS side,
so if you need it, you can just add that file into your JSB solution

How to jsb?

hey Jose,
Do you have a solution of iOS IAP?

just copy that file from Cocos2d-html5 to your jsb project, include it like any other js file

Hao Wu wrote:

just copy that file from Cocos2d-html5 to your jsb project, include it like any other js file

Hao Wu wrote:

just copy that file from Cocos2d-html5 to your jsb project, include it like any other js file
iOS iap 的请求需要object-c发起请求,怎么能向其他js这么jsb啊?