Third Party Widgets on Android 4.2 Lock Screen


One of the features I was really looking forward to with Android 4.2 was lock screen widgets but when I got the update on my Galaxy Nexus that it only had 5 pre-defined stock widgets that could be added to the lock screen.

I headed over to the Android developers site some time later and was pleasantly surprised to see that actually 3rd party widgets can indeed be added to the lock screen. They just need a small change for this. They need to add “android:widgetCategory=“keyguard|home_screen”” parameter to your xml where the appwidget provider element is defined. Simple enough :)

If you are the one who doesn’t like to wait, you could even change your favorite app’s manifest to allow the widget to be added. There are a few more details if you’d like to get into the nitty gritty which can be read from over here: http://developer.android.com/guide/topics/appwidgets/index.html


See also