|
|
|
@ -34,14 +34,16 @@ public class MyBoradCReceiver extends BroadcastReceiver { |
|
|
|
String title = bundle.getString(JPushInterface.EXTRA_NOTIFICATION_TITLE); |
|
|
|
String content = bundle.getString(JPushInterface.EXTRA_ALERT); |
|
|
|
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())) { |
|
|
|
|