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?
Make sure
- you've copied PushBots.jar file into libraries folder of your android project.
- Extended the Application Class, and initialized PushBots in its onCreate method, check out steps 6,7 click here for more details
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, "","");
}
}
来源:https://stackoverflow.com/questions/18853064/using-pushbots-for-android-push-notification