您好我必须做什么才能使我的Android应用程序与smooch SDK集成,始终在后台运行 .
示例如果您有BBM,Facebook或Gmail,当您使用后退按钮关闭应用程序或退出时,即使应用程序未运行,该应用程序仍会向您发送通知 .
该应用程序未在后台运行,但有一个 BroadcastReceiver 的应用程序在后台运行 . 每当 BroadcastReceiver 收到通知时,它就会开始 Service ,执行通知需要完成的操作 . 您可以使用Google Cloud Messaging在服务器端创建通知 .
BroadcastReceiver
Service
所以,请阅读:
Google Cloud Messaging Check it here
通过 BroadcastReceiver 接收通知
开始 Service
希望能帮助到你 .
Smooch内置了GCM功能 . 如果您想将GCM添加到您的应用程序中,只需follow this guide .
2 回答
该应用程序未在后台运行,但有一个
BroadcastReceiver
的应用程序在后台运行 . 每当BroadcastReceiver
收到通知时,它就会开始Service
,执行通知需要完成的操作 . 您可以使用Google Cloud Messaging在服务器端创建通知 .所以,请阅读:
Google Cloud Messaging Check it here
通过
BroadcastReceiver
接收通知开始
Service
希望能帮助到你 .
Smooch内置了GCM功能 . 如果您想将GCM添加到您的应用程序中,只需follow this guide .