question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Silent notification when using channel: alarm_stream on Samsung devices

See original GitHub issue

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:

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:25 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
dshokouhicommented, Nov 8, 2020

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.

0reactions
d3m3triuscommented, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set an Android app's notifications to silent
By default, most notifications will arrive with a sound and/or ... Let's take a look at how to silence notifications on your Galaxy...
Read more >
Aggressive Notification with Sound on Android not working?
However, only a push notification appears and no real alarm. I want my phone to ring aggressively even in silent mode. service: notify....
Read more >
Control app notifications on your Galaxy phone or tablet
Navigate to and open Settings, and then tap Notifications. · Tap Advanced settings, and then tap the switch next to Show snooze button....
Read more >
Audible notifications using alarm stream when ring volume is ...
I have an existing app that was able to produce an audible notification sound even when the device had its ring volume silenced...
Read more >
Control notifications on Android - Google Help
Depending what notifications you want, you can change settings for certain apps or for your whole phone. Notifications show when you swipe down...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found