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

December 2024 Android Pixel Update no longer respecting alarm_stream parameter for notifications #4915

Open
dshokouhi opened this issue Dec 18, 2024 · 7 comments
Labels
3rd party bug Something isn't working notifications

Comments

@dshokouhi
Copy link
Member

Home Assistant Android app version(s):

latest master

Android version(s):

15

Device model(s):

Pixel 9 pro XL and others as reported

Home Assistant version:

n/a

Last working Home Assistant release (if known):

n/a started December 2024, November 2024 was OK

Description of problem, include YAML if issue is related to notifications:

When sending alarm stream notifications they appear as silent and dont make a sound when default ringer is off

Companion App Logs:

YAML example:

action: notify.mobile_app_dannys_pixel_9_pro_xl
data:
  message: test
  data:
    channel: alarm_stream

Logs:

2024-12-17 15:36:39.559  2850-2850  audioAttributes         io....stant.companion.android.debug  D  AudioAttributes: usage=USAGE_ALARM content=CONTENT_TYPE_SONIFICATION flags=0x801 tags= bundle=null
2024-12-17 15:36:39.801  1625-1625  AS.AudioService         system_server                        I  shouldNotificationSoundPlay false: muted stream:7 attr:AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION

here we can see audio attribute set by the app are not respected and overridden.

Screenshot or video of problem:

Additional information:

Google tracker: https://issuetracker.google.com/issues/384844015

Not to be confused with: #1465 although very much related.

@dshokouhi dshokouhi added bug Something isn't working notifications 3rd party labels Dec 18, 2024
@monstergubl
Copy link

same here on pixel 8

@plym237
Copy link

plym237 commented Jan 2, 2025

This is also happening on the Pixel 7a

@home-assistant home-assistant deleted a comment from plym237 Jan 2, 2025
@chaelli
Copy link

chaelli commented Jan 9, 2025

does anyone know if this is a bug or a feature on androids side?

@droans
Copy link

droans commented Jan 10, 2025

I'm having the same issue here - Pixel 9 Pro running A15.

Here's some logging data that might help...

Service data:

action: notify.mobile_app_michael
data:
  message: abc
  data:
    ttl: 0
    priority: high
    channel: alarm_stream

adb shell dumpsys notification:

Current Notification Manager state:
  Notification List:
    NotificationRecord(0x05649eaa: pkg=io.homeassistant.companion.android user=UserHandle{0} id=1358806969 tag=null importance=4 key=0|io.homeassistant.companion.android|1358806969|null|10321: Notification(channel=alarm_stream shortcut=null contentView=null vibrate=null sound=null defaults=0 flags=AUTO_CANCEL color=0xff03a9f4 category=alarm vis=PRIVATE))
      uid=10321 userId=0
      opPkg=io.homeassistant.companion.android
      icon=Icon(typ=RESOURCE pkg=io.homeassistant.companion.android id=0x7f080147)
      flags=AUTO_CANCEL
      originalFlags=AUTO_CANCEL
      pri=0
      key=0|io.homeassistant.companion.android|1358806969|null|10321
      seen=true
      groupKey=0|io.homeassistant.companion.android|g:ranker_group
      notification=
            fullscreenIntent=null
            contentIntent=PendingIntent{5ab8a9b: PendingIntentRecord{db47497 io.homeassistant.companion.android startActivity (allowlist: eab4b5c:+30s0ms/0/NOTIFICATION_SERVICE/NotificationManagerService)}}
            deleteIntent=PendingIntent{d276e38: PendingIntentRecord{ecf4316 io.homeassistant.companion.android broadcastIntent (allowlist: eab4b5c:+30s0ms/0/NOTIFICATION_SERVICE/NotificationManagerService)}}
            number=0
            groupAlertBehavior=0
            when=1736525594577/1736525594577
            tickerText=null
            vis=0
            contentView=null
            bigContentView=null
            headsUpContentView=null
            color=0xff03a9f4
            timeout=PT72H
            extras={
                android.title=null
                android.reduced.images=Boolean (true)
                android.subText=null
                android.template=String (android.app.Notification$BigTextStyle)
                android.showChronometer=Boolean (false)
                android.text=SpannableString [length=3]
                android.progress=Integer (0)
                androidx.core.app.extra.COMPAT_TEMPLATE=String [length=49]
                android.progressMax=Integer (0)
                android.appInfo=ApplicationInfo (ApplicationInfo{4af2e11 io.homeassistant.companion.android})
                android.showWhen=Boolean (true)
                android.largeIcon=null
                android.bigText=SpannableString [length=3]
                android.infoText=null
                android.progressIndeterminate=Boolean (false)
                android.remoteInputHistory=null
            }
      publicNotification=
            None
      stats=SingleNotificationStats{posttimeElapsedMs=116741365, posttimeToFirstClickMs=-1, posttimeToDismissMs=-1, airtimeCount=1, airtimeMs=537, currentAirtimeStartElapsedMs=-1, airtimeExpandedMs=534, posttimeToFirstVisibleExpansionMs=698, currentAirtimeExpandedStartElapsedMs=-1, requestedImportance=3, naturalImportance=4, isNoisy=true}
      mContactAffinity=0.0
      mRecentlyIntrusive=false
      mPackagePriority=2
      mPackageVisibility=-1000
      mSystemImportance=UNSPECIFIED
      mAsstImportance=UNSPECIFIED
      mImportance=HIGH
      mImportanceExplanation=user
      mProposedImportance=UNSPECIFIED
      mIsAppImportanceLocked=true
      mSensitiveContent=false
      mCanceledAfterLifetimeExtension=false
      mIntercept=false
      mHidden==false
      mGlobalSortKey=crtcl=0x0002:intrsv=2:grnk=0x0000:gsmry=1:nsk:rnk=0x0000
      mRankingTimeMs=1736525594577
      mCreationTimeMs=1736525594582
      mVisibleSinceMs=1736525595492
      mUpdateTimeMs=1736525594582
      mInterruptionTimeMs=1736525595493
      mSuppressedVisualEffects= 0
      mSound= content://media/internal/audio/media/15?title=Fresh%20Start&canonical=1
      mVibration= Composed{segments=[Step{amplitude=0.0, frequencyHz=0.0, duration=0}, Step{amplitude=-1.0, frequencyHz=0.0, duration=350}, Step{amplitude=0.0, frequencyHz=0.0, duration=250}, Step{amplitude=-1.0, frequencyHz=0.0, duration=350}], repeat=-1}
      mAttributes= AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null
      mLight= null
      mShowBadge=true
      mColorized=false
      mAllowBubble=false
      isBubble=false
      mIsInterruptive=true
      effectiveNotificationChannel=NotificationChannel{mId='alarm_stream', mName=alarm_stream, mDescription=, mImportance=4, mBypassDnd=true, mLockscreenVisibility=-1000, mSound=content://media/internal/audio/media/15?title=Fresh%20Start&canonical=1, mLights=false, mLightColor=0, mVibrationPattern=null, mVibrationEffect=null, mUserLockedFields=15, mUserVisibleTaskShown=false, mVibrationEnabled=true, mShowBadge=true, mDeleted=false, mDeletedTimeMs=-1, mGroup='null', mAudioAttributes=AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null, mBlockableSystem=false, mAllowBubbles=-1, mImportanceLockedDefaultApp=false, mOriginalImp=3, mParent=null, mConversationId=null, mDemoted=false, mImportantConvo=false, mLastNotificationUpdateTimeMs=0}
      mAdjustments=[]
      shortcut=null found valid? false
      mUserVisOverride=-1000

App logs:

01-10 11:13:14.540 25371 25446 D WebSocketRepository: Websocket: onMessage (text)
01-10 11:13:14.541 25371 25446 D WebSocketRepository: Message number 2 received
01-10 11:13:14.544 25371  5897 D WebSocketRepository: Sending message 1558: {type=mobile_app/push_notification_confirm, webhook_id=549b315fce5862c994c922af801bf0b5d02a4ed31ba71acd3192dd90c2b3a101, confirm_id=6b2ff297102b97e41c8af751a18b731c, id=1558}
01-10 11:13:14.545 25371  5897 D WebSocketRepository: Message number 1558 sent
01-10 11:13:14.551 25371 25446 D WebSocketRepository: Websocket: onMessage (text)
01-10 11:13:14.552 25371 25446 D WebSocketRepository: Message number 1558 received
01-10 11:13:14.556 25371 25371 D MessagingService: Creating notification with following data: {ttl=0, priority=high, channel=alarm_stream, message=abc, webhook_id=549b315fce5862c994c922af801bf0b5d02a4ed31ba71acd3192dd90c2b3a101, server_id=2}
01-10 11:13:14.580 25371 25371 D MessagingService: Show notification with tag "null" and id "1358806969"

@dshokouhi
Copy link
Member Author

    channel: alarm_stream_max

alarm_stream_max is invalid for standard notifications. that would never work.

@droans
Copy link

droans commented Jan 10, 2025

Sorry - was testing a few different ways. I've updated my comment.

@dshokouhi
Copy link
Member Author

does anyone know if this is a bug or a feature on androids side?

bug, feature used to work well until recently and the bug was filed with google. its already assigned so hopefully will be fixed. They are deliberately changing things here based on the findings in the bug.

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

No branches or pull requests

5 participants