You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's only currently possible if all default notification handling is completely replaced, which is not ideal. OngoingActivity.recoverOngoingActivity(context) doesn't work with the system-provided ongoing activity.
The text was updated successfully, but these errors were encountered:
It should be possible to provide a hook to the NotificationCompat.Builder() so we can call OngoingActivity APIs.
From the docs you only need to call
.setSmallIcon(..)
.setOngoing(true)
on APIs that Media3 hides internally. Is this correct? The other APIs are Wear specific and we are not obscuring these or something if I understand correctly.
You can already call DefaultMediaNotificationProvider.setSmallIcon(resId).
So all you need is a setter to set the ongoing flag to true or false to your liking.
Can you please confirm whether this is correct, or then let us know what else you would need.
@marcbaechinger It seems that the ongoing activity builder needs the NotificationCompat.Builder and I also have to create the ongoing activity before NotificationCompat.Builder.build(). I can do this if I replace all of media3's notification stuff with my own, but I'd rather just leverage media3.
Wear already does provide a default ongoing activity so this is just if we want to customize that activity.
[REQUIRED] Use case description
We want to be able to customize the default ongoing activity.
Proposed solution
It should be possible to provide a hook to the NotificationCompat.Builder() so we can call OngoingActivity APIs. See: https://developer.android.com/training/wearables/notifications/ongoing-activity
Alternatives considered
It's only currently possible if all default notification handling is completely replaced, which is not ideal.
OngoingActivity.recoverOngoingActivity(context)
doesn't work with the system-provided ongoing activity.The text was updated successfully, but these errors were encountered: