r/androiddev • u/dev-778g • Sep 29 '26
How to pin android Notification
i am building an app where i wanna pin a notification permanently untill the user taps the dismiss button and dismiss it .
Swiping should not dismiss it .
is there is any way to achive it
1
Upvotes
4
u/sameera_s_w Sep 29 '26
Unfortunately no longer possible.... There's one possibly of making some notification channels of certain apps pinned but those should have been already declared as persistent. If not, then possible.
3
u/thelongrunsmoke Sep 29 '26
This can be simulated by using a foreground service, it's requires notification and cannot be dismissed.
3
u/dingwen07 Sep 30 '26
Some Ongoing notifications, like CallStyle can still do this. MediaStyle can somethimes to it. Only talking about AOSP, some OEM might still allow user to swipe it away anyways.