5

So, I have been exploring many similar questions across website (this, this and this and many more). People wanting to implement their own custom lock screen (not talking about widgets). So far there have been two implementation techniques which users are using.

  1. Home Screen Replacement. In this technique its suggested to create a home screen application, where after unlock logic the default screen shows up. I believe that in this situation developer has to disable Home, Search, Menu and Back button when the lock screen is visible and to implement the Screen off-on logic.

  2. An application. In this technique a normal app is made where after unlock logic the default screen shows up. I believe that in this situation developer has to disable Home, Search, Menu and Back button when the lock screen is visible and to implement the Screen off-on logic.

Now, I don't understand that what is the difference between two approaches? StackOverflow community seems to stress more on the home screen replacement technique. I am very new to Android development so I might be missing some aspect about it. Please suggest that which approach should I use and why? (also, which is easy?).

Thanks so much!

1 Answer 1

2

I would use the first method, but only for usability reasons. Because it gives the user a choice to easily revert back to the original homescreen/lockscreen if he chooses not to make the new one a default choice yet.

I'm afraid both strategies you described are quite difficult (depending on the api level range you want it to work on). The difficulty is not in their difference, the difficulty is in overriding the buttons (as Google makes it more difficult by closing down security loopholes for the newer api levels).

PS: Please note that Jellybean has a new Daydream functionality. If customizing the lockscreen is all you need. That may be the way to go since Jellybean is much more secure in that respect and more difficult to work with than the previous api levels otherwise.

Also, consider using the HTC screenlock api for HTC devices. This way, your solution won't be too hacky at least for their newer devices. And perhaps, do a version for rooted devices as well, since that too should be easy, for users who already have obtained root on their device. Don't discount the rooted market, users with root access do spend a disproportionate amount of money on applications in Google Play. That much is obvious if you just take a look at some of the rough numbers of downloads for paid applications that say (for root only) that Google Play gives you.

7
  • Thanks. I just installed the "Home" sample application which comes with the SDK. Once I installed and clicked to use "always". I had to do the Factory re-set because the Manage Apps-> Restore default settings option wasn't accessible anymore. But I see what you are saying. Apart from this aspect do you see any other bottlenecks? Like performance? Apr 17, 2013 at 0:30
  • I can't speak to the performance. I can only say that it will be a headache to maintain since you'll have to use lots of tricks to make it work, and those tricks may stop working when your users receive new OS updates. Apr 17, 2013 at 0:34
  • Actually, there was probably no need to do a factory reset, you could have probably triggered the dialog again by installing a new homescreen from Google Play, and/or perhaps you could have removed the application directly with adb. Apr 17, 2013 at 0:39
  • Thanks. I think by Jellybean feature you mean the widgets on Lockscreen? Also, at this point I don't want to be HTC specific. The trick part is important. Do you think the tricks I will use for the application will be different from the home-app approach? If yes, what would be the main difference? If no, then it will break for both the approaches, right? Thanks again for quick help. Apr 17, 2013 at 0:41
  • No, I think you'll have to use the same tricks for both approaches. Apr 17, 2013 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.