I am trying to figure out if there is any mechanism to detect when a user clicks on Set Wallpaper or presses Back in the preview screen or if they pressed the back button. I have looked at the Wallpaper Service Engine and the only change I can make use of is to detect whether the user is in preview mode or not
I am wondering if anyone else ran it to this issue? Thanks in advance for your help: Here is a simple wallpaper engine that logs few events
@Override
public void onCreate(SurfaceHolder surfaceHolder) {
super.onCreate(surfaceHolder);
Log.d(TAG, "onCreate");
Log.d(TAG, "isPreview ... " + isPreview());
}
@Override
public void onSurfaceCreated(SurfaceHolder surfaceHolder) {
Log.d(TAG, "onSurfaceCreated");
}
@Override
public void onVisibilityChanged(boolean isVisible) {
Log.d(TAG, "onVisibilityChanged .." + isVisible);
}
@Override
public void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) {
Log.d(TAG, "onSurfaceChanged");
}
@Override
public void onSurfaceRedrawNeeded(SurfaceHolder surfaceHolder) {
Log.d(TAG, "onSurfaceRedrawNeeded");
}
@Override
public void onSurfaceDestroyed(SurfaceHolder surfaceHolder) {
Log.d(TAG, "onSurfaceDestroyed");
}
@Override
public void onDestroy() {
super.onDestroy();
Log.d(TAG, "onDestroy");
}