Giter VIP home page Giter VIP logo

Comments (3)

aerusso avatar aerusso commented on June 10, 2024

Ok, I'm trying to understand what is going on from the logs.

First of all, looking through the from-app captured log, i see a Sending message intent broadcast: line, but no corresponding Broadcast received: line (?!?).

Are those logs collated somewhere else? Where can I find those?

That said, from the Displaying notification Notification(...) log entry, it seems that NotificationService.display is getting called, but is it completing? And moreover, is the subsequent call to NotificationManager.notify (from within displayInternal) getting the wakelock handed off to it (or held for it? I don't know the convention here).

In short: I think that that UserActionManager is being tasked to handle two kinds of work: tasks that should be handled once the phone wakes up (like sending network responses) and also things that need to be handled immediately (like sending notification to the user, passing off unifiedpush messages to other phone apps).

Shouldn't those two kinds of tasks be handled separately? Both seem to be enqueued at the same time there?

from ntfy.

wunter8 avatar wunter8 commented on June 10, 2024

To address your first point (no corresponding broadcast received), I wouldn't expect ntfy to receive its own intent. I'm pretty sure (without digging into the code right now) that the message intent broadcast line corresponds to the setting in the Android app settings called "Broadcast Messages."

If you disable "Broadcast Messages", I would expect that line in the logs to go away. I believe the Broadcast Messages setting is only there for automation apps, like Tasker and MacroDroid, to react to received notifications. I'm pretty sure UnifiedPush continues to work (e.g., broadcast message intents to UP apps) in the background, even if that setting is disabled

from ntfy.

aerusso avatar aerusso commented on June 10, 2024

Doesn't BroadcastReceiver in BroadcastService.kt receive the SEND_MESSAGE intent? The comment there at least suggests it does. But thank you for pointing out another thing it should be doing, and also explaining why it shouldn't be showing up! Anyway, it doesn't really matter.

I am able to confirm that holding the wakelock for another few seconds causes the phone to respond to incoming messages nearly instantaneously. I've put this into a WIP patch.

@wunter8 I'd really appreciate your insight in that PR when you have time.

from ntfy.

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.