red-moon icon indicating copy to clipboard operation
red-moon copied to clipboard

High battery usage in background

Open islam2hamy opened this issue 2 years ago • 15 comments

Hi , High battery usage in background reported by device, suggests to sleep the app.

I can see that the app auto start randomly in background , why?? Please fix. An app with battery drain is not good

Os : miui 11.0.2 Android : 7.1.2

islam2hamy avatar May 20 '22 02:05 islam2hamy

The app should auto-start once per day, if you have configured it to do that. Otherwise it should not be doing anything "in the background", only when it is on. I'm not sure why it would behave any differently.

smichel17 avatar May 20 '22 10:05 smichel17

Screenshot-com-jmstudios-redmoon

islam2hamy avatar May 20 '22 10:05 islam2hamy

I'm really not sure why it would turn on at all then. You could try grabbing a log and see if it is still scheduling even though it should not be. There are instructions in https://github.com/LibreShift/red-moon/issues/184#issuecomment-330053370

smichel17 avatar May 25 '22 10:05 smichel17

Here you are

https://mega.nz/file/gE4hgIKY#sfJWKjvWUF2nRazK37uCIyCDr2OsQEqZtCkL3bgx4HU

islam2hamy avatar May 25 '22 18:05 islam2hamy

https://mega.nz/file/8J4VyLBZ#5pJMkLBaF6WJnFpeMvGy5O32HF4aWbHBkHXDa4lPpEw

islam2hamy avatar May 25 '22 19:05 islam2hamy

More : https://mega.nz/folder/JIIzQTTC#KDpEHKQ5fsYCp27P9YPnxA

islam2hamy avatar May 26 '22 04:05 islam2hamy

I will keep this folder updated

islam2hamy avatar May 26 '22 04:05 islam2hamy

app auto start randomly in background

To clarify,

  1. Do you mean that the app opens, or that the filter starts running (and coloring the screen)?
  2. Are all of these logs from when that happens, or are some of them after you manually opened the app?

If Red Moon were scheduling itself to turn on/off, you would see this message in the logs (calendar.toString() becomes a timestamp):

https://github.com/LibreShift/red-moon/blob/a9f0eed042e72f92d528c75abb5667d3a6340ccb/app/src/main/java/com/jmstudios/redmoon/receiver/ScheduleReceiver.kt#L86

I'm not seeing any of those. However, in the last two logs, I see a couple lines like this:

[05-25 20:38:50.432 1571:2711 I/ActivityManager]
Start proc 2859:com.jmstudios.redmoon/u0a172 for service com.jmstudios.redmoon/.widget.TileReceiver caller=com.android.systemui

I would expect to see that when the filter is started via the quick settings tile, that you can access at the top of the notification drawer. Maybe you've accidentally tapped it, or miui has a bug which is triggering it randomly?

smichel17 avatar May 26 '22 11:05 smichel17

app auto start randomly in background

To clarify,

  1. Do you mean that the app opens, or that the filter starts running (and coloring the screen)?

the app opens (using ram)

  1. Are all of these logs from when that happens, or are some of them after you manually opened the app?

some of them after manually open the app

I would expect to see that when the filter is started via the quick settings tile, that you can access at the top of the notification drawer. Maybe you've accidentally tapped it, or miui has a bug which is triggering it randomly?

May be miui ?!

islam2hamy avatar May 26 '22 12:05 islam2hamy

New log with no manually open

https://mega.nz/file/wRBimAjJ#JfpIA791SW8JRrz8FOmQHaU_c8Bahj06BpTB7sIR4wY

islam2hamy avatar May 26 '22 12:05 islam2hamy

I will remove the app quick tile , and get the new log

islam2hamy avatar May 26 '22 13:05 islam2hamy

There is no log until now

islam2hamy avatar May 26 '22 16:05 islam2hamy

No more log

islam2hamy avatar May 28 '22 07:05 islam2hamy

Is the bug fixed?

smichel17 avatar May 29 '22 14:05 smichel17

Is the bug fixed?

Can you do anything about using app tile in the quick settings ?

islam2hamy avatar May 29 '22 15:05 islam2hamy