How can I display a custom android dialog(with custom layout) in Cocos2dxActivity ? I tried calling a method through JNI in which I created a Dialog, set its layout and displayed it.
public void displayDialog()
{
Dialog d=new Dialog(this);
d.setContectView(R.layout.myDialog);
d.show();
}
It gives me this error
08-21 14:34:08.045: E/AndroidRuntime(2675): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()