FORUMS
Remove All Ads from XDA
H10 Turbo

[APP] Better Keyguard 1.4 (MIUI style misuse prevention)

224 posts
Thanks Meter: 70
 
By Chillmann, Senior Member on 22nd April 2013, 10:45 PM
Post Reply Email Thread
Better Keyguard



The app is for People who dont use any security-lockscreen (like Pin, Pattern or Face unlock) and just like the fastest way to reach the homescreen after turning the device on. Many Roms allow to disable the key guard completly. So u see the homescreen right after turning on the device. But this way, unwanted misuse can happen, by accidentelly wakeing up the phone, while carrying it in your pocket.
Because of this and because iam not using a MIUI-Rom anymore (which had the very same feature), i set up a Tasker profile, which enables the proximity sensor for 1 sec, every time the display is turned on. If the sensor is not covered in that moment, nothing further will happen, if it is, the display will be turned off right away.
Later I decided to export this Profile as app via App Factory (Tasker Plugin), because I thought others would like such a feature too.

The app passed tests on my Galaxy SII (AOSP: Android 4.2.2) and on a Xperia Z (Stock Rom: Android 4.1.2) from a buddy of mine.

After Installation
1. Of course, to turn the screen off, u need to enable BK as device-admin.
2. To test: Press power button to turn off the display, keep the proximity sensor covered (usually located in right or left upper corner of the phone) while pressing the power button again to turn the display on. If its turned off again within 1 second, the test can be considered passed.
3. Note: On the Xperia Z (and some other devices), i noticed that any Lockscreen/Keyguard has to be disabled to make the App work. (It seems that the proxy sensor is not working in lockscreen)

Since Iam no programmer and the fact, that this is a Tasker-Project, my abilities for improvements or Bugfixing are very limited. Maybe some1 will pickup the idea and write a REAL app of this kind. Ofc only if the Chinese have not yet patented their MIUI-feature.

I uploaded the Tasker-Project-Files as well.

Just would like to know ur thoughts about this.


Changelog:
  • 1.0 - First release
  • 1.1 - Added a UI allowing to adjust some options (show/hide notification, try to disable built in keyguard, launch on boot: Always, Never, Remember last state)
    - Toggling the state shows now a tiny flash message
  • 1.2 - Added option to show a warning message before display goes off. If the sensor is uncovered quick enough, display will stay on and the warning message will be dismissed.
    (disadvantages: Tasker provides only 2 relevant massage types for that purpose. One can be dismissed by the back key, which is bad for devices with capacitive buttons, since these buttons are not locked while the warning message is shown. So I decided to go with the second type, which is not dismissable by the back key, but also not overlapping the status bar, so it is still expandable).
    2nd: Somehow this version is not working along with lockscreen at all. So, if you want to see a warning message before screen goes off, u need to disable any kind of lockscreen (even normal swipe).
    If you want to use it along with a lockscreen, you need to try it with Bk 1.1 or 1.0
  • 1.3 - Added an option to show the warning message over lockscreen (only if the app is working in lockscreen at all and u need to tell it, if u are using a lockscreen or not)
    Removed because of no further advantage.
  • 1.4 - Slightly reworked UI with new Szene-elements from latest Tasker version (Checkbox and Drop-down menu). This version equals 1.1 in functionality, since i thought the app was inflated too much with stuff that actually didnt work correctly. Furthermore i also used the latest version of App-Factory to create the app, since "Pent" (the dev of Tasker) released at least two updates for Tasker and the App-Factory plugin since i uploaded BK_1.2. So this one might work more reliable now.

Here the UI



Field tests revealed that a enabled keyguard (normal swipe lockscreen or whatever) prevents Bk from working properly in some cases. If Your Rom doesnt allow to disable the key guard, try the new disable built in keyguard option. If your Rom does allow it, use the native setting to disable the lockscreen rather than Bk ones.


Reuploaded the first release, becuase the file had a Tasker created filename (Better_keyguard.4.apk) and did not reflect the actual version number.


Best regards

Chillmann
The Following 11 Users Say Thank You to Chillmann For This Useful Post: [ View ] Gift Chillmann Ad-Free
 
 
26th April 2013, 12:47 PM |#2  
OP Senior Member
Thanks Meter: 70
 
More
OK 9 views so far. But i would realy appreciate a response of any kind
No matter if its "... well done, working as intended" or "... fu, its chewing up all my battery"

Please, just give a response!


Thx in advance

Chillmann
26th April 2013, 03:21 PM |#3  
aryan1312's Avatar
Senior Member
Flag Mumbai
Thanks Meter: 305
 
More
Question
i tried and test it "DO NOTHING nothing at all" jst stay @ notification saying BK is active ( i have activated system administration) probably describing how it work and what it does will be more useful some screenshot.
I am on Slimbean 4.2.2 build 4
Samsung galaxy s2 GT-I9100
The Following 2 Users Say Thank You to aryan1312 For This Useful Post: [ View ] Gift aryan1312 Ad-Free
26th April 2013, 08:34 PM |#4  
OP Senior Member
Thanks Meter: 70
 
More
Hi aryan1312,


many thx for responding!

I rewrote the introduction to better underline the app's purpose and added a "After installation" annotation with instructions of how to test the functionality.

Since the app got no menu, there would be nothing to show in a screenshot. Ill try to put a youtube video online soon, that will show what it does.

Quote:

i tried and test it "DO NOTHING nothing at all" jst stay @ notification saying BK is active ( i have activated system administration) probably

I hope u just didnt know how to test it, because u got the very same set up as i do (sgs2 on slim beam 4.2.2+dori9.14). Would be quite strange, if its not working even with same hardware + software. On my phone, i allways notice a weak red glow coming from the proximity sensor, if its active. (during a call or if a sensor related Tasker-profile is running) Maybe u watch out for that glow right after turning on the display. That would indicate the app's functionality too.


Best regards

Chillmann
The Following User Says Thank You to Chillmann For This Useful Post: [ View ] Gift Chillmann Ad-Free
27th April 2013, 10:19 AM |#5  
aryan1312's Avatar
Senior Member
Flag Mumbai
Thanks Meter: 305
 
More
Thumbs up
Quote:
Originally Posted by Chillmann

Hi aryan1312,


many thx for responding!

I rewrote the introduction to better underline the app's purpose and added a "After installation" annotation with instructions of how to test the functionality.

Since the app got no menu, there would be nothing to show in a screenshot. Ill try to put a youtube video online soon, that will show what it does.



I hope u just didnt know how to test it, because u got the very same set up as i do (sgs2 on slim beam 4.2.2+dori9.14). Would be quite strange, if its not working even with same hardware + software. On my phone, i allways notice a weak red glow coming from the proximity sensor, if its active. (during a call or if a sensor related Tasker-profile is running) Maybe u watch out for that glow right after turning on the display. That would indicate the app's functionality too.


Best regards

Chillmann

Thanks for giving the description more accurately. Now i have better understanding of how it work. previously i was using slide2wake (dori function) i think that y it is not workin, will try with power button now

Edit: Work absolutely fine, even with slide2wake and PIN lock
don't think it will affect much battery performance since it activate proximity sensor for jst 1 sec

Great work
The Following User Says Thank You to aryan1312 For This Useful Post: [ View ] Gift aryan1312 Ad-Free
1st May 2013, 12:31 AM |#6  
OP Senior Member
Thanks Meter: 70
 
More
New version uploaded, check OP


Greets

Chillmann
4th May 2013, 05:06 AM |#7  
olokos's Avatar
Recognized Developer / Recognized Contributor
Flag Warsaw
Thanks Meter: 2,477
 
Donate to Me
More
What if I have no proximity sensor? Can it work? Nah, just kidding it's a nice app but I'd really would like it if it's notification could be swiped away and if there would be a warning like in the miui because now it's more like miui idea not like a miui style. I'm still going to use this app and tell my friend which also has similar problem about this app

Sent from my R800i using xda premium
The Following User Says Thank You to olokos For This Useful Post: [ View ]
4th May 2013, 06:43 AM |#8  
olokos's Avatar
Recognized Developer / Recognized Contributor
Flag Warsaw
Thanks Meter: 2,477
 
Donate to Me
More
After I've watched a movie it suddenly stopped working... I've even relaunched it and nothing... I guess that reboot will help me.

Sent from my R800i using xda premium
5th May 2013, 06:49 PM |#9  
olokos's Avatar
Recognized Developer / Recognized Contributor
Flag Warsaw
Thanks Meter: 2,477
 
Donate to Me
More
Nope, it didn't. Actually it's not working at all now...

Sent from my R800i using xda premium
6th May 2013, 01:38 AM |#10  
OP Senior Member
Thanks Meter: 70
 
More
Hi olokos,

thx for testing!

Quote:
Originally Posted by olokos

What if I have no proximity sensor? Can it work? Nah, just kidding it's a nice app but I'd really would like it if it's notification could be swiped away and if there would be a warning like in the miui because now it's more like miui idea not like a miui style. I'm still going to use this app and tell my friend which also has similar problem about this app

Sent from my R800i using xda premium

I added a option to enable a warning message before screen goes off. To the non permanent notification, sorry but I can't see the advantage. Why not disable the notification completely?


Quote:
Originally Posted by olokos

After I've watched a movie it suddenly stopped working... I've even relaunched it and nothing... I guess that reboot will help me.

Sent from my R800i using xda premium

Quote:
Originally Posted by olokos

Nope, it didn't. Actually it's not working at all now...

Sent from my R800i using xda premium


uhm, thats really strange. At 1st I thought it was androids memory management who threw Bk out of the cache. But even not working after reboot is bad. As stated in the OP, iam no programmer, so I have neither a clue why it stopped working, nor I know how to fix it
I think it has something to do with the way, Tasker exports profiles into apps.
U can try to delete app data (if not already removed) to get it working again. But if it keeps stopping to work, deleting data is no real solution.
Iam sorry I did no long time testing prior to posting here. During quick tests I recognized, that Bk wouldn't show the option menu by pressing the app icon after Tasker performed one of its tasks. Removing Bk from recents app list did fix that. But this is completely different to ur experience.
I hope it is a very rarely occurring bug or related only to few devices. Otherwise the app would be unusable.


Hopefully

Chillmann
The Following User Says Thank You to Chillmann For This Useful Post: [ View ] Gift Chillmann Ad-Free
6th May 2013, 08:16 AM |#11  
olokos's Avatar
Recognized Developer / Recognized Contributor
Flag Warsaw
Thanks Meter: 2,477
 
Donate to Me
More
After disabling swipe unlock in JB it is working but when JB screen lock is working normally, your app is not working... I'm not using any other key lock (pattern, pin) or anything. I just have to swipe to unlock. If you are going to fix it then I promise I'll spread the word

Sent from outer space using RPG
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes