Cocos2dx Android Live Wallpaper

Hi, I am working on Android Live Wallpaper using cocos2dx, I have successfully managed to display the live wallpaper, but i am facing issue with touch. The touch related methods like ccTouchBegan, ccTouchMoved are not getting called on Android. On win32 i am getting the touch callback but not on Android. Can anybody tell me the solution for that.
For Live wallpaper i have made some changes in .java class. I am attaching the java class.
Any help will be appreciated.


MyClass.java.zip (2.1 KB)

Anybody?

try to add

`Override
public void onCreate(SurfaceHolder surfaceHolder)
{
super.onCreate(surfaceHolder);

        *setTouchEventsEnabled(true);*

        mGLSurfaceView = new MyGLSurfaceView(wallpaperTest.this);
        mGLSurfaceView.setEGLConfigChooser(8, 8, 8, 8, 16, 0);
        //mGLSurfaceView.setCocos2dxRenderer(new Cocos2dxRenderer());
        setRenderer(getNewRenderer());
        Cocos2dxHelper.init(wallpaperTest.this, this);
    }
  •    `Override
    

public void onTouchEvent(MotionEvent event) {

Log.d(“TOUCH”, “I HAVE TOUCH”);

super.onTouchEvent(event);

mGLSurfaceView.onTouchEvent(event);
}*

It works for me :slight_smile: