Commit 1ca0d3fc by amateur

1

1 parent f6860e10
package com.polysoft.nafmii.jpush;
import android.text.TextUtils;
import com.polysoft.nafmii.database.ObjectBox;
import com.polysoft.nafmii.database.entity.DataEntity;
import com.polysoft.nafmii.utils.CtxUtils;
......@@ -11,7 +9,7 @@ import cn.jpush.android.data.JPushLocalNotification;
public class JPushMgr {
public static final String JPUSH_ALIAS_KEY= "JPUSH_ALIAS";
public static final String JPUSH_ALIAS_KEY = "JPUSH_ALIAS";
// 是否停止推送
public static boolean isPushStopped() {
......@@ -30,6 +28,18 @@ public class JPushMgr {
}
}
public static void sendLearnLocalNotice(String title, String content, String json) {
JPushLocalNotification ln = new JPushLocalNotification();
ln.setBuilderId(0);
ln.setContent(content);
ln.setTitle(title);
long id = System.currentTimeMillis() / 1000;
ln.setNotificationId(id);
ln.setBroadcastTime(System.currentTimeMillis());
ln.setExtras(json);
snedLoaclNotice(ln);
}
// 获取注册到极光的id
public static String getRegistrationID() {
return JPushInterface.getRegistrationID(CtxUtils.getApplication());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!