I am looking for a sample code on Android Screen Saver. I tried google but hard to find any useful result. Does anyone have any good samples on that?
What I saw is Custom Android Screensaver (or sleep screen)
If you mean creating your own lock screen, there is no provision for this in the Android SDK
But I do not understand on this, as I saw there are so many screen saver application example in Android Market.
To enable Screen saver, drag down from the top of your device's screen and tap the gear icon. On the “Settings” screen, tap “Display” in the “Device” section. Then, tap “Screen saver” on the “Display” screen. To turn on the “Screen saver“, tap the slider button on the right side of the screen.
Are you really talking about a screensaver? Or a custom lock screen?
The custom lock screens for OEM skins like HTC Sense and Motoblur are done by modifying the Android platform itself.
There are some custom lock screens available in the market as well. To achieve this, you need to add the following intent filter to the AndroidManifest.xml
file for the Activity
you want to use as a lock screen:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Doing it this way is a hack because a dialog box will pop up asking the user which one he wants to use (yours or the default). Lock 2.0 is an example of a custom lock screen that works this way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With