【发布时间】:2012-02-23 00:24:48
【问题描述】:
可能重复:
Android: How can I get the current foreground activity (from a service)?
Optionally starting activities and using notifications from services in Android. Only launch or notify if a certain app is present
如果我在 SyncService 中获得更新时生成通知,如果我已经在使用新信息的活动中,如何防止它出现?
这有点像当你使用 gmail 应用程序时,当你在应用程序之外时会收到通知,但当你在应用程序中时却看不到它。
【问题讨论】:
标签: android notifications