Create custom lockscreen for android 4.0 or above?
Asked Answered
B

1

25

I want to create custom lockScreen for android 4.0 and above, I have tried widget to create lockscreen but it supports only android 4.2.

Is there any other way to create custom android lockScreen?

Beloved answered 4/6, 2013 at 6:20 Comment(4)
you can't create because you can't disable home button function in android 4.0 and above! if see any lock screen app it's not disable home button in google playshopPauper
in 4.2 there are widgets you can create Home screen widgets or lockscreen widgets bt widgets only support android 4.2Beloved
yes you can do only android 4.2 and abovePauper
You may check my answer, I think will help you achieve what you want https://mcmap.net/q/83490/-creating-custom-lockscreen-in-android-closedNeron
D
57

I have found snippets somewhere on internet few months ago, I have made changes and recently uploaded the working demo on my github account, You can have a look at this

Note: It will disable "hardware" home button.

I hope it will be helpfull !!

Screenshots:

It provides lockscreen in API 8 or above.

Initial

Alt text

Locked

Alt text

Unlocked

Alt text

Damarisdamarra answered 4/6, 2013 at 7:51 Comment(15)
@Mehul Joisar +1 from me...i have used ur code..and it works perfectly but unfortunately it is not possible to do it for ICS and above....is that any other way...?Flaring
@Indiandroid:yes,there is no work around for ICS+. you can try to handle Home button click programmatically but it is not recommended.Damarisdamarra
@Mehul Joisar u r right..so i can't make it...:( but what about the applications which r on play for example-play.google.com/store/apps/…Flaring
@Indiandroid: that is launcher application.we can create our custom launcher application like others,but we can't create just lockscreen application easily by excluding launcher.Damarisdamarra
I wanted to point out that the application does not replace the default lock screen of Android (API level 18). When the screen is unlocked using this application, the phone displays the default lock screen. Any workaround that?Rainbolt
Yes Bhoot, you are right i am also using this code but i am not able to unlock the default screen.Soonsooner
@MehulJoisar i made an app and then integrated your lockscreen app into my app, its working fine but the problem is whenever i start the app it starts the lock screen. I want the app to be started whenever i start the app and the lock screen to be run in the background plus the android lock screen appears first and then my lock screen. Is there any solution to both the problemsOssy
@SagarDevanga: Unfortunately, it won't work in your case as it relies upon ACTION_SCREEN_ON and ACTION_SCREEN_OFF flags only.Damarisdamarra
@MehulJoisar which one of the two problems wont work Getting Different Screens for App and LOCKSCREEN or Placing the lockscreen before the android lockscreenOssy
one problem is solved using the below link, @MehulJoisar could you just help me out with the other one #3629679Ossy
@MehulJoisar Thanks for your lock screen app code. Its easy to understand and helped a lot. But when i click on home button the lock screen is closed. Is there any way to keep the lock screen alive even after home button is pressed. You may take ZUI locker for example. Please help. Thanks in advance.Runyan
@Redone: checkout this if it can help you out.Damarisdamarra
@MehulJoisar Thanks Mehul but its only for hardware buttons.Runyan
@Redone: Infact, It is anti-pattern and discouraged to disable home button. Whatever you solution you can find is nothing but the workaround.Damarisdamarra
It only disables the home button while the app is up right? It doesn't totally take away the functionality?Kierkegaard

© 2022 - 2024 — McMap. All rights reserved.