Search code examples
androidscreensaver

Creating a screensaver in Android


Is it poosible to program a screensaver for a android (not lock screen)?

I am looking for a tutorial on programming a screen saver. The screen saver will activate as the user does nothing more. If the user touches the screen, the screensaver will disappear. Is this possible?


Solution

  • You can receive ACTION_SCREEN_OFF in your App with a BroadcastReceiver.In the onReceive method of this BroadcastReceiver, start an activity as the screensaver.And you can register a listener for touch events and when this event occured,finish your App.