1.极光推送
https://www.jiguang.cn/
public class AppContext extends Application { @Override public void onCreate() { super.onCreate(); JPushInterface.setDebugMode(true); JPushInterface.init(this); } }
public class TalkReceiver extends BroadcastReceiver { private static final String TAG = "TalkReceiver"; private NotificationManager nm; @Override public void onReceive(Context context, Intent intent) { if (null == nm) { nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); } Bundle bundle = intent.getExtras(); if (JPushInterface.ACTION_REGISTRATION_ID.equals(intent.getAction())) { Log.d(TAG, "JPush用户注册成功"); } else if (JPushInterface.ACTION_MESSAGE_RECEIVED.equals(intent.getAction())) { String title = bundle.getString(JPushInterface.EXTRA_TITLE); String message = bundle.getString(JPushInterface.EXTRA_MESSAGE); Log.d(TAG, "接受到推送下来的自定义消息:"+title+" == "+message); } else if (JPushInterface.ACTION_NOTIFICATION_RECEIVED.equals(intent.getAction())) { Log.d(TAG, "接受到推送下来的通知"); } else if (JPushInterface.ACTION_NOTIFICATION_OPENED.equals(intent.getAction())) { Log.d(TAG, "用户点击打开了通知"); } else { Log.d(TAG, "Unhandled intent - " + intent.getAction()); } } }
2.百度云推送
http://push.baidu.com/
3.友盟推送
http://www.umeng.com/
4.个推推送
http://www.getui.com/