Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent notification when using channel: alarm_stream on Samsung devices #1159

Closed
xydix opened this issue Nov 7, 2020 · 25 comments · Fixed by #1167
Closed

Silent notification when using channel: alarm_stream on Samsung devices #1159

xydix opened this issue Nov 7, 2020 · 25 comments · Fixed by #1167
Labels
bug Something isn't working notifications

Comments

@xydix
Copy link

xydix commented Nov 7, 2020

Home Assistant Android version:
3.0.0-full
Android version:
10
Phone model:
Samsung Galaxy S20
Home Assistant version:
0.116.2
Last working Home Assistant release (if known):

Description of problem:
I Try to use the alarm_stream in a notification.
I want to use Home Assistant to find my phone if i loose it.
It uses the alarm sound but if the phone is in silent mode it receives the notification silent.
Did I misunderstood the docs?

   action:
     - service: notify.mobile_app_m***
       data:
         title: "Title"
         message: "Message here"
         data:
           ttl: 0
           priority: high
           channel: alarm_stream

Using this works if the phone is in slient mode

   action:
     - service: notify.mobile_app_m***
       data:
         title: "Find me. RRRRRRRRRRRR. TTTTTTTTTT. Here I am!"
         message: TTS
         data:
           ttl: 0
           priority: high
           channel: alarm_stream_max

Traceback (if applicable):


Screenshot of problem:

Additional information:

@dshokouhi
Copy link
Member

check the alarm stream volume on your device, more than likely your volume level for that stream in particular is off. Especially if you confirmed alarm_stream_max works because all it does is take the current volume, set it to the max, and then it lowers it. You will want to make sure your volume level is set, otherwise you may need to stick to alarm_stream_max.

I just tested on my own device and can confirm if you set the volume of alarm to 0 it won't make a sound, as expected. If the volume level for the alarm stream is set to 3 or 4 I do hear it.

@xydix
Copy link
Author

xydix commented Nov 7, 2020

Ah my bad. The thing is. If I use alarm_stream or alarm_stream_max doesn't matter in this case.
It is the TTS making the difference.
This is received silent. Tried on 3 different phones. All samsung. EDIT: IF sound is ON, it rings with my alarm sound.

   action:
     - service: notify.mobile_app_m***
       data:
         title: "Title"
         message: "Message here"
         data:
           ttl: 0
           priority: high
           channel: alarm_stream

This is working. I hear the TTS even if phone is in silent mode. EDIT: After more testing, using TTS, will sound if phone is in silent mode even if i don't use channel: alarm_stream Using channel: alarm_stream_max will do the same but att max volume as expected.

   action:
     - service: notify.mobile_app_m***
       data:
         title: "Find me. RRRRRRRRRRRR. TTTTTTTTTT. Here I am!"
         message: TTS
         data:
           ttl: 0
           priority: high
           channel: alarm_stream

This notification is received with my standard notification sound. EDIT: But only if sound is on (no silence mode) alarm_stream_max seems to break the alarm_stream - part completely

   action:
     - service: notify.mobile_app_m***
       data:
         title: "Title"
         message: "Message here"
         data:
           ttl: 0
           priority: high
           channel: alarm_stream_max

@dshokouhi
Copy link
Member

Try enabling lock screen sounds in your device settings? This might be a manufacturer difference or a setting on your end to adjust.

@xydix
Copy link
Author

xydix commented Nov 7, 2020

Lock screen sound is enabled

@xydix
Copy link
Author

xydix commented Nov 7, 2020

I think this is the same problem as https://github.com/home-assistant/companion.home-assistant/issues/387
And it is a real problem.
As you say, might be a manufacturer difference.
But if you look at the new examples I gave, I think you can agree with me it's not a volume issue.
And for me, the example with alarm_stream_max makes it even more strange.

@dshokouhi
Copy link
Member

maybe try checking the default alarm sound? all we do is ask for whatever is the default alarm song and attempt to play it. I think this may be samsung doing something out of the ordinary outside of android specification. Not sure what we can do to correct this as I don't own any samsung devices to test with.

here is the code where you can see we specify to use the alarm stream for the notification:
https://github.com/home-assistant/android/blob/master/app/src/full/java/io/homeassistant/companion/android/notifications/MessagingService.kt#L489

There is nothing strange about how TTS is working but notifications is not. They use completely different code and API's and it is expected they may not behave the same.

The issue you linked to was also closed as a duplicate of this issue.

@xydix
Copy link
Author

xydix commented Nov 7, 2020

So I did som more testing.
Using TTS will speak even though the phone is in silent mode and i don't use channel: alarm_stream
I did some editing in my post with the examples, making it more clear i hope.
I think the issue should be reopened.
I understand it might not be an easy fix but maybe someone with a samsung phone and coding skills might have some ideas.

@dshokouhi
Copy link
Member

TTS notification is not the same as a message notification, so the comparison is not valid here. They use completely separate API's and the functionality is also separate. The reason why TTS continues to work is because by default it uses the Music stream, as outlined in the docs. Code wise they both use the same audio attributes when it comes to using the alarm stream.

Can you try these steps in order?

  1. Launch HA app
  2. go to home screen and set device to vibrate or silent
  3. Turn off screen and leave phone alone
  4. send a normal notification to your device from another device like desktop using channel: alarm_stream
   action:
     - service: notify.mobile_app_m***
       data:
         title: "Title"
         message: "Message here"
         data:
           ttl: 0
           priority: high
           channel: alarm_stream

Does it make a sound then?

@xydix
Copy link
Author

xydix commented Nov 8, 2020

Hi.
I tried those steps.
I even restarted my phone first.
Still the same. Notification is there when i turn the screen on but no alarm sound.

@dshokouhi
Copy link
Member

Does the notification show up before you turn on the screen and touch the device?

@xydix
Copy link
Author

xydix commented Nov 8, 2020

Yes i guesss it does. When the silent / vibration mode is of, sound on, the phone ring with my alarm sound instantly. The screen is black all the time.
But if i set an alarm on the phone. It will ring as it should, showing option for snooze and shut off.
But even if the screen is on, i see the notifiation from HomeAssistant instantly.

@BigDoom
Copy link

BigDoom commented Nov 8, 2020

Same issue here, alarm_stream isn't working, neither is alarm_stream_max. Both don't give an audible alarm when on silent mode.

My automation in HA:

action:
  -   service: notify.mobile_app_phone
       data:
         message: "Some message"
         title: "Some title"
           data:
             ttl: 0
             priority: high
             channel: alarm_stream

This just gives me a silent notification when the action is triggered. When I use my alarm clock on my phone it gives me a sound, so I would assume my alarm notifications are properly set-up on my Android device. Running Android v10 on Samsung device.

@KNXBroker
Copy link

Hello, with my phone (Google Pixel 3a) the situation is as follows:
alarm_stream is fine, normal alert tone is replayed.
However with alarm_stream_max only a very very low beep tone is replayed.

@dshokouhi
Copy link
Member

@KNXBroker you are confusing TTS for a normal notification. There is no alarm_stream_max for normal notifications. What you want is #1166

@xydix please edit your post title to mention this is Samsung specific.

For everyone else let's please stop mentioning TTS here to not cause further confusion. They don't work the same, TTS doesn't even use notification channels. We only kept the name as the intended functionality of using the alarm stream is the same. Code wise both TTS and notifications use the same audio attributes, but use a different Android API. I can reopen this issue once we help users understand what specifically the issue is as this impacts Samsung only.

Samsung users will need to stick to TTS to use the alarm stream in the meantime while we figure out the cause of this issue. If any user has access to ADB logs, you can try to help by grabbing the on device logs. You should see the entire message payload so make sure to grab all relevant information after you see the payload. You can use Android studio to get the ADB logs. Maybe there is some clue in the logs to help us.

@dshokouhi
Copy link
Member

Re-opening as there is one thing to try that I found in a stack overflow post. It did not specifically call out Samsung but it did mention some additional alarm attributes that continue to work on my device so hopefully this is what other manufacturers are expecting. No promises so if you are able to get ADB logs would be good to get them too.

My other suspicion is that its possible that samsung is just returning a blank URI for the alarm however I would expect to see a crash report if that were the case.

@dshokouhi dshokouhi reopened this Nov 8, 2020
@xydix xydix changed the title Silent notification when using channel: alarm_stream Silent notification when using channel: alarm_stream on Samsung devices Nov 8, 2020
@dshokouhi
Copy link
Member

There is another workaround you guys can use in the meantime while we try to figure things out. As part of 3.0 we also introduced new notification commands that will allow you to change the devices ringer mode or do not disturb setting. You can also use the corresponding sensors for these commands to determine the old state and send another command to set it back. I know its not exactly what this feature is but it should at least allow you to get by in the meantime.

@d3m3trius
Copy link

d3m3trius commented Nov 10, 2020

The issue is not Samsung specific, I have a OnePlus 6T and alarm_stream channel doesn't work in silent/vibration mode.

This is the log captured (sorry for the length, but I do not know what exactly to look for):

2020-11-10 18:37:42.314 1293-1293/? V/SettingsProvider: Notifying for 0: content://settings/system/fp_screen_time_out
2020-11-10 18:37:42.316 1089-1089/? W/adbd: timeout expired while flushing socket, closing
2020-11-10 18:37:42.317 1293-1293/? V/SettingsProvider: Notifying for 0: content://settings/global/device_is_dimming
2020-11-10 18:37:42.460 1293-1443/? I/DisplayPowerController: useProximityForceSuspend = false
2020-11-10 18:37:46.387 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-10 18:37:46.407 822-864/? I/sensors-hal: batch:183, android.sensor.proximity/45, period=200000000, max_latency=0
2020-11-10 18:37:46.407 822-864/? I/sensors-hal: batch:192, android.sensor.proximity/45, period=200000000, max_latency=0 request completed
2020-11-10 18:37:46.407 822-864/? I/sensors-hal: activate:150, android.sensor.proximity/45 en=1
2020-11-10 18:37:46.407 822-864/? I/sensors-hal: activate:161, android.sensor.proximity/45 en=1 completed
2020-11-10 18:37:46.407 1293-1390/? E/SensorService: setSensor enable handle=0x0000002d ERR=(Success)
2020-11-10 18:37:46.408 822-864/? I/sensors-hal: batch:183, android.sensor.light/37, period=200000000, max_latency=0
2020-11-10 18:37:46.408 822-864/? I/sensors-hal: batch:192, android.sensor.light/37, period=200000000, max_latency=0 request completed
2020-11-10 18:37:46.408 822-864/? I/sensors-hal: activate:150, android.sensor.light/37 en=1
2020-11-10 18:37:46.408 822-864/? I/sensors-hal: activate:161, android.sensor.light/37 en=1 completed
2020-11-10 18:37:46.408 1293-1390/? E/SensorService: setSensor enable handle=0x00000025 ERR=(Success)
2020-11-10 18:37:46.432 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-10 18:37:46.457 570-570/? I/chatty: uid=1000(system) hwservicemanage identical 2 lines
2020-11-10 18:37:46.459 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-10 18:37:46.468 5951-8434/? W/FirebaseMessaging: Missing Default Notification Channel metadata in AndroidManifest. Default value will be used.
2020-11-10 18:37:46.518 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-10 18:37:46.585 1293-1293/? V/NotificationService: Interrupting!
2020-11-10 18:37:46.578 570-570/? I/chatty: uid=1000(system) hwservicemanage identical 2 lines
2020-11-10 18:37:46.588 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-10 18:37:46.594 2786-2786/? D/OPSystemUIWLBHelper: packageName com.google.android.keep mCurrentMode 0 isMediaAllowed false
2020-11-10 18:37:46.594 2786-2786/? I/chatty: uid=10011(com.android.systemui) identical 1 line
2020-11-10 18:37:46.595 2786-2786/? D/OPSystemUIWLBHelper: packageName com.google.android.keep mCurrentMode 0 isMediaAllowed false
2020-11-10 18:37:46.595 2786-2786/? D/OPSystemUIWLBHelper: packageName com.google.android.googlequicksearchbox mCurrentMode 0 isMediaAllowed false
2020-11-10 18:37:46.599 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-10 18:37:46.600 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-10 18:37:46.603 21083-21083/? D/NotificationListener: onNotificationPosted# hash: 223673638
2020-11-10 18:37:46.603 21083-21083/? D/NotificationListener: onNotificationPosted# sbn: 175590049, package = io.homeassistant.companion.android
2020-11-10 18:37:46.604 21083-21083/? D/PopupDataProvider: onNotificationPosted dotShouldBeRefreshed = true, PackageUserKey = io.homeassistant.companion.android#0, containsDot = true
2020-11-10 18:37:46.604 21083-21083/? D/Launcher.Utilities: isNotificationBadging: badge: 1
2020-11-10 18:37:46.604 21083-21083/? D/BubbleTextView: applyDotState cn = ComponentInfo{io.homeassistant.companion.android/io.homeassistant.companion.android.launch.LaunchActivity}, animated = true, wasDoted = false, isDoted = true, dotScale = 1.0, mDotInfo = net.oneplus.launcher.dot.DotInfo@70e04c6
2020-11-10 18:37:46.604 2786-2786/? D/OPSystemUIWLBHelper: packageName io.homeassistant.companion.android mCurrentMode 0 isMediaAllowed false
2020-11-10 18:37:46.605 21083-21083/? D/Launcher.Utilities: isNotificationBadging: badge: 1
2020-11-10 18:37:46.605 21083-21083/? I/chatty: uid=10045(net.oneplus.launcher) identical 8 lines
2020-11-10 18:37:46.605 21083-21083/? D/Launcher.Utilities: isNotificationBadging: badge: 1
2020-11-10 18:37:46.605 21083-21083/? D/FolderIcon: Folder icon setBadgeInfo label = Smart Home, oldHasBadge = false, newHasBadge = true
2020-11-10 18:37:46.612 2786-2786/? D/OPSystemUIWLBHelper: packageName io.homeassistant.companion.android mCurrentMode 0 isMediaAllowed false
2020-11-10 18:37:46.641 2786-8441/? E/ndroid.systemu: Invalid ID 0x00000000.
2020-11-10 18:37:46.641 2786-8162/? E/ndroid.systemu: Invalid ID 0x00000000.
2020-11-10 18:37:46.642 2786-8441/? E/ndroid.systemu: Invalid ID 0x00000000.
2020-11-10 18:37:46.643 2786-8162/? E/ndroid.systemu: Invalid ID 0x00000000.
2020-11-10 18:37:46.643 2786-8441/? E/ndroid.systemu: Invalid ID 0x00000000.
2020-11-10 18:37:46.644 2786-8441/? I/chatty: uid=10011(com.android.systemui) AsyncTask #4676 identical 1 line
2020-11-10 18:37:46.644 2786-8441/? E/ndroid.systemu: Invalid ID 0x00000000.
2020-11-10 18:37:46.645 2786-8162/? E/ndroid.systemu: Invalid ID 0x00000000.
2020-11-10 18:37:46.653 2786-2786/? E/ndroid.systemu: Invalid ID 0x00000000.
2020-11-10 18:37:46.654 2141-2895/? W/NetworkScheduler: Error inserting flex_time=773000 job_id=-1 period=1547000 source=16 requires_charging=0 preferred_network_type=1 target_class=com.google.android.gms.measurement.PackageMeasurementTaskService user_id=0 target_package=com.google.android.gms tag=Measurement.PackageMeasurementTaskService.UPLOAD_TASK_TAG task_type=0 required_idleness_state=0 service_kind=0 source_version=203915000 persistence_level=1 preferred_charging_state=1 required_network_type=0 runtime=1605029866650 retry_strategy={"maximum_backoff_seconds":{"3600":0},"initial_backoff_seconds":{"30":0},"retry_policy":{"0":0}} last_runtime=0, error message: UNIQUE constraint failed: pending_ops.tag, pending_ops.target_class, pending_ops.target_package, pending_ops.user_id (code 2067 SQLITE_CONSTRAINT_UNIQUE) [CONTEXT service_id=218 ]
2020-11-10 18:37:46.655 2786-2786/? E/ndroid.systemu: Invalid ID 0x00000000.
2020-11-10 18:37:46.658 2786-2786/? D/OPSystemUIWLBHelper: packageName io.homeassistant.companion.android mCurrentMode 0 isMediaAllowed false
2020-11-10 18:37:46.659 2786-2786/? D/OPSystemUIWLBHelper: packageName com.google.android.keep mCurrentMode 0 isMediaAllowed false
2020-11-10 18:37:46.659 2786-2786/? I/chatty: uid=10011(com.android.systemui) identical 1 line
2020-11-10 18:37:46.659 2786-2786/? D/OPSystemUIWLBHelper: packageName com.google.android.keep mCurrentMode 0 isMediaAllowed false
2020-11-10 18:37:46.659 2786-2786/? D/OPSystemUIWLBHelper: packageName com.google.android.googlequicksearchbox mCurrentMode 0 isMediaAllowed false
2020-11-10 18:37:46.659 2786-2786/? D/OPSystemUIWLBHelper: packageName io.homeassistant.companion.android mCurrentMode 0 isMediaAllowed false
2020-11-10 18:37:46.660 2786-2786/? D/OPSystemUIWLBHelper: packageName com.google.android.keep mCurrentMode 0 isMediaAllowed false
2020-11-10 18:37:46.660 2786-2786/? I/chatty: uid=10011(com.android.systemui) identical 1 line
2020-11-10 18:37:46.660 2786-2786/? D/OPSystemUIWLBHelper: packageName com.google.android.keep mCurrentMode 0 isMediaAllowed false
2020-11-10 18:37:46.660 2786-2786/? D/OPSystemUIWLBHelper: packageName com.google.android.googlequicksearchbox mCurrentMode 0 isMediaAllowed false
2020-11-10 18:37:46.660 2786-2786/? D/OPSystemUIWLBHelper: packageName io.homeassistant.companion.android mCurrentMode 0 isMediaAllowed false
2020-11-10 18:37:46.670 1293-1443/? I/DisplayPowerController: useProximityForceSuspend = false
2020-11-10 18:37:46.672 1293-1443/? V/DisplayPowerController: Brightness [101] reason changing to: 'automatic', previous reason: 'automatic [ dim ]'.
2020-11-10 18:37:46.672 1293-1293/? V/SettingsProvider: Notifying for 0: content://settings/system/fp_screen_time_out
2020-11-10 18:37:46.682 1293-1293/? V/SettingsProvider: Notifying for 0: content://settings/global/device_is_dimming
2020-11-10 18:37:46.815 1293-1443/? I/DisplayPowerController: useProximityForceSuspend = false
2020-11-10 18:37:46.870 21083-21083/? D/DragController: onControllerInterceptTouchEvent ActionDown pos =252, 1128
2020-11-10 18:37:46.873 21083-21083/? D/ASCTouchController: onDragStart# currentAnimation: null
2020-11-10 18:37:46.873 21083-21083/? D/AppsSearchContainerLayout: setHint# primary: true
2020-11-10 18:37:46.873 21083-21083/? D/AppsSearchContainerLayout: setHint# parentFocus: false
2020-11-10 18:37:46.874 21083-21083/? D/AppsSearchContainerLayout: Showing call stack:
[AppsSearchContainerLayout] AppsSearchBarContainer.java, setHint, line: 430
[AppsSearchContainerLayout] AllAppsSwipeController.java, requestQuickSearch, line: 149
[AppsSearchContainerLayout] AllAppsSwipeController.java, initCurrentAnimation, line: 121
[AppsSearchContainerLayout] AbstractStateChangeTouchController.java, reinitCurrentAnimation, line: 243
[AppsSearchContainerLayout] AbstractStateChangeTouchController.java, onDragStart, line: 275
[AppsSearchContainerLayout] AllAppsSwipeController.java, onDragStart, line: 155
[AppsSearchContainerLayout] SwipeDetector.java, reportDragStart, line: 357
[AppsSearchContainerLayout] SwipeDetector.java, setState, line: 173
2020-11-10 18:37:46.876 21083-21083/? D/StateManager: setAnimation# targetState: ALL_APPS, anim: 4175365
2020-11-10 18:37:46.876 21083-21083/? D/StateManager: onStateTransitionStart# state: NORMAL -> ALL_APPS
2020-11-10 18:37:46.876 21083-21083/? D/RotationHelper: notifyChange: activityFlags= 1
2020-11-10 18:37:46.876 21083-21083/? D/LauncherAppWidgetHost: setResumed# isResumed: false, flag: 7
2020-11-10 18:37:46.877 21083-21083/? D/AllAppsTrans: onProgressAnimationStart, alpha = 1.0, isShowHidden = false, drawer visibility = 0, alpha = 1.0, allapps visibility = 0, alpha = 1.0
2020-11-10 18:37:46.877 21083-21083/? D/Launcher.Workspace: onStartStateTransition# toState: ALL_APPS
2020-11-10 18:37:46.877 21083-21083/? D/ASCTouchController: onDragStart# from: NORMAL to: ALL_APPS
2020-11-10 18:37:46.878 21083-21083/? D/BaseDragLayer: activeController: net.oneplus.launcher.touch.AllAppsSwipeController@517eef4
2020-11-10 18:37:47.090 1293-8440/? D/VibratorService: vibrate from 'io.homeassistant.companion.android', usageHint = 5
2020-11-10 18:37:47.137 21083-21083/? D/ASCTouchController: onDragEnd# currentAnimation: net.oneplus.launcher.anim.AnimatorPlaybackController$AnimatorPlaybackControllerVL@174365a
2020-11-10 18:37:47.137 21083-21083/? D/StateManager: createAnimationToNewWorkspaceInternal animationCancel, fromState = NORMAL, toState = ALL_APPS
2020-11-10 18:37:47.137 21083-21083/? D/SystemUiController: updateUiState setSystemUiVisibility = 8192
2020-11-10 18:37:47.144 21083-21083/? D/SystemUiController: Showing call stack:
[SystemUiController] AllAppsTransitionController.java, setProgress, line: 168
2020-11-10 18:37:47.146 21083-21083/? D/StateManager: onStateTransitionStart# state: NORMAL -> ALL_APPS
2020-11-10 18:37:47.146 21083-21083/? D/RotationHelper: notifyChange: activityFlags= 1
2020-11-10 18:37:47.146 21083-21083/? D/LauncherAppWidgetHost: setResumed# isResumed: false, flag: 5
2020-11-10 18:37:47.146 21083-21083/? D/AllAppsTrans: onProgressAnimationStart, alpha = 1.0, isShowHidden = false, drawer visibility = 0, alpha = 1.0, allapps visibility = 0, alpha = 1.0
2020-11-10 18:37:47.146 21083-21083/? D/Launcher.Workspace: onStartStateTransition# toState: ALL_APPS
2020-11-10 18:37:47.147 21083-21083/? D/SystemUiController: updateUiState setSystemUiVisibility = 0
2020-11-10 18:37:47.147 21083-21083/? D/SystemUiController: Showing call stack:
[SystemUiController] SystemUiController.java, clearUiState, line: 100
2020-11-10 18:37:47.281 21083-21083/? D/StateManager: onAnimationEnd# set currentAnim to empty.
2020-11-10 18:37:47.282 21083-21083/? D/Launcher.Workspace: onEndStateTransition# toState: ALL_APPS
2020-11-10 18:37:47.283 21083-21083/? D/ASCTouchController: onSwipeInteractionCompleted# targetState: NORMAL
2020-11-10 18:37:47.283 21083-21083/? D/StateManager: gotoState# fromState=ALL_APPS, toState=NORMAL, animated = false
2020-11-10 18:37:47.283 21083-21083/? D/StateManager: onStateTransitionStart# state: ALL_APPS -> NORMAL
2020-11-10 18:37:47.283 21083-21083/? D/RotationHelper: notifyChange: activityFlags= 1
2020-11-10 18:37:47.283 21083-21083/? D/LauncherAppWidgetHost: setResumed# isResumed: true, flag: 5
2020-11-10 18:37:47.292 21083-21083/? D/AlphabeticalAppsList: refillAdapterItems# app: 177, recent: 5, suggestion: 0, adapter: 183, hide games: 0, searchResults: null, filtered: 182. AppsStore# app: 177, recent: 18
2020-11-10 18:37:47.294 21083-21083/? D/AlphabeticalAppsList: refillAdapterItems# app: 177, recent: 5, suggestion: 0, adapter: 183, hide games: 0, searchResults: null, filtered: 182. AppsStore# app: 177, recent: 18
2020-11-10 18:37:47.294 21083-21083/? D/AlphabeticalHiddenAppsList: [refillAdapterItems] hidden app size = 1
2020-11-10 18:37:47.294 21083-21083/? D/AlphabeticalHiddenAppsList: [updateAdapterItems] hasFilter: false, filtersAppInfos size = 177, mAdapterItems size = 1
2020-11-10 18:37:47.297 21083-21083/? D/AllAppsTrans: onProgressAnimationEnd, alpha = 1.0, visibility = 4, isShowHidden = false, drawer visibility = 0, alpha = 1.0, allapps visibility = 0, alpha = 1.0
2020-11-10 18:37:47.297 21083-21083/? D/Launcher.Workspace: onStartStateTransition# toState: NORMAL
2020-11-10 18:37:47.297 21083-21083/? D/Launcher.Workspace: onEndStateTransition# toState: NORMAL
2020-11-10 18:37:47.299 21083-21083/? D/StateManager: onStateTransitionEnd# state: NORMAL
2020-11-10 18:37:47.300 21083-21083/? D/Launcher: onStateTransitionComplete set AppsView alphaProperty = 1.0, state = NORMAL
2020-11-10 18:37:47.300 21083-21083/? D/PagedView: notifyPageSwitchListener# page: 0 -> 0, who: LauncherRecentsView
2020-11-10 18:37:47.301 21083-21083/? D/DeviceHelper: isAtLeastOP8DeviceVersion: this= 18801 , is at least OP8: false
2020-11-10 18:37:47.301 21083-21083/? D/SkuHelper: showDiscover: false
2020-11-10 18:37:47.301 21083-21083/? D/SkuHelper: showSwipeDownAccessShelf: false, forceEnable = false
2020-11-10 18:37:47.307 21083-21083/? D/Launcher.Utilities: isNotificationBadging: badge: 1
2020-11-10 18:37:47.316 21083-21083/? I/chatty: uid=10045(net.oneplus.launcher) identical 28 lines
2020-11-10 18:37:47.316 21083-21083/? D/Launcher.Utilities: isNotificationBadging: badge: 1
2020-11-10 18:37:47.701 1293-2705/? D/OpPowerConsumpStatsInjector: processBatteryValues
2020-11-10 18:37:47.704 1293-1407/? W/AlarmManager: Unrecognized alarm listener com.android.server.b@c4b0803
2020-11-10 18:37:47.707 2786-2786/? D/KeyguardUpdateMonitor: received broadcast android.intent.action.BATTERY_CHANGED

@dshokouhi
Copy link
Member

@d3m3trius please try with the latest build starting from build 511 as it contains extra fixes, this build is not in the play store yet but you can install it off github. The log is somewhat helpful. If the issue is still reproducible in a later build please post another log.

@d3m3trius
Copy link

I tried v3.0.2 but it still does not work. This is the log in vibrate mode:

2020-11-13 14:34:06.524 1089-1089/? W/adbd: timeout expired while flushing socket, closing
2020-11-13 14:34:07.854 1089-1089/? W/adbd: timeout expired while flushing socket, closing
2020-11-13 14:34:08.250 1293-2614/? D/OpPowerConsumpStatsInjector: processBatteryValues
2020-11-13 14:34:08.253 1293-1407/? W/AlarmManager: Unrecognized alarm listener com.android.server.b@c4b0803
2020-11-13 14:34:08.255 2786-2786/? D/KeyguardUpdateMonitor: received broadcast android.intent.action.BATTERY_CHANGED
2020-11-13 14:34:08.738 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:08.793 570-570/? I/chatty: uid=1000(system) hwservicemanage identical 3 lines
2020-11-13 14:34:08.796 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:08.806 4724-8641/? W/FirebaseMessaging: Missing Default Notification Channel metadata in AndroidManifest. Default value will be used.
2020-11-13 14:34:08.831 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:08.842 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:08.851 16870-3854/? I/NetworkScheduler.Stats: Task com.google.android.gms/com.google.android.gms.icing.mdh.service.MobileDataHubGcmTaskService started execution. cause:3 exec_start_elapsed_seconds: 2060953 [CONTEXT service_id=218 ]
2020-11-13 14:34:08.855 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:08.861 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:08.874 16870-3933/? I/NetworkScheduler.Stats: Task com.google.android.gms/com.google.android.gms.icing.mdh.service.MobileDataHubGcmTaskService started execution. cause:3 exec_start_elapsed_seconds: 2060953 [CONTEXT service_id=218 ]
2020-11-13 14:34:08.887 16870-3854/? I/NetworkScheduler.Stats: Task com.google.android.gms/com.google.android.gms.icing.mdh.service.MobileDataHubGcmTaskService finished executing. cause:3 result: 1 elapsed_millis: 82 uptime_millis: 82 exec_start_elapsed_seconds: 2060953 [CONTEXT service_id=218 ]
2020-11-13 14:34:08.907 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:08.917 1293-1293/? V/NotificationService: Interrupting!
2020-11-13 14:34:08.919 570-570/? I/chatty: uid=1000(system) hwservicemanage identical 2 lines
2020-11-13 14:34:08.920 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:08.926 21083-21083/? D/NotificationListener: onNotificationPosted# hash: 223673638
2020-11-13 14:34:08.926 21083-21083/? D/NotificationListener: onNotificationPosted# sbn: 60338912, package = io.homeassistant.companion.android
2020-11-13 14:34:08.927 21083-21083/? D/PopupDataProvider: onNotificationPosted dotShouldBeRefreshed = true, PackageUserKey = io.homeassistant.companion.android#0, containsDot = true
2020-11-13 14:34:08.927 21083-21083/? D/Launcher.Utilities: isNotificationBadging: badge: 1
2020-11-13 14:34:08.927 21083-21083/? D/BubbleTextView: applyDotState cn = ComponentInfo{io.homeassistant.companion.android/io.homeassistant.companion.android.launch.LaunchActivity}, animated = true, wasDoted = false, isDoted = true, dotScale = 1.0, mDotInfo = net.oneplus.launcher.dot.DotInfo@7c49999
2020-11-13 14:34:08.927 2786-2786/? D/OPSystemUIWLBHelper: packageName com.google.android.googlequicksearchbox mCurrentMode 0 isMediaAllowed false
2020-11-13 14:34:08.928 21083-21083/? D/Launcher.Utilities: isNotificationBadging: badge: 1
2020-11-13 14:34:08.928 21083-21083/? I/chatty: uid=10045(net.oneplus.launcher) identical 8 lines
2020-11-13 14:34:08.928 21083-21083/? D/Launcher.Utilities: isNotificationBadging: badge: 1
2020-11-13 14:34:08.928 21083-21083/? D/FolderIcon: Folder icon setBadgeInfo label = Smart Home, oldHasBadge = false, newHasBadge = true
2020-11-13 14:34:08.928 21083-21083/? I/Surface: opservice is null false
2020-11-13 14:34:08.929 934-1445/? I/SurfaceFlinger: surface flinger receiver command 20001 .....
2020-11-13 14:34:08.932 2786-2786/? D/OPSystemUIWLBHelper: packageName io.homeassistant.companion.android mCurrentMode 0 isMediaAllowed false
2020-11-13 14:34:08.936 2786-2786/? D/OPSystemUIWLBHelper: packageName io.homeassistant.companion.android mCurrentMode 0 isMediaAllowed false
2020-11-13 14:34:08.951 2786-8436/? E/ndroid.systemu: Invalid ID 0x00000000.
2020-11-13 14:34:08.967 2786-8436/? I/chatty: uid=10011(com.android.systemui) AsyncTask #5616 identical 5 lines
2020-11-13 14:34:08.967 2786-8436/? E/ndroid.systemu: Invalid ID 0x00000000.
2020-11-13 14:34:08.970 2786-2786/? E/ndroid.systemu: Invalid ID 0x00000000.
2020-11-13 14:34:08.972 2786-2786/? E/ndroid.systemu: Invalid ID 0x00000000.
2020-11-13 14:34:08.975 2786-2786/? D/OPSystemUIWLBHelper: packageName io.homeassistant.companion.android mCurrentMode 0 isMediaAllowed false
2020-11-13 14:34:08.976 2786-2786/? D/OPSystemUIWLBHelper: packageName io.homeassistant.companion.android mCurrentMode 0 isMediaAllowed false
2020-11-13 14:34:08.976 2786-2786/? D/OPSystemUIWLBHelper: packageName com.google.android.googlequicksearchbox mCurrentMode 0 isMediaAllowed false
2020-11-13 14:34:08.976 2786-2786/? D/OPSystemUIWLBHelper: packageName io.homeassistant.companion.android mCurrentMode 0 isMediaAllowed false
2020-11-13 14:34:08.976 2786-2786/? D/OPSystemUIWLBHelper: packageName com.google.android.googlequicksearchbox mCurrentMode 0 isMediaAllowed false
2020-11-13 14:34:08.978 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:08.985 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:08.995 16870-3854/? W/NetworkScheduler: Error inserting flex_time=2425000 job_id=-1 period=4852000 source=16 requires_charging=0 preferred_network_type=1 target_class=com.google.android.gms.measurement.PackageMeasurementTaskService user_id=0 target_package=com.google.android.gms tag=Measurement.PackageMeasurementTaskService.UPLOAD_TASK_TAG task_type=0 required_idleness_state=0 service_kind=0 source_version=204215000 persistence_level=1 preferred_charging_state=1 required_network_type=0 runtime=1605274448958 retry_strategy={"maximum_backoff_seconds":{"3600":0},"initial_backoff_seconds":{"30":0},"retry_policy":{"0":0}} last_runtime=0, error message: UNIQUE constraint failed: pending_ops.tag, pending_ops.target_class, pending_ops.target_package, pending_ops.user_id (code 2067 SQLITE_CONSTRAINT_UNIQUE) [CONTEXT service_id=218 ]
2020-11-13 14:34:08.995 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:08.995 16870-3854/? I/NetworkScheduler.Stats: Task com.google.android.gms/com.google.android.gms.icing.mdh.service.MobileDataHubGcmTaskService finished executing. cause:3 result: 1 elapsed_millis: 144 uptime_millis: 144 exec_start_elapsed_seconds: 2060953 [CONTEXT service_id=218 ]
2020-11-13 14:34:08.997 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:09.008 16870-3933/? I/NetworkScheduler.Stats: Task com.google.android.gms/com.google.android.gms.games.chimera.GamesSyncServiceMainProxy started execution. cause:5 exec_start_elapsed_seconds: 2060953 [CONTEXT service_id=218 ]
2020-11-13 14:34:09.050 16870-3854/? I/NetworkScheduler.Stats: Task com.google.android.gms/com.google.android.gms.games.chimera.GamesSyncServiceMainProxy started execution. cause:5 exec_start_elapsed_seconds: 2060953 [CONTEXT service_id=218 ]
2020-11-13 14:34:09.082 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:09.113 570-570/? I/chatty: uid=1000(system) hwservicemanage identical 3 lines
2020-11-13 14:34:09.121 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:09.122 16912-5429/? I/PlayGamesServices[GamesSyncAdapter]: Starting sync for 7b828af4
2020-11-13 14:34:09.123 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:09.130 16912-8352/? I/PlayGamesServices[GamesSyncAdapter]: Starting sync for 3fae912c
2020-11-13 14:34:09.153 16912-5429/? I/PlayGamesServices[GamesSyncAdapter]: Sync duration for 7b828af4: 31
2020-11-13 14:34:09.158 16912-8352/? I/PlayGamesServices[GamesSyncAdapter]: Sync duration for 3fae912c: 28
2020-11-13 14:34:09.189 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:09.191 16870-3854/? I/NetworkScheduler.Stats: Task com.google.android.gms/com.google.android.gms.games.chimera.GamesSyncServiceMainProxy finished executing. cause:5 result: 1 elapsed_millis: 234 uptime_millis: 234 exec_start_elapsed_seconds: 2060953 [CONTEXT service_id=218 ]
2020-11-13 14:34:09.199 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:09.206 16870-3854/? I/NetworkScheduler.Stats: Task com.google.android.gms/com.google.android.gms.games.chimera.GamesSyncServiceMainProxy finished executing. cause:5 result: 1 elapsed_millis: 153 uptime_millis: 153 exec_start_elapsed_seconds: 2060953 [CONTEXT service_id=218 ]
2020-11-13 14:34:09.207 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:09.209 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:09.237 16912-17116/? I/PlayGamesServiceBroker: onGetService() from Client SDK version [204206000], Module version [204215037], PGA version [220370048], Account [Account {name=<>, type=com.google}], Calling package [com.google.android.gms], Game package [com.google.android.gms] [CONTEXT service_id=1 ]
2020-11-13 14:34:09.279 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:09.422 1293-8648/? D/VibratorService: vibrate from 'io.homeassistant.companion.android', usageHint = 5
2020-11-13 14:34:09.392 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-13 14:34:09.436 16912-8653/? I/PlayCommon: [40603] fsg.d: Preparing logs for uploading

@xydix
Copy link
Author

xydix commented Nov 13, 2020

There is another workaround you guys can use in the meantime while we try to figure things out. As part of 3.0 we also introduced new notification commands that will allow you to change the devices ringer mode or do not disturb setting. You can also use the corresponding sensors for these commands to determine the old state and send another command to set it back. I know its not exactly what this feature is but it should at least allow you to get by in the meantime.

I tired your workaround.
I kind of work.
I had to accept permissions for dnd.
After this it works.
This is the automation doing the trick.

     - service: notify.mobile_app_m*
       data:
         message: "command_ringer_mode"
         title: "normal"
     - delay: '00:00:01'
     - service: notify.mobile_app_m*
       data:
         title: "title"
         message: "message"
         data:
           ttl: 0
           priority: high
           channel: alarm_stream

The only problem is, if my phone lying unused for a while the command doesn't do anything.
Sure, you can blaime the phone and Samsung, their way to handle this but in the same time I triggered another automation using Telegram and that notification is getting through.

EDIT: Using only

     - service: notify.mobile_app_m*
       data:
         title: "title"
         message: "message"
         data:
           ttl: 0
           priority: high
           channel: alarm_stream

Still doesn't work with the lastest version of the app.

@dshokouhi
Copy link
Member

Lets all please move the convo to #1186 as this issue is now closed.

@dshokouhi
Copy link
Member

@d3m3trius please comment in #1186 and grab a new log. Your log is incomplete as it does not contain the notification message itself. At a minimum I expect to see the following log and then we will need about 20-30 (or more) log statements afterwards.

2020-11-13 11:03:38.344 4464-19423/? D/MessagingService: From: 331041709873
2020-11-13 11:03:38.345 4464-19423/? D/MessagingService: Message data payload: {channel=alarm_stream, message=test}
2020-11-13 11:03:38.347 4464-4464/? D/MessagingService: Creating notification with following data: {channel=alarm_stream, message=test}

You should see the full message payload.

I would also look for things like

2020-11-13 11:03:38.568 1583-1583/? D/NotificationService: 0|io.homeassistant.companion.android|-1023550355|null|10430: granting content://settings/system/alarm_alert

@d3m3trius
Copy link

@dshokouhi I can not find these messages in logcat, maybe they are included only in debug build. Is it possible ti change the log level in the app? Otherwise, how should I proceed?

@dshokouhi
Copy link
Member

@d3m3trius these are not from a debug build I was using the production version of the app, you may need to investigate the logcat tool you are using to ensure it gets all logs. If it is an app most likely you need to grant some permission via ADB too they would have that documented for you. You will definitely see these logs. Alternatively you can use android studio to get the logs too.

@d3m3trius
Copy link

d3m3trius commented Nov 14, 2020

@dshokouhi I am using Android Studio (verbose mode, no filters).
If the app is in background there is no trace of similar strings in my logs, the notification is shown correctly, but without sound.

If the app is in foreground, the notification message is empty (there is just the icon without text, is it another bug?) and still no sound. In this case, the log is:

2020-11-14 19:30:10.888 15783-16430/? D/MessagingService: From: 331041709873
2020-11-14 19:30:10.888 15783-16430/? D/MessagingService: Message data payload: {}
2020-11-14 19:30:10.898 15783-15783/? D/MessagingService: Creating notification with following data: {}
2020-11-14 19:30:10.904 806-11028/? D/vendor.qti.bluetooth@1.0-wake_lock: Release wakelock is released
2020-11-14 19:30:10.904 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-14 19:30:11.011 1293-1293/? V/NotificationService: Interrupting!
2020-11-14 19:30:10.999 570-570/? I/chatty: uid=1000(system) hwservicemanage identical 4 lines
2020-11-14 19:30:11.001 570-570/? E/SELinux: avc: denied { find } for interface=vendor.qti.hardware.servicetracker::IServicetracker sid=u:r:system_server:s0 pid=1293 scontext=u:r:system_server:s0 tcontext=u:object_r:default_android_hwservice:s0 tclass=hwservice_manager permissive=0
2020-11-14 19:30:11.021 21083-21083/? D/NotificationListener: onNotificationPosted# hash: 223673638
2020-11-14 19:30:11.021 21083-21083/? D/NotificationListener: onNotificationPosted# sbn: 43101594, package = io.homeassistant.companion.android
2020-11-14 19:30:11.024 2786-2786/? D/OPSystemUIWLBHelper: packageName com.google.android.keep mCurrentMode 0 isMediaAllowed false
2020-11-14 19:30:11.024 2786-2786/? I/chatty: uid=10011(com.android.systemui) identical 1 line
2020-11-14 19:30:11.029 2786-2786/? D/OPSystemUIWLBHelper: packageName io.homeassistant.companion.android mCurrentMode 0 isMediaAllowed false
2020-11-14 19:30:11.037 2786-2786/? I/chatty: uid=10011(com.android.systemui) identical 1 line
2020-11-14 19:30:11.053 2786-2786/? D/OPSystemUIWLBHelper: packageName io.homeassistant.companion.android mCurrentMode 0 isMediaAllowed false
2020-11-14 19:30:11.054 2786-2786/? D/OPSystemUIWLBHelper: packageName io.homeassistant.companion.android mCurrentMode 0 isMediaAllowed false
2020-11-14 19:30:11.054 2786-2786/? D/OPSystemUIWLBHelper: packageName com.google.android.keep mCurrentMode 0 isMediaAllowed false
2020-11-14 19:30:11.054 2786-2786/? D/OPSystemUIWLBHelper: packageName com.google.android.googlequicksearchbox mCurrentMode 0 isMediaAllowed false
2020-11-14 19:30:11.518 1293-16431/? D/VibratorService: vibrate from 'io.homeassistant.companion.android', usageHint = 5

Edit: it looks like there is no data payload in the notification; looking at https://firebase.google.com/docs/cloud-messaging/android/receive#handling_messages, in background the notification is delivered directly to the device’s system tray because there is no payload, and in foreground the log show empty payload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working notifications
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants