yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] pinoholo:
[MENTION=5427507]ssrij[/MENTION] i got force close evertytime I close app with back button on latest 1.3.7 rev 4

log attached

https://drive.google.com/open?id=0B_jUnEJtxC5cUXRkb3BvVW1OXzg
[Android Apps and Games] ssrij:
Thanks, I've seen the crash report already on Play Store Developer Console. It's related to Chrome Custom Tabs, which is what the app uses to display the donate and beta testing webpage. I have fixed and pushed an update.
[Android Apps and Games] pinoholo:
thanks for fast fix, I'll wait for upadate
[Android Apps and Games] turtle254:
Its now missing(rev 42 and rev 43) "Don't disable sensors on screen off" in settings(unchecked). Had to go back to 1.3.6 rev 41

because this is the best for battery I get when moving around. With out this setting , I get 1% battery lost

per hour. The option for "Disable motion sensing for doze" is not enough to stop this lost.

Thank again for all this work.
[Android Apps and Games] ssrij:
If you turn on either Disable motion sensing for Doze or Disable motion sensing for Doze (root), the option Don't disable sensors on screen off will be hidden, because, well, it doesn't make sense to toggle that setting when motion sensing is disabled for Doze, plus enabling either the non-root or root Disable motion sensing for Doze automatically enables that option, so sensors aren't disabled on screen off. It becomes hidden so you don't accidentally disable it when you have either the non-root or root setting on, because if you disable it then sensors will be kept off during screen off, thus negating the effect of the root/non-root setting.

The setting will show up again when you've disabled the root or non-root Don't disable sensors for Doze, whichever you turned on
[Android Apps and Games] ajeesh vijayan:
small suggestion

it's working good..

my small suggestion is

how about clicking on notification opens doze battery stats rather than the main app
[Android Apps and Games] ssrij:
Doze Stats is just a menu click away after opening the main UI. Opening the main UI means you can easily do anything you want (see full stats, toggle settings, etc)
[Android Apps and Games] okij:
Last night there again was no Doze maintenance window. :(

Was the code change already done in 1.3.6 rev 41 (which I've installed ATM) or now in 1.3.7 rev 42?

I attached a full logcat again, as well as screenshots of the Doze battery stats and my settings. I hope that you can have another look at this issue. TIA
[Android Apps and Games] noisyriver:
Did you maybe disable mobile data on your phone (NOT in FD)? Asking because I notice the same since I disabled mobile data. But I'm on a older version of FD.
[Android Apps and Games] ianmacd:
That doesn't happen dynamically on my tablet, at least. The hiding/unhiding doesn't happen until I kill and restart the app.

Again, an app restart is needed to reflect that.

In the worst case scenario, it might be possible for a user to modify these options to make them inconsistent with each other, after which Don't disable sensors on screen off might be left in an incorrect and invisible state. It's hard to know whether this can happen, precisely because the setting is invisible at the moment it needs to be checked. :)

Perhaps it would be better to grey the setting out, rather than hide it. In this way, its current status would still be visible for verification purposes during troubleshooting.
[Android Apps and Games] koboltzz:
I love your app, thx for that :)

But I think, you've made a typo, it doesn't make sense.

And I have question:

I am a

-root

-xposed

-StockROM Marshmallow

-Nexus 6

user

What do I have to check or uncheck, to disable motion detection under these circumstances?

Only 'Disable motion sensing for Doze (root)' ?

But then with xposed module active?

Or do I have to do nothing and all is fine?
[Android Apps and Games] ianmacd:
Tick both Don't disable sensors on screen off and Disable motion sensing for Doze (root).

The first ensures that the motion sensors stay on, and the second ensures that Doze can't access them.

The advantage of this method is that other apps retain their access to the sensors while the device is dozing.
[Android Apps and Games] koboltzz:
Ahh cool!

Do I need the xposed module

for your advice

?

Does this mean, I do not need to check 'Autorate fix'?
[Android Apps and Games] nobnut:
I think you two are talking at cross purposes.

The original question was in effect 'How do I disable sensors?'.

The answer given is therefore incorrect (especially as the first one disappears if you select the second one).

[MENTION=5427507]ssrij[/MENTION] Could I make a suggestion please? In the menu descriptions, it would be helpful (especially to non-English speakers) if you could avoid double negatives. Sometimes people misunderstand these.

Example:

Rather than "Don't disable sensors on screen off". You could use "Allow/Enable sensors on screen off". This way, the above confusion could be avoided.

Many thanks.
[Android Apps and Games] ianmacd:
Only the asker of the question knows for sure, but the question was posed in the context of a ForceDoze user who has Xposed installed.

In that scenario, the optimal form of sensor disabling would affect only Doze, not anything else.

If the question is truly how to simply disable motion detection, the answer is trivial: use the app's default settings.

I should add, however, that the Xposed form of masking the sensor still doesn't work for me. Motion detection wakes the device, after which the device never re-enters Doze. I tested it again this morning on a Samsung T710 tablet.
[Android Apps and Games] nobnut:
Your answer was still incorrect.
[Android Apps and Games] Milan34119:
Is there another way to donate you? I have no Paypal Account:(
[Android Apps and Games] ianmacd:
Your response adds nothing but noise, because you can't know whether you are correct.

Why don't you leave it to the person who asked the question to decide whether I adequately answered it? This is a rhetorical question for you to ponder in silence. Please don't add more noise by answering it here.
[Android Apps and Games] proag:
Can someone share a link for beta testing? Thanks in advance ;)
[Android Apps and Games] ianmacd:
You can sign up from the app itself, or from this link.
[Android Apps and Games] koboltzz:
I wanted to know how to stop the marshmallow default behavior to 'undoze' if it is in motion.

My system specs are Nexus 6, StockROM, root, xposed.

I don't know who answer correctly but with xposed module disabled and with 'don't disable sensors" unchecked, it seems to work.

Instead xposed module active and there 'Disable motion sensing (root)' checked which won't work.
[Android Apps and Games] ps89:
Hello [MENTION=5427507]ssrij[/MENTION], it seems that the 'Disable motion sensing for Doze (root)' feature no longer works properly in the latest version of the app.

After enabling the option and restarting the phone, the Xposed log will show the following:

ForceDozeXposed: usePermanentDoze: false, useXposedSensorWorkaround: true, serviceEnabled: true.

However, any subsequent restarts will cause Xposed to show the line below in the logs:

ForceDozeXposed: usePermanentDoze: false, useXposedSensorWorkaround: false, serviceEnabled: false.

Changing the permissions of the file and folder doesn't seem to work as well.

I hope you can look into it.

Thanks. :)
[Android Apps and Games] ianmacd:
OK. Yes, the Xposed module isn't working for everyone, so the next best configuration is the one you are now running.
[Android Apps and Games] nobnut:
I was right;)
[Android Apps and Games] Ishaan Gupta:
Here you go!

https://play.google.com/apps/testing/com.suyashsrijan.forcedoze
[Android Apps and Games] ianmacd:
You weren't. Go back and reread the entire exchange.

The Xposed method of masking motion detection from FD is still the preferred way for rooted users, but doesn't work with all devices.

Full sensor disabling is available in the remaining cases.

This is what I originally stated in response to the user's question. It was true then and remains true now. Your claim that it was an incorrect answer was itself incorrect, as is claiming otherwise now.
[Android Apps and Games] okij:
My phone (Xperia Z3c) was on WiFi. If WiFi is connected, then mobile data automatically isn't connected (which should be normal behaviour on any Android phone!?), but I didn't disable mobile data in quick settings.

I would understand if there was no Doze maintenance window if all internet access was disabled, but as I said, WiFi connection was up and running.
[Android Apps and Games] ssrij:
It was done a few revisions back. When you say "no Doze maintenance window", do you mean in the stats, or on the device? Because my device syncs apps just fine, for example, it synced emails and other notifications overnight when I was sleeping and FD was active, but it just didn't show it in Doze stats.
[Android Apps and Games] ssrij:
It takes effect when you back out of Settings and enter Settings again, but I'll be making changes so it happens the moment you toggle the setting.

It doesn't have to be checked/unchecked manually, if a setting depends on another setting's state, then ForceDoze takes care of automatically enabling/disabling it.

Yeah I guess I can do that instead of hiding
[Android Apps and Games] ssrij:
I'll do that
[Android Apps and Games] ssrij:
You can click on the Donate To Me button next to my name (or use this link), it will take you to a special PayPal page where it will allow you to donate via card as well, so you won't be forced to sign up for PayPal
[Android Apps and Games] ssrij:
By default, ForceDoze disables motion sensors on screen off so your device will not undoze during movement, so you don't have to mess around with any other motion related setting. This also means no app will be able to use motion sensor during Doze. Some people have a problem with motion sensors being disabled on screen off (ex: LG devices don't wake up), so there's two experimental workarounds to stop Doze from being turned off due to movement. One of them works without root, and the other one requires root and Xposed. You should use the root/Xposed one if you're rooted/have Xposed, otherwise you're supposed to use the non-root one. Using either of them does not guarantee that your device will stay in Doze during movement because both the options are experimental.
[Android Apps and Games] ssrij:
Can you check and tell me what the permissions are for /data/data/com.suyashsrijan.forcedoze/shared_prefs/com.suyashsrijan.forcedoze_preferences.xml and /data/data/com.suyashsrijan.forcedoze/shared_prefs
[Android Apps and Games] ps89:
/data/data/com.suyashsrijan.forcedoze/shared_prefs/com.suyashsrijan.forcedoze_preferences.xml Permission: rw-rw---- (0660)

Path: /data/data/com.suyashsrijan.forcedoze/shared_prefs Permission: rwxr-xr-x (0755)

I changed /data/data/com.suyashsrijan.forcedoze/shared_prefs/com.suyashsrijan.forcedoze_preferences.xml to 0664 via Solid Explorer and TWRP but to no avail. 0660 was working fine in previous versions. However, I noticed that I had to always disable the feature, restart my phone, enable the feature and restart my phone whenever the app is updated. This method doesn't work with the latest version.
[Android Apps and Games] arcticnights:
How does this compare to naptime/doze settings editor? :)
[Android Apps and Games] okij:
It appeared neither in the stats, nor in the full log / logcat.

I also don't have syncing issues, but I have e.g. AquaMail whitelisted.

So do you think that it's normal behaviour that there are no Doze maintenance windows when on WiFi overnight?

There have been stats entries about maintenance window a few days / revisions back, that's why I'm worried that they don't occur anymore and that some syncing stuff of non-whitelisted apps won't work.
[Android Apps and Games] ssrij:
/data/data/com.suyashsrijan.forcedoze/shared_prefs/com.suyashsrijan.forcedoze_preferences.xml should be 664 instead. I think updating the app via Play Store/APK resets the permission. Try toggling the Xposed option, it should re-apply the correct permissions.
[Android Apps and Games] ssrij:
I'll have to put more logging code to better understand what's going on. If you get emails, notifications, etc then it means maintenance windows are working, just that they're not showing up in the logs, so there's nothing to worry about. I didn't really change anything about the maintenance windows logging code, apart from fixing the bug where logging only happened when you had turn off WiFi/mobile data during Doze turned on.
[Android Apps and Games] n0ts0smart:
[MENTION=5427507]ssrij[/MENTION] just wanted to say thanks for a great app. Only been using it a few days but it's been the best battery saving app I've used in relation to the setup.

Pretty much set it and forget it. Great work.
[Android Apps and Games] ssrij:
It's much better than both, and doesn't confuse you with too many settings or anything like Doze Settings Editor/Naptime does. Just flip the switch and enjoy more battery life. On top of that, it allows you to customize some parts of your Doze experience, again, without modifying any Doze values or anything. For example, you can add a delay before ForceDoze kicks in, turn off WiFi/mobile data during Doze to save even more battery, etc. It also logs useful stats for you, so you can see how many times your device entered/exited Doze, how much battery was used and how much time was spent in Doze. It also offers Tasker support, so you can turn on/off ForceDoze, add/remove apps from Doze whitelist and modify ForceDoze's settings directly from Tasker. There are lots of things that you wouldn't find in other apps.

I have noticed that Naptime has added a few features from ForceDoze (like disabling motion sensors, the same auto-rotate/brightness fix, doze off on charging, etc), before that the developer didn't even bother updating the app since January 2016! If you're coming from Naptime, I would like to tell you that ForceDoze has had these features pretty much from the start.
[Android Apps and Games] ianmacd:
[MENTION=5427507]ssrij[/MENTION],

I wanted to ask you if the Xposed module works for you on your S7E. We both have the same phone, so if it's working for you, it ought to work for me, too.

FD works great for me with the standard config, but I'd really like to get the Xposed module working for the purpose of comparing efficiency. If it's working for you, then I'll know that I have a conflict somewhere that I have to localise.
[Android Apps and Games] ssrij:
Initial tests showed it was working, but I have to conduct an in-depth test to check for accuracy. I recently made some changes to the module, few revisions back. Did it used to work for you before? or did it never work for you?
[Android Apps and Games] ianmacd:
Sadly, it has never worked for me.

I tested it when you first added the feature (or when I first started using FD; I can't remember which came first), and again a couple of times since then, most recently this morning.
[Android Apps and Games] ssrij:
Alright, I am in the process of making some more changes, I'll be pushing it to the beta channel shortly. I hope that might make it work
[Android Apps and Games] ssrij:
New update (1.3.7 rev 44) pushed to Beta users. I have made some changes to the Xposed module, please let me know if it works for you or not. Turn off and on the Disable motion sensing for Doze (root) setting and then reboot the device so the changes can take effect.
[Android Apps and Games] okij:
[MENTION=5427507]ssrij[/MENTION]:

I have a feature request: could you add an option "Don't Force Doze while GPS sensor is on" that prevents your app to enter Force Doze as long as the hardware GPS sensor is active?

The reason I'm asking is that today I tried really hard with Tasker and also with the Tasker plugin "Notification Listener" to turn Force Doze automatically off when GEO Tracker is recording, but I couldn't get it to work. It seems that the notification that GEO Tracker is generating cannot trigger Tasker and Notification Listener.

IMHO an option like "Don't Force Doze while GPS sensor is on" would be very handy for everyone who's using your app but does some GPS or Fitness tracking in the background (while the screen is off) every now and then.

By making this function just depending on the status of the hardware GPS sensor, it would work with every GPS tracking app on the market, and at the same time it wouldn't prevent Force Doze from doing its brilliant job when no GPS or Fitness tracking app is used. So I think it would be a very useful addition, not only for me.
[Android Apps and Games] nobnut:
[MENTION=5427507]ssrij[/MENTION]

This has been a constant issue on my HTC10 since the app was released. It's fine on my LG G5 and S7E.

Phone is rooted, but Force Doze doesn't recognise it and hides the root options. Strange.
[Android Apps and Games] ssrij:
Does re-installing fix it?
[Android Apps and Games] ssrij:
The problem with that is it's not possible to check whether the GPS sensor is active/in-use programmatically, you can only check whether it's on or off, which isn't the same as active/idle. What I can do instead is maybe build a whitelist where you can put apps and if one of those apps is open/running in foreground (NOT background) then ForceDoze will not activate on screen off. Even doing that is tricky because Google has removed the APIs required to check for running apps.
[Android Apps and Games] nobnut:
Thank you for the reply. Unfortunately not. I've tried uninstalling, factory resetting, clearing cache, resetting from within FD, removing SU privileges, all sorts. It's a mystery.

I don't really care as I only use the HTC10 for work. I just thought you might want to know. If you want anything from me, I'll provide it this week.

Thank you for your great app.
[Android Apps and Games] turtle254:
I was thinking that the new way was leaving sensor ON and using the idle/state as controlling Forcedoze. Want this let apps in the white list run with GPS sensing ?
[Android Apps and Games] okij:
But e.g. GPS Status app has an option for its background behaviour to show a notification whenever other apps access the GPS sensor, so it must be possible somehow.

Also, wouldn't Xposed and / or root help in this case (although GPS status doesn't even need those)?

---------- Post added at 09:13 PM ---------- Previous post was at 09:05 PM ----------

No, unfortunately not. Force Doze is hindering GPS tracking apps from doing their recording, even if they are whitelisted.
[Android Apps and Games] ssrij:
Whitelisting will have no effect on GPS. The only thing whitelisting does is allow apps to hold partial wake locks and let them access the network during Doze. All other restrictions are still applied.

I have already said in the past to use Tasker to disable ForceDoze when you launch an app like Google Maps, and then re-enable it afterwards. This is the easiest and fastest way to let apps access GPS on screen off. Now, I am working on a workaround for it, but cannot guarantee there will be one. Until then, using Tasker is the best fix for this.
[Android Apps and Games] Ishaan Gupta:
I have whitelisted Google fit but the GPS still does not work. Whenever I turn on the screen, it jumps to the current location and does not show the path travelled.

EDIT: This has already been answered. XDA labs didn't load it. Sorry for the repost. Damn XDA Labs.
[Android Apps and Games] optimummind:
Is anyone else having issues with Samsung Pay not working? So I'm at the market & it's time to pay. I turn on the phone by pressing the Home button, swipe to unlock phone, swipe from the bottom of the screen to pull up my card, input my fingerprint, and when the timer starts, I place my phone next to the mag strip like I always do & nothing happens. The terminal doesn't receive the MST signal.

Anyone else having issues?

[MENTION=5427507]ssrij[/MENTION] Is Samsung Pay not working b/c some sensors are turned off?
[Android Apps and Games] ssrij:
Strange, I have no idea why Samsung Pay would use motion sensors for payment, that doesn't make sense. Could you send me a logcat perhaps? In the meantime, I'll look into the Samsung Pay apk to see if it's really using motion sensors.
[Android Apps and Games] axxel6307:
What kind of battery savings would this typically give a heavy user?

I'm currently a greenify AD user but am going to try this for comparison. My battery saving has been minimal. My standby overnight drain seems to be 3 or 4% overnight no matter what I do before and with using AD. Hoping to lower it a percent or two.

Since your timeouts are adjustable, would there be an ideal timeout you would recommend to me? Thanks.
[Android Apps and Games] neu - smurph:
Hi,

New ForceDoze user here - did some testing yesterday of this with 1.3.7.42 and using a Doze detect routine got I've set up in MacroDroid (a tasker alternative). Maintenance windows are happening, but just not being reflected in ForceDoze's log. My routine records delayed firing of 1 minute interval AlarmManager calls which indicates that full idle is in place and as expected the delay stopped for a few minutes 1hr after screen off (i.e. no Doze restriction on MacroDroid or other apps for those few minutes).

One thing has got me confused but might need more testing - I did a short drive yesterday whilst streaming internet radio (BBC Iplayer radio) and expected it to fail when Doze kicked in as it's not a whitelisted app and I thought it's network access would be blocked when dozing. Carried on working though. I't was only a 10 minute trip though so maybe the app had pre-buffered enough to cover that time. ForceDoze reported Doze in it's logs with a high battery drain.

Nexus 5x, stock unrooted.
[Android Apps and Games] kryshnakishore:
New version is again confusing.. Pls make less options in a way good. Instead of nap time, doze editor i choose FD bcoz of simple settings which puts everything into rest.. Hoping a better d simpler version
[Android Apps and Games] ianmacd:
Not working for me, I'm afraid. Motion detection is still throwing a spanner in the works and waking the device.
[Android Apps and Games] optimummind:
I don't think it's because of motion sensors being disabled. I think it is some component(s) that are not reinitialized at screen-on that prevents Samsung Pay from working. ForceDoze is more aggressive than Aggressive Doze from Greenify b/c with Greenify, I never had any Samsung Pay issues.
[Android Apps and Games] Arstoien:
I'd just like to ask you to not bloat the app with features that could be covered by other apps, like Tasker. Not saying you're doing it now, you seem to be doing great in deciding what's consistent with the app's mission.

As for Tasker and Notification Listener – it's working pretty well with any app I've tried, so whoever is interested, may send me a pm to troubleshoot the issue.

Could I make a small request (and I completely understand if you choose to deny) – could you make an option for the users to choose to not use partial wakelock, but the old (more unreliable) method using alarm manager? Could perhaps hide it under "advanced" settings and have a warning like "don't mark this, if you don't know what it does" or similar. Alternatively, you could make it accessible only via broadcast, so the user wouldn't even see it unless he's actively looking for it. Again, I would understand why you may not want to make such a feature.

Cheers

Sent from my Nexus 5
[Android Apps and Games] ianmacd:
You're not going to see any change with overnight drain.

ForceDoze's AD can be configured (and is by default) to kick in more quickly than Greenify's, but that will happen only once when you first lay the phone down. After that, it will be dozing, no matter whose Doze implementation you are using.

Incidentally, I don't actually understand why overnight drain is even a talking point for some people. Overnight is the best time to charge your phone, because you're not using it, so why not just plug it in and eliminate overnight drain altogether?