package com.growthpush.cocos2dx;

import org.cocos2dx.lib.Cocos2dxGLSurfaceView;

import com.growthpush.bridge.ExternalFrameworkBridge;

public class Cocos2dxBridge extends ExternalFrameworkBridge {

	@Override
	protected void callbackExternalFramework(final String customFiled) {
		Cocos2dxGLSurfaceView.getInstance().queueEvent(new Runnable() {
			@Override
			public void run() {
				didOpenRemoteNotification(customFiled);
			}
		});
	}

	/*
	 * Remote notification callback method (JNI interface)
	 * 
	 * @param json json string
	 */
	static native void didOpenRemoteNotification(String json);

}

@@ -75,16 +75,78 @@
 eView;%0A%0A
+import android.os.Handler;%0A%0Aimport com.growthpush.GrowthPush;%0A
 import c
@@ -191,16 +191,16 @@
 Bridge;%0A
-
 %0Apublic 
@@ -336,16 +336,226 @@
 iled) %7B%0A
+%0A%09%09if (GrowthPush.getInstance().getApplicationId() == 0) %7B%0A%09%09%09new Handler().post(new Runnable() %7B%0A%09%09%09%09@Override%0A%09%09%09%09public void run() %7B%0A%09%09%09%09%09callbackExternalFramework(customFiled);%0A%09%09%09%09%7D%0A%09%09%09%7D);%0A%09%09%09return;%0A%09%09%7D%0A%0A
 %09%09Cocos2
@@ -697,22 +697,23 @@
 );%0A%09%09%09%7D%0A
-
 %09%09%7D);%0A
+%0A
 %09%7D%0A%0A%09/*%0A

Send callback custom field after Growth Push initialized instance