极光推送广播接收器 跳转~
来源:互联网 发布:最优化算法例题 编辑:程序博客网 时间:2024/06/05 02:35
1:先在AndroidManifest定义广播静态接收器
<receiver android:name="You receiverName" android:enabled="true"> <intent-filter> <action android:name="cn.jpush.android.intent.REGISTRATION" /> <action android:name="cn.jpush.android.intent.MESSAGE_RECEIVED" /> <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED" /> <action android:name="cn.jpush.android.intent.NOTIFICATION_OPENED" /> <category android:name="You Package/> </intent-filter></receiver>
2:写一个自己的广播接收器
if (JPushInterface.ACTION_REGISTRATION_ID.equals(intent.getAction())) {} else if (JPushInterface.ACTION_NOTIFICATION_RECEIVED.equals(intent.getAction())) { System.out.println("收到了通知"); // 在这里可以做些统计,或者做些其他工作} else if (JPushInterface.ACTION_NOTIFICATION_OPENED.equals(intent.getAction())) { System.out.println("用户点击打开了通知"); // 在这里可以自己写代码去定义用户点击后的行为 Intent i = new Intent(context, Activity.class); //自定义打开的界面 i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(i);}
阅读全文
0 0
- 极光推送广播接收器 跳转~
- 极光推送页面跳转
- phonegap+极光推送+页面跳转
- 极光推送点击跳转问题
- 极光推送之自定义广播接受者
- Android极光推送集成和跳转
- 极光推送怎么点击通知跳转页面?
- 广播接收器
- 广播接收器
- android 广播接收器之通知栏页面跳转
- iOS极光推送 点击推送消息跳转页面
- 【iOS开发】iOS极光推送 点击推送消息跳转页面
- iOS极光推送 点击推送消息跳转页面
- iOS极光推送 点击推送消息跳转页面
- iOS极光推送 点击推送消息跳转页面
- iOS极光推送 点击推送消息跳转页面
- iOS极光推送 点击推送消息跳转页面
- 极光推送 推送处理总结 点击通知跳转
- [LeetCode] Spiral Matrix
- [LeetCode] Spiral Matrix II
- [LeetCode] Subsets
- [LeetCode] Subsets II
- AsynchronousFileChannel
- 极光推送广播接收器 跳转~
- [LeetCode] Symmetric Tree
- Input设备驱动
- [LeetCode] Swap Nodes in Pairs
- [LeetCode] Sum Root to Leaf Numbers
- Android ListView批量选择(全选、反选、全不选)
- [LeetCode] Two Sum
- [LeetCode] Trapping Rain Water
- [LeetCode] Triangle