【问题标题】:Android Notifications Listening in the Background在后台监听 Android 通知
【发布时间】:2012-07-30 16:42:10
【问题描述】:

http://developer.android.com/guide/topics/ui/notifiers/notifications.html 了解如何为 android 创建通知。现在我的问题是:如何在后台监听应用程序的更新?

假设我有一个应用程序可以让用户邀请其他用户参加活动。我希望受邀用户在发生这种情况时收到通知。我会在应用程序中的哪里收听这个?我应该每隔几分钟就调用一次数据库吗?当应用程序在后台运行时,这甚至可能吗?

【问题讨论】:

    标签: android notifications


    【解决方案1】:

    您需要在您的应用中创建一个service。请参阅 here 专门了解如何使用 IntentService。

    【讨论】:

      猜你喜欢
      • 2011-09-15
      • 2012-09-07
      • 2017-11-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-01
      相关资源
      最近更新 更多