How to implement double tap for Android live wallpapers?
I want to implement a double tap event for a Android live wallpaper. Sadly, I couldn´t find any specific code how to do that. At the moment I´ve found a workarround using the onTouchEvent-method of the Engine-class: public void onTouchEvent(MotionEvent event) { long time = android.os.SystemClock.currentThreadTimeMillis(); if(((time - mLastTouchTime) < 500) && ((time - mLastTouchTime) > 100)) { if(!mIsPlayed && mSound) { mIsPlayed = true; int sound = R.raw.hell; if(mTheme.equals("rose")) sound = R.raw.rose; if(mTheme.equals("greed")) sound = R.raw.greed; MediaPlayer mp = MediaPlayer.create