开发者

How to make unlock screen app for Android

I am trying to develop unlock screen app for Android. I have downloaded some unlock screen app and tested. I finally found one app. That is Fingerprint Screensaver . It is what I exactly want. I mean I wish to replace the pattern unlock screen app. I am wandering how to replace the Android pattern unlock screen app.

I have googled a lot, but I could not find how to do it. Somebody wro开发者_运维百科te it is a hack. Even the Android does not support, I strongly wish to know how to do that.

If someone knows about it, please give me a clue. Thanks in advance a lot.

Thanks.


You can create a custom unlock screen by adding the following intent filter to the AndroidManifest.xml file for your Activity:

<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>

This is a hack because a dialog box will pop up asking the user which one he wants to use (yours or the default). Worse, if the user accidentally selects your lock screen as the default home screen in the chooser, they could seriously mess up their device. They might end up having to do a factory reset.

The only safe way to create a custom lockscreen is to modify the Android platform itself. This is how OEM skins like HTC Sense or Motoblur create custom lock screens.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜