Code Monkey home page Code Monkey logo

Comments (8)

d4rken avatar d4rken commented on June 2, 2024

Currently we only ask for this when the monitor mode is ALWAYS. Do you think it's needed in other cases too?

.filter { it != Permission.IGNORE_BATTERY_OPTIMIZATION || monitorMode == MonitorMode.ALWAYS }

from capod.

GitGitro avatar GitGitro commented on June 2, 2024

oh i completely missed it! It makes sense but the problem is that with monitor mode only when device is connected the notification disappear after a few seconds unless i give the app the permission so i need to set to always anyway

from capod.

d4rken avatar d4rken commented on June 2, 2024

What device/ROM are you on?
How many seconds are a few? 😁
Can you catch this in a logfile?

It's fixed with battery permission or is it fixed when setting monitor mode to "ALWAYS"?

It might be the monitor canceling itself due to not seeing the connected device, but that happens after 15 seconds:

MonitorMode.AUTOMATIC -> flow {
val mainAddress = generalSettings.mainDeviceAddress.value
if (devices.any { it.address == mainAddress }) {
log(TAG) { "MainDevice is connected ($mainAddress), aborting any timeout." }
} else {
log(TAG) { "No Pods are connected, canceling worker soon." }
delay(15 * 1000)
log(TAG) { "Canceling worker now, still no Pods connected." }
workerScope.coroutineContext.cancelChildren()
}
}

If the monitor worker cancels itself, that also dismisses the notification.
I see no issue with requesting the battery optimization permission in other modes, but we need to first understand what is happening.

from capod.

d4rken avatar d4rken commented on June 2, 2024

Do you have a device address selected in settings? If NOT, then I think what happens fits your description, e.g.

Monitor mode: AUTOMATIC
No Pods are connected, canceling worker soon.
PodMonitor.onEach(): null
PodMonitor.onEach(): null
PodMonitor.onEach(): null
PodMonitor.onEach(): null
PodMonitor.onEach(): null
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
PodMonitor.onEach(): AirPodsPro...
Canceling worker now, still no Pods connected.
PodMonitor.onCompletion()
Monitor job quit
Execution finished after 15132ms, Data {}

from capod.

d4rken avatar d4rken commented on June 2, 2024

@GitGitro What do you think about #53?

from capod.

GitGitro avatar GitGitro commented on June 2, 2024

@GitGitro What do you think about #53?

we can try even tho right now it's not disappearing :/ i don't know what's going on anymore

from capod.

d4rken avatar d4rken commented on June 2, 2024

If it happens again, can you record a debug log (Settings>Support)? Or build the app from source and get the log from that?

from capod.

GitGitro avatar GitGitro commented on June 2, 2024

Sure thing! 👍

from capod.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.