yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Alanon:
[MENTION=2584205]Flyview[/MENTION]: I've been playing around with the pro settings and I have a question. It seems that you use the device's timeout range? My minimal display timeout is a whopping 15 seconds, and setting anything less in the app actually prolongs the screen timeout to something between 20-25 seconds. I believe the warning displayed in the app is due to this situation?

I currently have it set to the minimal working one, but still, it would be nice to have the 10, or even 8 seconds working. Is there a way to go around this, maybe with a device administrator permission? That way, if you don't want it, everything remains as is, but if you need it, you can achieve full timeout range on any device using the app?

Cheers!
[Android Apps and Games] Flyview:
What the minimum setting in the Android settings is shouldn't make a difference. On stock Android 6 mine shows 15s, but KS is still able to reduce the timeout since last touch to 10s. It's able to go even shorter, as long as you haven't touched the screen in 10s. It certainly shouldn't be adding on to the system timeout. Can you use a watch and actually time things out? Try this. Set KS to 10s timeout. Turn screen off. Turn screen on and unlock. Note time when you unlocked then start counting. How long does it take to time out?
[Android Apps and Games] Alanon:
I counted aloud the first few times before posting to make sure, but it seems I was a little too fast. Anything under 15 seconds (I tried 14, 10 and 5, each time using the procedure you described) takes 29-30 seconds to turn off the screen. 15 seconds takes exactly 15 seconds to switch off. I turned off all the proximity sensor features and all the keep screen on additional commands so as not to accidentally brush off of the sensor or somehow taint the measurements. Everything was measured with an analog stopwatch from the moment I placed the unlocked phone on a flat surface.

I also did some poking in the system settings. It seems that for any setting other than 15 seconds, the OS defaults the screen timeout to 30 (at least that's what gets written in the display settings). The setting to shut the screen off if it has been on for an X amount of minutes overrides that timeout, and always displays that set number of minutes. However, that doesn't help things, since the 15-30 step is always in play, and KinScreen can't seem to bypass it. I also took the time to check the lockscreen timeout values. I measured the timeouts at 5, 20 and 30 seconds, and while the 5 seconds one took a little longer (as expected, close to 10 seconds), the others worked as advertised. I'm running a fresh LG 5.0.1 Lollipop, which is pretty much near stock, except the tweaks LG placed in, like the knock code and stuff. Do you think that might be messing with the app?
[Android Apps and Games] bellzebu:
Hi Flyview,

I would like to contribute to this great application translating to Spanish / Castilian.

Have you thought about using a localization project management tool like crowdin, getlocalization or similar? It would be better and easier for everyone to help in translations.

Cheers.
[Android Apps and Games] Flyview:
That sucks. I guess your phone won't accept anything in between 15-30s. There's not much I can do short of using device admin API to shut the screen off exactly at the time I want. However, I don't like that approach for two reasons. One is it requires teaching the user about device admin, not being able to uninstall, etc. And the second reason is it also locks the phone, you can't just turn the screen off. I doubt the double knock to wake is causing issues but you never know!

That would be nice, please send an email to teqtic@gmail.com. I have but last I checked they were all paid services and it's not worth it right now.
[Android Apps and Games] Flyview:
3.2.0 final is published!

3.2.0 (April 29, 2016)

-Added ability to turn screen on by waving over proximity sensor!

-Added time exception for turning screen on by proximity to save battery

-Added back the ability to change lockscreen timeout

-Angle detection now works on devices without a gyroscope!

-Fixed grayed out options when they shouldn't be

-Fixed translations not applying to buttons

-Added German translation

-Added Dutch translation, thanks Michiel!

-Added Serbian, Croatian, Bosnian translations, thanks Alanon!
[Android Apps and Games] MacDoof:
Here with Option turn on with sensor
[Android Apps and Games] Flyview:
And it starts sleeping as soon as you disable the option? What does GSAM show for KinScreen? It's possible on your device that the system keeps the phone awake whenever the proximity sensor is in use. KS is definitely not holding a wakelock. On my Nexus 5 it's able to sleep while keeping the proximity sensor on.
[Android Apps and Games] MacDoof:
GSam say 0,1%for your APP, verry good. Seems its a fault oft system. When i untick the display on Option everything is fine. Any idea i can do?

Oh, with gravity screen the deep sleep is OK. There musst be somthing wrong. Maybe with my phone?
[Android Apps and Games] Flyview:
Well if Gravity Screen can do it, then it's definitely possible. Are you 100% sure this same turn-on-by-proximity feature works with GravityScreen on your device without causing the deep sleep problem?

Can you find what exactly is causing the wakelock? You can try with BetterBatteryStats.
[Android Apps and Games] Flyview:
Posted a small update today with 3 new translations. Thanks again guys. If anyone else wants to provide translations, you will get a free upgrade code to premium.

3.2.1 (May 12, 2016)

-Added Spanish translations (Thanks Victor!)

-Added Turkish translations (Thanks Özgün!)

-Added Polish translations (Thanks Tomasz!)
[Android Apps and Games] bellzebu:
Good news, great app!!
[Android Apps and Games] techdog:
Hi!

I love Kinscreen. It is a great application and you have done a great job.

I have been having intermittent issues with the app and I have finally been able to narrow down the behavior that causes the issue. The issue is that the phone hangs and I can't wake it up. I have to reboot.

Here is what I have found that causes this behavior:

1) Let the phone boot and kinscreen starts.

2) Open an app, like GMail, let the display time out.

3) Wake up phone, unlock, and hold phone through 1 cycle of kinscreen keeping phone awake.

4) Place phone down and let display time out.

5) Phone is hung.

My kinscreen configuration is:

Keep Screen On:

- By Motion

- While tilted up more than 20 degrees

Turn Screen Off:

- 20 sec after last kept on

- 10 sec after last kept on while on lockscreen

- 10 sec after covering proximity sensor

Notification priority: minimum

I have a Samsung Galaxy S3 running Vanir nightly 040716 with the dkp 6.x kernel.

I have attached a logcat.

Edit: The issue does not occur when on the home screen (which uses live wallpaper).

Edit: I was able to get around the issue by setting the screen timeout to 10 sec from 20 sec. This is lower than the minimum display timeout on the OS. This seems to solve the issue.

Thanks

Techdog
[Android Apps and Games] TNSMANI:
If all of us report issues like you have done, the Dev's work would be greatly reduced and our issues also solved that much quicker.

Kudos!
[Android Apps and Games] Flyview:
Hey, thanks for the detailed report. I don't think your issue is due to KinScreen. That log is packed full of errors but none of them seem to be from KinScreen. Can you replicate the hang every time? Can you try and replicate the same thing with KinScreen disabled? It looks like you're running a custom ROM and Xposed so I'm going to guess your issue is coming from there. Even if KS was crashing, a non-system app shouldn't be able to hang the entire phone.
[Android Apps and Games] Flyview:
I just published an update to the beta channels (Play and XDA Labs):

3.2.2 - Beta 1

-Fall back on accelerometer for tilt angle if no gravity or rotation sensor available

-Fixed proximity sensor remaining on while on lockscreen even without "keep-on features active on lockscreen"

-Don't show proximity status with only turn-on by proximity selected (would never see it)

-Added Chinese translation (thanks Mark!)
[Android Apps and Games] TNSMANI:
In my N4, occasionally I face the issue of the motion sensor (don't know whether it is gravity or rotation sensor or anything else) freezing, with the result that my tilt setting in KinScreen will not work. A reboot would solve the problem.

Now as per the above beta, I think that such freezes will not affect me since the app will use the other sensors. Am I right or this beta is only to take care of the scenario where there is no gravity or rotation sensor at all?
[Android Apps and Games] Flyview:
The latter is correct, beta only uses accelerometer if no gravity/rotation sensor. How often do you have your angle freeze? Does motion continue to work? If the angle freezes that's likely your gravity sensor. When this happens, can you check SensorKinetics app and see if it's also frozen there? Does a service restart fix it or only a reboot? If it's only a reboot that fixes it it's likely a phone/ROM issue.
[Android Apps and Games] TNSMANI:
Thankfully, the freezes are occasional. I had reported this earlier and you had suggested SensorKinetics to check. I had done that and the issue is with the phone, I think. This also I reported earlier.

Only a reboot solves it, restart of the app does not. Motion continues to work. So what I do is, when the tilt freezes, I enable motion till the next reboot, for whatever reason. So no problem.

Thanks for the response.
[Android Apps and Games] Flyview:
So it was also stuck in SensorKinetics? Sorry I don't have time to find the old post. I did make a small change in beta2 that might help with sensor freezing but I doubt it will do anything.
[Android Apps and Games] Flyview:
Hey guys, I need your help testing something. I think I have found a way to reduce battery usage for the turn-on-by-proximity but it could just be an anomaly on the Nexus 5.

1) Install GSAM + its root companion so it can see sensor usage.

2) Install the attached KinScreen-3.2.2-beta2-d-lessprox.apk

3) Enable turn-on-by-proximity and keep-screen-on-by-proximity, time to turn off 20s

4) Plug in phone

5) Unplug phone

6) Let screen time out

7) Wait 1min

8) Turn screen on and immediately check KinScreen app usage in GSAM, note down how long proximity sensor used.

Repeat the test again but this time install KinScreen-3.2.2-beta2-d-moreprox.apk.

Post your results here!

If you don't have root, instead of GSAM you can use an adb command to pull a stats file that will show sensor usage of all apps:

adb shell dumpsys batterystats reset (reset first, then perform test)

adb shell dumpsys batterystats > batterystats.txt (pull info)
[Android Apps and Games] Weetbix:
Ill give it a crack at work today :)
[Android Apps and Games] Weetbix:
KinScreen-3.2.2-beta2-d-lessprox.apk = 21s

KinScreen-3.2.2-beta2-d-moreprox.apk = 1m22s
[Android Apps and Games] Flyview:
Sweet, thanks! What device?
[Android Apps and Games] Weetbix:
No problems ... Nexus 6p
[Android Apps and Games] Flyview:
Published an update:

3.2.2 (May 22, 2016)

-Less battery use when using turn-on-by-proximity feature

-Use accelerometer for tilt angle if no gravity or rotation sensor available

-Don't show proximity status with only turn-on by proximity selected (would never see it)

-Added Chinese translation (thanks Mark!)
[Android Apps and Games] Nitrooo84:
Feature request.

I don't know if it's been already asked, but I would love a notification in the statusbar whenever the "stay on" status is triggered that automatically disappears when the "stay on" status is turned off (eg. phone put on the table).

That'd be useful for me because I need a very small rotation angle in KinScreen for my phone's use cases, and I'd like to know if the screen will stay on or not in the current position.
[Android Apps and Games] Flyview:
That would be triggering a notification way too often, but it is doable.
[Android Apps and Games] huladaddy:
Great app!

I've noticed that if I start the app (or boot) while the phone is wirelessly charging, it doesn't detect the charging status, so the screen turns off. If I remove the phone from the wireless charger, then place it back on the charger, it then properly detects the charging status. This is not a problem when it is charging via the usb cable.
[Android Apps and Games] Flyview:
Thanks for reporting that. I don't have a wireless charger to test with and I've looked into what might be causing it, but can't see what would. The app checks the charging status when it starts, so the phone must not be reporting it right away, and it must also not be reporting a change.
[Android Apps and Games] TNSMANI:
If you plan to include it in future, I think instead of another notification, the existing one (the hand) can be made to change colour, just like the angle, motion etc change colour inside the app.
[Android Apps and Games] Flyview:
Notification icons in the status bar don't have any color since Lollipop.

Sent from my Nexus 5
[Android Apps and Games] Nitrooo84:
Whatever way, it would be nice to be able to see if KinScreen is currently keeping the screen on or not, outside of the app, possibly on the statusbar.
[Android Apps and Games] mzguy:
Wouldn't it be less noisy, and thus preferable, to have a notification when the app is idle (NOT keeping the screen on)?
[Android Apps and Games] Nitrooo84:
I just meant that I'd like to have a way to determine if in the current position the screen will stay on or will turn off, at a glance. It doesn't matter how, any reasonable implementation would do.

Screebl (a similar app) had a changing notification icon in the status bar, but that notification system seems not to work anymore in Marshmallow.
[Android Apps and Games] huladaddy:
Alright. Not a biggy. It is only an issue after boot.

Related to wireless charging, I would like to keep the screen on while charging by USB cable, but not when wirelessly charging (different mA rates!) Would you be able to add that degree of granularity?
[Android Apps and Games] Flyview:
Yes it's possible but I feel like the app is already so complicated, is it really important to you?

Sent from my Nexus 5
[Android Apps and Games] huladaddy:
No. I agree with you.
[Android Apps and Games] mzguy:
Occasionally I notice my screen turns off in bright sunlight. Checking sensors (KinScreen, and another app to confirm) shows that if I suddenly move into bright sunlight, the proximity sensor thinks it's covered. Since I have KinScreen set to turn off the screen with the proximity sensor covered after 2 seconds, it turns the screen off even if I'm moving my phone around.

A reboot clears this behavior so that it again functions normally.

Is there a way for KinScreen to occasionally "reset" the proximity sensor so that it simulated a reboot? I don't want to reboot my phone every day if this happens.

Is anyone else having this issue?
[Android Apps and Games] Flyview:
It's probably specific to your phone. When this happens, open up the app Sensor Kinetics and see if it's reporting the same thing.

Sent from my Nexus 5
[Android Apps and Games] mzguy:
I tried Sensors Test, and it reports the same thing.

This or similar issues seem to be a problem for a lot of devices, including yours! See:

https://productforums.google.com/forum/#!topic/nexus/oqh-V37hgDM
[Android Apps and Games] Flyview:
Heh, that was a bug in 6.0 that was fixed in 6.0.1. I haven't seen any issues relating to light. The proximity and light sensors are indeed the same sensor on some phones. Are you sure it's not just the glass that's dirty above the sensor? I've had that happen before.
[Android Apps and Games] mzguy:
Some of those posts are pretty new, but I am on 6.0. It may well be different. I've wiped the sensor, even though it didn't look dirty. I'll keep an eye on it. As I mentioned, it works for a while after reboot.
[Android Apps and Games] Flyview:
If you're on 6.0.0 that could definitely be the problem. The proximity sensor would get stuck on in proximity sometimes. There's no way to reset it from within the app.

Sent from my Nexus 5
[Android Apps and Games] Flyview:
Just published an update to the beta channel:

3.2.3 - Beta 2

-Ensure out of proximity for a second before turn-on by proximity works to help prevent unwanted pocket activations

-Added French translation (Thanks Younes!)
[Android Apps and Games] Flyview:
New beta out:

3.3.0 - Beta 4

-Added option to temporarily disable turn-on-by-proximity if manually turned screen off

-Fixed lockscreen timeout not working

-Fixed max keep on time not working with keep on while charging and do not keep bright

-Ensure out of proximity for a second before turn-on by proximity works to help prevent unwanted pocket activations

-Added French translation (Thanks Younes!)
[Android Apps and Games] Flyview:
Any issues to report?
[Android Apps and Games] Weetbix:
Lol, I thought I were on the beta version. Turns out I'm not. Makes it kinda hard to test :-/

Signing up now to test the next version (won't have time today to test this version).
[Android Apps and Games] Weetbix:
I can't comment on the fixes as I didn't notice the issues previously. I also didn't use turn-on by proximity, but after testing this new option I can say it works like a dream for me with zero issues .... and I am leaving it on permanently.

Thanks!
[Android Apps and Games] Hawgfan486:
I did a quick search of this thread but didn't find anything. I'm curious if Kinscreen works with apps like ForceDoze or Greenify's Aggressive Doze feature? Both disable motion sensors to keep phone in Doze mode. I'm mainly interested in Kinscreen to keep the screen on while it's detecting motion. Not interested in using Kinscreen to turn the screen on, I just want the prevent screen from turning off option. Does anyone know how well and if this works with ForceDoze or Greenify's AD?
[Android Apps and Games] Flyview:
KinScreen should continue to work just fine through doze, especially because no sensors are registered during screen off with only the keep-on features activated. As long as the service process isn't killed and sensors aren't blocked while screen on by any of these other apps, it will continue to work fine. Try it out and let us know!
[Android Apps and Games] Hawgfan486:
I actually signed up and downloaded the latest beta last night but was afraid it might mess up my Forcedoze app that I finally got working right. So figured I'd ask first and after your response I went ahead and turned it on and it's been working great! Love having a very short inactive timeout without constantly needing to touch the screen to keep it on. No issues yet and hasn't affected Doze in any way. Awesome job!
[Android Apps and Games] aquatix:
Hey, I've been using this intent for quite a while now, but it happens often enough that the modes reverse (so it toggles off when I want it on and the other way around), for example when updating the app itself in the Play store (which I keep the screen on with).

If it's not too much of a trouble for you to add an EnableKeepOn and DisableKeepOn, that would be really appreciated :) If not, I'll manage, but still... ;)
[Android Apps and Games] Hawgfan486:
Unfortunate news. When I posted that Kinscreen was working, I was using an experimental workaround option in ForceDoze that didn't disable the motion sensors. After it started being buggy, I switched back to the default settings that disable motion sensors system-wide while the screen is turned off. Unfortunately, Kinscreen no longer works anymore when I turn the screen back on from it being in Doze (with sensors disabled). I have to open the app and toggle Kinscreen off and back on for it to work again. Don't know if this is more of an issue with Forcedoze than something on your end?

Any way to toggle Kinscreen off and on with Tasker? I'm using 3.3.0 Beta 4.
[Android Apps and Games] Alanon:
Hm.... I'm also using KinScreen the way you described (In my case both motion and angle are used) with ForceDoze running with the settings ticked off. So the sensors do get turned off to keep doze active. As far as I can see, everything is working. The experimental option is not used in my case.

The problem might be with ForceDoze, I remember there being issues with sensors not turning on properly after doze is suspended. Supposedly, this was fixed. Perhaps try the beta? Maybe there's simply a disconnect somewhere along the line?

Also, it's worth noting that I'm on Marshmallow, using the app to enable doze mode, since LG switched it off by default. It seems to me that the app is simply enforcing what's already there. I'm not rooted at the moment, so ForceDoze works with Adb privileges, that too might be related?
[Android Apps and Games] Hawgfan486:
Okay than its probably because I'm using an older build of Forcedoze. I tried using the newest version that's from the Google Play Store for a good week but that one just wasn't working for my phone consistently, so I rolled back to an older version that works for me
[Android Apps and Games] Flyview:
There already are start and stop intents:

com.teqtic.kinscreen.INTENT_START_SERVICE

com.teqtic.kinscreen.INTENT_STOP_SERVICE

Don't think it's an issue with KinScreen if you're consistently seeing it fail after screen off and then it works fine without that Forcedoze mode. Yes, you can toggle KinScreen with the intents above.
[Android Apps and Games] Hawgfan486:
I feel dumb, I realized earlier that all I had to do was add your app to the whitelist of Forcedoze. (been a long day!)

Anyway it's been working good for me ever since. No issues with Kinscreen itself. Thanks
[Android Apps and Games] aquatix:
No, those disable the whole service, I would like to have an explicit "keep screen on now" intent and one to put it back to normal again, like the toggle, but explicit.
[Android Apps and Games] Flyview:
New update is out!

3.3.0 (June 30, 2016)

-Added option to temporarily disable turn-on-by-proximity if screen manually turned off

-Fixed lockscreen timeout not working

-Fixed max keep on time not working with keep on while charging and do not keep bright

-Help prevent unwanted pocket turn-on

-Made kept-on-by-user state persistent through restart of service

-Added French translation (Thanks Younes!)

-Added Italian translation (Thanks Mattia!)

-Added Arabic translation (Thanks إبراهيم الشكيلي!)

I made the keep-on-state through notification persistent through a restart now. Hopefully that fixes the issue. If not I'll add that for you in the next update.
[Android Apps and Games] aquatix:
Cool, I'll try it this way and will pester you when it doesn't suit me ;)
[Android Apps and Games] itechy:
Great app really like it!

One small request which is if users have root would it be possible to set the timeout to be less than ten seconds on screen off options (like covering proximity and on lockscreen)

I know that this might not be possible but a simple shell command can emulate button presses I think...
[Android Apps and Games] Flyview:
No it's not possible that I know of. The timeout can be less than 10s, but not if you just touched the screen.

Sent from my Nexus 5
[Android Apps and Games] Hawgfan486:
Is there any way to make it an option whether or not to keep the Always On toggle selected after your screen turns off? With the way it is now, many times I will toggle the Always On option and use my phone for a bit then manually turn off my phone and when I turn it back on I'll have completely forgotten it was selected, so I'll put my phone in my pocket thinking it's gonna turn off by itself with the proximity sensor covered, only to pull my phone out and see its been on the whole time.

If there's any way you could make that an option instead of it always being enabled, that would be awesome. I love this app btw
[Android Apps and Games] XavierBean:
Nexus 6 motion detection issue still exsists. I'm not sure if other nexus 6 users have the same situation.