Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

android - notificationManager get notification by Id

Anyone know any way to get a notification by id? It's I want when get a new notification if it is still being shown in the status bar of Android want to get the information and add it to a new notification. Thank you.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

NotificationManager doesn't give you a way to find existing notifications by ID. If you want to update a notification, post a new notification but use the same ID. It will either show it as new or update the existing notification with that ID.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...