使用PushBots为Android推送通知 [英] Using PushBots for android push notification
本文介绍了使用PushBots为Android推送通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用pushbot为Android推送通知。它工作正常,如果应用程序运行时。但是,例如,如果应用程序没有运行,推送通知到达时,它会启动应用程序,然后崩溃了。任何建议对这个问题的原因是什么?
I am trying to use pushbot for android push notification. it works fine if when the application is running. But for instance if the application is not running and a push notification arrives, it starts the app and then crashes it. Any suggestion to the cause of this problem?
推荐答案
确认
- 您已经复制PushBots.jar文件到你的Android项目的库文件夹。
- 扩展应用程序类,并在其onCreate方法初始化PushBots,检查步骤6,7的的点击此处 查看详细信息
下面是一个示例code:
Here's a sample code:
import com.pushbots.push.Pushbots;
import android.app.Application;
public class MyApplication extends Application {
@Override public void onCreate() {
super.onCreate();
Pushbots.init(this, "","");
}
}
这篇关于使用PushBots为Android推送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文