Browse Source

no message

master
lh 8 years ago
parent
commit
7a578e5bcb
1 changed files with 10 additions and 8 deletions
  1. +10
    -8
      app/src/main/java/com/qhclh/ytzh/index/MyBoradCReceiver.java

+ 10
- 8
app/src/main/java/com/qhclh/ytzh/index/MyBoradCReceiver.java View File

@ -34,14 +34,16 @@ public class MyBoradCReceiver extends BroadcastReceiver {
String title = bundle.getString(JPushInterface.EXTRA_NOTIFICATION_TITLE); String title = bundle.getString(JPushInterface.EXTRA_NOTIFICATION_TITLE);
String content = bundle.getString(JPushInterface.EXTRA_ALERT); String content = bundle.getString(JPushInterface.EXTRA_ALERT);
String typetime = bundle.getString(JPushInterface.EXTRA_EXTRA); String typetime = bundle.getString(JPushInterface.EXTRA_EXTRA);
NewsBean newsBean = new NewsBean();
newsBean.setTitle(title);
newsBean.setContent(content);
newsBean.setUrl("https://www.baidu.com/img/bd_logo1.png");
newsBean.setTime(DateTimeUtil.getDateToString(Long.parseLong(1510369871+"")));
newsBean.setType("04");
newsBean.setRed(1);
newsBean.save();
if ((title!=null && !"".equals(title)) && (content!=null && !"".equals(content)) && (typetime!=null && !"".equals(typetime))) {
NewsBean newsBean = new NewsBean();
newsBean.setTitle(title);
newsBean.setContent(content);
newsBean.setUrl("https://www.baidu.com/img/bd_logo1.png");
newsBean.setTime(DateTimeUtil.getDateToString(Long.parseLong(1510369871 + "")));
newsBean.setType("04");
newsBean.setRed(1);
newsBean.save();
}
} }
if (JPushInterface.ACTION_REGISTRATION_ID.equals(intent.getAction())) { if (JPushInterface.ACTION_REGISTRATION_ID.equals(intent.getAction())) {


Loading…
Cancel
Save