Commit 78184bb7e0d96c6ac0615470296b1aa4716e0ed7

Authored by 张道锋
1 parent 8c9c3f09

no message

.idea/misc.xml
... ... @@ -24,7 +24,7 @@
24 24 </value>
25 25 </option>
26 26 </component>
27   - <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
  27 + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
28 28 <output url="file://$PROJECT_DIR$/build/classes" />
29 29 </component>
30 30 <component name="ProjectType">
... ...
.idea/modules.xml
... ... @@ -4,8 +4,8 @@
4 4 <modules>
5 5 <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
6 6 <module fileurl="file://$PROJECT_DIR$/mvpsdk/mvpsdk.iml" filepath="$PROJECT_DIR$/mvpsdk/mvpsdk.iml" />
  7 + <module fileurl="file://$PROJECT_DIR$/parentWorkHolper.iml" filepath="$PROJECT_DIR$/parentWorkHolper.iml" />
7 8 <module fileurl="file://E:\parentwork\parentWorkHolper.iml" filepath="E:\parentwork\parentWorkHolper.iml" />
8   - <module fileurl="file://$PROJECT_DIR$/parentwork.iml" filepath="$PROJECT_DIR$/parentwork.iml" />
9 9 <module fileurl="file://F:\parentWorkHolper\parentwork.iml" filepath="F:\parentWorkHolper\parentwork.iml" />
10 10 <module fileurl="file://$PROJECT_DIR$/roundedimageview-2.2.1/roundedimageview-2.2.1.iml" filepath="$PROJECT_DIR$/roundedimageview-2.2.1/roundedimageview-2.2.1.iml" />
11 11 </modules>
... ...
app/src/main/java/com/shunzhi/parent/AppContext.java
... ... @@ -18,6 +18,7 @@ import com.amap.api.location.AMapLocationClientOption.AMapLocationMode;
18 18 import com.shunzhi.parent.bean.message.DaoMaster;
19 19 import com.shunzhi.parent.bean.message.DaoMaster.DevOpenHelper;
20 20 import com.shunzhi.parent.bean.message.DaoSession;
  21 +import com.shunzhi.parent.manager.MessageManager;
21 22 import com.shunzhi.parent.ui.MainActivity;
22 23  
23 24 import org.greenrobot.greendao.database.Database;
... ... @@ -49,6 +50,7 @@ public class AppContext extends GlobalApplication {
49 50 //声明AMapLocationClientOption对象
50 51 public AMapLocationClientOption mLocationOption = null;
51 52  
  53 + private MessageManager messageManager;
52 54 @Override
53 55 public void onCreate() {
54 56 appContext = this;
... ... @@ -57,6 +59,11 @@ public class AppContext extends GlobalApplication {
57 59 initMapLocal();
58 60 NIMClient.init(this, loginInfo(), options());
59 61 initDB();
  62 + messageManager = MessageManager.getInstance();
  63 + }
  64 +
  65 + public MessageManager getMessageManager(){
  66 + return messageManager;
60 67 }
61 68  
62 69 private void initDB() {
... ...
app/src/main/java/com/shunzhi/parent/manager/MessageManager.java
... ... @@ -102,6 +102,7 @@ public class MessageManager {
102 102 session.setSessionName("作业通知");
103 103 session.setDate(new Date(customNotification.getTime()));
104 104 session.setSessionText(json.optString("title"));
  105 +
105 106 PHMessage message = new PHMessage();
106 107 PHMessageDao messageDao = AppContext.getInstance().getDaoSession().getPHMessageDao();
107 108 message.setDate(new Date(customNotification.getTime()));
... ...