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