Is there a way to change the lock screen in Android programmatically? If yes, is it possible to create an animation within that view?
-
Android Jelly Bean adds support for lock screen widgets. Beyond those I don't know whether you can access it. – harism Jan 10 '13 at 18:26
-
2See..http://stackoverflow.com/questions/2653954/how-to-set-android-lock-screen-image – ridoy Jan 10 '13 at 18:29
-
I mean, there are several apps which work like "Lock Screen". For example MagicLocker Main and Go Locker. How they achieve that? – Carlos Jan 12 '13 at 14:38
2 Answers
Is there a way to change the lock screen in Android programmatically?
No, because there is only one lock screen. On Android 4.2, the user can add app widgets to the lock screen, if the user chooses. You can elect to create an app widget that can be added to the lock screen.
If yes, is it possible to create an animation within that view?
Generally, no. App widgets are not normally animated.

- 986,068
- 189
- 2,389
- 2,491
android doesn't officially supports it with a nice API , but there are some solutions for this problem . the best one that i can think of and that will work perfectly on all devices and android versions is this :
you can make an app that functions as a launcher , and ask the user to disable the lock screen.
this way , when the screen is turned off&on , your app will be able to be shown and do whatever it needs .
each time the app is being unlocked , it will send the intent of the home button to the real launcher the user has chosen .
of course , there are other solutions , but as i've tried , all of them have some kind of problem on some android devices and versions . they work by listening to the power off intent , and block the home button by using a flaw they've found in the android source code . you can never assume that it will work on all devices and android versions .
example of such apps are "widgetLocker" and "Picture Password Lockscreen"

- 114,585
- 152
- 739
- 1,270