yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] liver20:
One question, with the option that disable Internet data and wifi, if its checked can receive WhatsApp push notification?

Enviado desde mi Z1 mediante Tapatalk
[Android Apps and Games] ianmacd:
If this suggestion is taken on board, then it would be logical to allow each of the other radios to be disabled, i.e. Bluetooth, GPS, NFC, etc.; at least, to the extent that these are not already disabled by entering idle state.

Perhaps also a grand toggle that enables/disabls all of the radios, effectively entering Aeroplane Mode (sorry, I'm of British origin) on doze.

I'm just throwing some ideas out. I don't personally need or want to disable any radios during idle state.

---------- Post added at 09:18 ---------- Previous post was at 09:17 ----------

Not in real time, no. These would (hopefully) arrive when your device entered maintenance mode and the radios were briefly re-enabled.
[Android Apps and Games] irony17:
Issue :

I tried the Internet doze function and I get random vibrations.

On top of that it disables only Wi-Fi.

Need a log or anything?
[Android Apps and Games] ssrij:
I too have this issue on my S7 Edge! I was surprised when it happened, yes send me the log so I can take a look at what's happening. I thought I was the only one

Mobile data will only be disabled if you have root. Plus how are you sure it's not being disabled? Mobile data is rather quick to turn off or on and connects really fast vs WiFi.
[Android Apps and Games] ssrij:
You should always check the logs to see what's going on.

On my phone, mobile data is rather quick to turn off or on, almost instantly I would say, so when I turn it on after it was off, it turns on and connects in just a second. That might explain why you perceived that the LTE was never turned off. If the logs say it wasn't turned off, then only it really wasn't turned off. You may also take a look at the SuperSU log to see if any root related requests by the app wasn't denied.

I'll separate the settings soon.

I believe that issue with notification stats or WiFi not being turned on after few hours could be due to the service being restarted or suspended while in Doze, so the state was no longer maintained. I think I'll have to find another way to make sure the background service doesnt ever get suspended by Doze, or the state is persisted across restarts, perhaps by storing all the state related data in the OS's Settings.

Try checking how long the ForceDoze service has been running in the background on your phone. If it's not been running for about the same amount as the time spent on Doze then that would prove my theory. You can do that by recording the running time before screen off, then putting the phone into Doze and then after a few hours, resuming and checking the running time. It should be previous running time + time spent in Doze.
[Android Apps and Games] ianmacd:
ForceDoze's persistent notification definitely lacks some accuracy.

It's currently displaying this:

Last screen off: 7 June 2016 08:36:22
Time spent dozing: 147 mins

while Greenify's notification has this to say:

10:23-11:04=40m39s891ms
08:35|09:21-10:17=56m38s307ms
08:35|08:36-08:37=32s584ms

Greenify is definitely accurate in this case.

For some reason, ForceDoze isn't noticing some not insignificant wake-ups, such as the 5+ minutes between 10:17 and 10:23 above.

Incidentally, thanks for adding the notification tap shortcut.
[Android Apps and Games] ssrij:
Can you check the times in the log and in Doze battery stats? BTW times are logged when you turn off the screen and the device enters Doze and when you turn on the screen and the device exits Doze. It doesn't get logged during maintenance windows, or when the device actually enters or exits Doze, but rather when the function that is used to enter/exit Doze is called on screen off/on after all necessary checks have been made. Usually this would only make the timing off by a second at most.
[Android Apps and Games] Freezy202:
First of all, thank you for this amazing app and your commendable support. I have a question. Would it be possible to implement a feature to disable WiFi if it isn't connected? Because sometimes I forget to disable it when I got to school or somewhere else, therefore it is turned on in the background without a connection the whole day and sucks on my battery.

Thank you in advance :)
[Android Apps and Games] ianmacd:
The Doze battery stats reflect the times in the notification. The reason that I say that Greenify is accurate in this case is that I physically used the phone at the time that Greenify shows it coming out of Doze for 5 minutes.

The debug log has unfortunately already moved beyond the relevant time window.

However, in perusing the debug log, I do see something of note. It's unrelated to the issue of the notification being inaccurate, but I'll mention it here, anyway.

ForceDozeService: Cancelling enterDoze() because user turned on screen and 90000ms has not elapsed OR disableWhenCharging=true

That 90000ms value shouldn't actually ever be used. I have a 30 second lock-screen time-out and a 1 minute Doze delay. However, I have Ignore lockscreen timeout ticked, so shouldn't 60000ms be reported here instead (and used, of course)?

Finally, one other minor issue. My ForceDoze notification (and therefore also the Doze battery stats) still occasionally flips to a.m./p.m. notation. Most of the time, it correctly uses 24 hour notation, but now, for example, the last seven entries are showing a.m. It's low priority, of course, but I'm sure you would want to know about this problem.
[Android Apps and Games] ssrij:
Let me see if I can make timings more accurate. As I said in an earlier post, it could also be because of the service getting restarted/suspended by the OS, which I am currently looking into

I fixed this issue in the last update, can you confirm you're on v1.3.1 rev 32 (You can check in Settings -> About ForceDoze)? Also, check the log for an entry for "Doze Delay:

<delay in ms>

" and "Waiting for

<same delay in ms>

ms and then entering Doze" The values in both should be same.

That's strange, did you ever toggle the 24h option in Date and Time options in system settings?
[Android Apps and Games] SixFourSix:
This app seems to work as far as I know. Lost 1% during night (7h), with data on.

That internet off -thing; are you supposed to see your mobile data turning on after you unlock the phone? I don't see anything happening. But it seems to do its job, because 1% in 7h is the kind of standby time I get when I turn data off.

Suggestion:

Doze stats could be more clear. I mean the looks. Maybe add an individual card for each on/off period. And maybe the doze-on time could be green, and doze-off time red. Or vise versa. I dunno, something like that.

Thanks for the awesome app. Although the notification isn't working for me. Nexus 6P.
[Android Apps and Games] ianmacd:
Yes, I'm on v1.3.1 rev 32.

I see:

13:26:18.783 Doze Delay: 60000ms
13:26:18.803 Waiting for 90000ms and then entering Doze

So, for some reason they are not the same.

I'll try toggling Ignore lockscreen timeout twice and see if that restores order.

No. I configure all of my devices with 24 hour notation and then never go near the setting again.

It's been solidly on a.m./p.m. now for almost a couple of hours, which is the longest I've seen. Early this morning, it flipped to a.m./p.m. for a single event at 06:30, and flipped back to 24 hour notation after the very next event.

Weird.
[Android Apps and Games] rcherif38:
sorry for being late

my xposed log

lg g3 d855
[Android Apps and Games] ssrij:
That's device log, not Xposed. Xposed log can be found by opening the Xposed Installer app -> Logs
[Android Apps and Games] ssrij:
A full logcat would be much better. It seems like the WiFi and mobile data is being correctly turned off/on. Are you rooted?
[Android Apps and Games] ssrij:
I took a look at my code, and it looks like it was a logging issue. I was logging lockscreen delay + doze delay instead of doze delay when printing "Waiting for <delay in ms> ms and then entering Doze", so it means your device is entering Doze after the correct delay, just that the log entry showed the wrong delay value.

Strange, I'll take a look at it later. Try clearing the log in the meantime
[Android Apps and Games] darkwolf_99:
Is there rev32? The link on topic is still rev31.
[Android Apps and Games] irony17:
Deleted
[Android Apps and Games] ssrij:
Yes, I forgot to upload it because I was too sleepy! The only thing that changed between 31 and 32 was the fact that the new Disable mobile data and WiFi option's default value was incorrectly set to true and I changed it to false, that's the only difference
[Android Apps and Games] ssrij:
That's great to hear. I don't think you're supposed to see it, I mean I don't see it on my S7 Edge at least, turning off/on is near instant, but perhaps if your phone is slow to connect to LTE/3G then you may not see it instantly activate.

I will do that soon, many people have already asked me to make the Doze stats a bit better looking.

What issue are you facing with notifications?
[Android Apps and Games] darkwolf_99:
I see. Please take good care of yourself, my friend. In the morning by my local time, you were still online.

Just now, I tested twice. FD cannot control mobile data. The option has checked. I turned on data and turn off wifi before test. After the screen turned off for a while, my QQ(a popular IM in China) can receive new messages which were sent by my pc. Here's the logcat. Sorry the log of Xposed is still empty.

BTW, FD can control wifi perfectly in my smart phone.
[Android Apps and Games] SixFourSix:
I'm so sorry, after I read your post it immediately comes to mind; I blocked notifications for the app, and forgot all about it. :o

Lol sorry, it's working perfect now. I blocked it while back because it didn't go away, but now it seems to work just fine
[Android Apps and Games] ssrij:
Hmm, if you know how to use ADB, can you try running this command: adb shell svc data disable and then see if mobile data was turned off or not?
[Android Apps and Games] ssrij:
The app only shows the notification if Show Persistent notification is enabled in the app's Settings. If you don't want to see it, you can turn it off!
[Android Apps and Games] irony17:
Please find it here http://dl.free.fr/fjAVjdoK0

it's too heavy to post here on xda ;)
[Android Apps and Games] SixFourSix:
Yeah I know this, it just didn't work way back in the early days

---------- Post added at 01:36 PM ---------- Previous post was at 01:34 PM ----------

You, my good sir, just earned yourself a donation. :good:
[Android Apps and Games] darkwolf_99:
Can I use BusyBox in smart phone? If yes, the command is the same?
[Android Apps and Games] ssrij:
Thanks, I see why it's happening. The app is missing the permission android.permission.MODIFY_PHONE_STATE. For some reason, my phone never complains about the missing permission, so I never noticed it. I will add it now
[Android Apps and Games] irony17:
thanks [MENTION=5427507]ssrij[/MENTION] !

where can I find the strings to translate into French (if you wish to)
[Android Apps and Games] ssrij:
Never mind, I think I've found the reason why it's happening. I'll have to find another way to toggle mobile data.
[Android Apps and Games] ssrij:
https://github.com/theblixguy/ForceDoze/blob/master/app/src/main/res/values/strings.xml

Submit a pull request when done. You will have to put the modified strings.xml in the values-fr folder in /res
[Android Apps and Games] rcherif38:
No man this is the xposed log...
[Android Apps and Games] ssrij:
This isn't the Xposed log. This is what an Xposed log looks like:
[Android Apps and Games] ssrij:
I have pushed a new update that fixes mobile data not turning off/on for some users when Disable internet during Doze option is enabled in Settings, and now it will work more reliably. Please toggle the setting after installing the new version to ensure the correct permission is properly granted.

Also added support for logging during maintenance windows, so Doze battery stats will now show when the device exited Doze to perform maintenance jobs and when it re-entered Doze after executing maintenance jobs.
[Android Apps and Games] ssrij:
You can paste the logcat on pastebin or some other text sharing website and post the URL here. Pasting it here wastes a ton of space. Also, that log doesn't contain any entries for ForceDoze, so no information can be gathered.

Also, what do you mean by "awake bar" and "charging bar"?
[Android Apps and Games] noisyriver:
The link on your first post leads to Monochrome.apk.
[Android Apps and Games] android_htc:
Please update your latest apk link as it currently point to your monochrome app.
[Android Apps and Games] ssrij:
Sorry, fixed :silly:
[Android Apps and Games] kryshnakishore:
Oh sorry next time I will use links if attachment is not working..... Charge & awake that show in batter statics below. Charge bar in the sense I mean the lines we find below battery graph..... I just copy pasted entire full logcat... Will chck tonight & post it
[Android Apps and Games] Stroky:
Man this is by far the best app! And you are a Really nice developer and you are working so fast,!

Just Wow. Thanks for that

Gesendet von meinem SGP511 mit Tapatalk
[Android Apps and Games] irony17:
Hi again. This version fixes the vibration issue! Thanks!

But when connected on WiFi, it toggles of WiFi but not data (3g)
[Android Apps and Games] ssrij:
Still don't understand. Can you be more clear?
[Android Apps and Games] ssrij:
Can you try toggling the setting (Disable internet during Doze) off and on?
[Android Apps and Games] irony17:
No good :(
[Android Apps and Games] ssrij:
What device are you using? Also, check the logcat for any errors.
[Android Apps and Games] irony17:
S7 edge
[Android Apps and Games] irony17:
Here is the log
[Android Apps and Games] ssrij:
It seems to be getting disabled (Result: Parcel: 00000000, '.....' indicates it was successfully enabled/disabled). This is exactly what I see on my S7 edge. Do you still get online notifications on screen off?
[Android Apps and Games] irony17:
I'll be checking this tomorrow, no WiFi around ;)

But, if that helps, when only connected to 3g, your app stops the connection and it takes a second for the 3g logo to appear.

When on WiFi, it disconnects but 3g logo stays.
[Android Apps and Games] ssrij:
So when you have both WiFi and 3G active, the data connection isn't actually active but the 3G icon still shows, is that what you're trying to say?
[Android Apps and Games] noisyriver:
Tried this and can confirm your description. When on LTE and turn screen on, it needs a second until it shows LTE connected. But when on Wi-Fi and LTE and turn screen on, Wi-Fi is disconnected but LTE shows immediately after turn screen on.
[Android Apps and Games] ssrij:
Hmm, well you can't have mobile data and WiFi in use at the same time, so what I believe is happening is that when the WiFi is deactivated, the phone switches to mobile data. Now, when ForceDoze initially checks whether WiFi and/or mobile data is active, if you have both turned on, either mobile data or WiFi is active and that's what gets turned off by ForceDoze since if WiFi is active then mobile data won't be (and hence checking whether mobile data is active or not will return a false value), and if mobile data is active then WiFi won't be (and hence checking whether WiFi is active or not will return a false value). I'll look into this and see what can be done about it, perhaps I need to check if either or both are ENABLED or not, instead of CONNECTED or not.
[Android Apps and Games] noisyriver:
Tested your theory by disconnecting from my home Wi-Fi. As there is no other known Wi-Fi for my phone around it has to switch to LTE (but Wi-Fi is still on). Now switched off and after some seconds on again and saw that LTE was off. So you could be right.
[Android Apps and Games] ssrij:
I have pushed a new update with the changes in place. Now it checks whether mobile data is enabled or not, rather than connected or not. This should fix the issue
[Android Apps and Games] jobella:
ForceDoze 1.3.2 rev 33

I have Xposed but I haven't enabled the ForceDoze module yet. Perhaps I will to use the experimental motion sensor fix because I have an LG G4 on nearly stock Marshmallow. The LG locks up when I disable sensors on screen off as you know.

It seems that WiFi is turning back on as it should. Thanks.

edit: It still does not re-enable WiFi sometimes.

I haven't used Tasker yet to whitelist apps yet but I can control your service through Tasker just fine.

Thanks again for this fine app. It really saves battery.
[Android Apps and Games] kryshnakishore:
Logcat :

http://pastebin.com/kVRx0Mjg

When i see my battery statistics I see screen is always awake while charging... No background or whitelisted apps enabled. Pls chck logcat
[Android Apps and Games] noisyriver:
It does. Wi-Fi and LTE turned on, one after the other after I turned on the screen. Although at first it did not reconnect Wi-Fi, but this may not be related to your app. After a device restart it works at the moment, Wi-Fi was reconnecting now too, tried it two times.

I have another issue: For me (Note 4, CM 13, Xposed v84) the Xposed module is not working. Enabling it stops the device from doze as soon as it is moved. Module is activated in Xposed and device rebooted.

But anyway. It is is already a very useful app and I really want to thank your for that great work. Will send a beer soon.
[Android Apps and Games] ssrij:
If you could send me the logcat I can look into it, I haven't heard much from people regarding the module so haven't been able to bring it out of its experimental state
[Android Apps and Games] ssrij:
That link doesn't work. Also, it's impossible for the screen to be awake while charging, unless the screen is kept turned on during charging (obviously if the screen is off then it can't be awake)
[Android Apps and Games] kryshnakishore:
Updated link :http://pastebin.com/kVRx0Mjg

Yes it shows awake while charging even screen is off, for the next charging I will take screenshot
[Android Apps and Games] ssrij:
That link doesn't contain the full logcat. You should use something like SysLog and then send me the link to the ZIP file (upload it to Drive or Dropbox perhaps).
[Android Apps and Games] noisyriver:
Xposed or Syslog?
[Android Apps and Games] ssrij:
Both xposed log and logcat, make sure you use the app a bit before grabbing them so there's ample data regarding what's going on in the logs
[Android Apps and Games] turtle254:
What does SU permission denied? ... when checking WIFI and mobile data internet disabled with dose.
[Android Apps and Games] kryshnakishore:
Log : https://mega.nz/#!rxEWkbrR

Logcat : https://mega.nz/#!S5smnYQJ
[Android Apps and Games] irony17:
It's fixed!

Is there a way for the apps in white list to be able to keep using the Internet?

(as long as they are used, example tune in radio or youtube background playback?
[Android Apps and Games] SixFourSix:
When I listen to music and screen goes off, does FD affect music playing app somehow? Do I need to whitelist any music player app for it to function perfectly?

Tried to donate. Not available in my country :(
[Android Apps and Games] ssrij:
Are you rooted?
[Android Apps and Games] noisyriver:
I activated the module in settings, restarted FD, turned off screen, waited a minute, moved the phone, waited another minute and took the log with syslog:

http://rauschenbach.com.de/public/2016-06-07_23.24.zip

http://rauschenbach.com.de/public/xposed.log.zip

---------- Post added at 11:46 PM ---------- Previous post was at 11:41 PM ----------

In GSM it looks like this:
[Android Apps and Games] ssrij:
No, it's not possible on M and below, although on N, I can use netpolicy to achieve something like that. Whitelisting apps will negate the benefits of the Disable Internet during Doze option anyway, because then you will have to keep WiFi on, rather keep Disable Internet during Doze option disabled instead.
[Android Apps and Games] ssrij:
Did you restart your device after activating the Xposed module? You're supposed to restart your device every time you activate/deactivate an Xposed module so it's properly loaded/unloaded.
[Android Apps and Games] ssrij:
Doesn't affect me when I use Spotify, although I've heard from some people that sometimes it can affect streaming, but not local playback. You can try whitelisting your music app if you face the issue
[Android Apps and Games] noisyriver:
You can use a simple Tasker profile to achieve something like this. (Disable FD as long as the app is running.) I will try this tomorrow for my GPS tracking app as long as the xposed module does not work for me.
[Android Apps and Games] ssrij:
The link is missing a decryption key. When you copy your file's share link on MEGA, you have to copy the link with the decryption key
[Android Apps and Games] ssrij:
Yes, that's a good alternative.
[Android Apps and Games] colonel_lp:
First off, I must give you a big :good: for your commitment to FD..

I mentioned a while back that I was getting Doze while charging. Its still happening. I compared it to system only and greenify's Agressive doze, and neither put the phone into doze while charging. The checkbox for not dozing while charging is ticked in settings.. The screen was on when i plugged in the phone. attached are logs.
[Android Apps and Games] ssrij:
Thanks!

What was your battery level when the device entered Doze?
[Android Apps and Games] okij:
Thanks a lot! With those updates now turning off mobile data is working on my Z3c and also mobile data is turned off when WiFi is turned off. :good::victory:

That's great, because I use an app called Location Based Wifi which toggles Wifi automatically based on the current location (which it derives from the mobile cell tower), so I personally would prefer to just let mobile data be toggled automatically by ForceDoze. Maybe both apps can work together without problems, but it might also be that the WiFi state gets confused when both apps toggle it. I think I experienced this already today, as WiFi didn't turn on as usually when I came back home.

Could it possible that when the service is accidentally restarted or suspended, also the Doze mode isn't started or (at least from the perspective of ForceDoze) stopped anymore? I had this problem quite often today, so that either Doze didn't kick in when turning off the screen, or the Doze Battery stats still having "Entered Doze mode" as the last entry, even though the phone already was turned on again and in use.

I would like to provide you with some logs, but (fortunately!) with version 1.3.2 rev 34 I didn't have this problem yet since installing it (i.e. during the first hour or so of usage.) Did you probably already change something in the code that fixed it?

In case I have to look at this: Where or how do I check how long the ForceDoze service has been running?

Anyway, it's time to spend you a beer or two to thank you for your hard work, so I just made the donation that I promised you yesterday. Keep it up! :good:
[Android Apps and Games] kryshnakishore:
Thanks for all ur patience, this is final

Log : https://mega.nz/#!rxEWkbrR!HCr85Zphm5uMBkpAcGyL5mRlnx1nAESBWkqlUdtG_es

Logcat : https://mega.nz/#!S5smnYQJ!wvKEmZZuJxFxFlQ_Dw7_a2ZzBwuVxyJq7oaZma8O4ew
[Android Apps and Games] colonel_lp:
Somewhere between 40-50%

xperia Z3 d6603 | RSXW mm
[Android Apps and Games] ssrij:
I'll add the option to separate WiFi and mobile data, but really can't do anything about conflicts with other apps (like the one you're using).

If it's suspended, then there won't be any chance of executing code, because the OS doesn't notify the service before suspending it. Same goes with restarting, although what I am thinking to do is to maintain the "state" of the service by saving all the variables to an internal database and loading them back into the service after it gets restarted, to decide whether to enter/exit Doze.

Not really, but a few revisions back, I made a small change to add ForceDoze itself to the Doze whitelist, perhaps that may have made the difference.

GSAM -> App Usage. Or you can try using the OS's battery stats option

Thanks a lot!