Commit fc0ad32ac60e7ebe4db3c7823facf5e66d884fc2
1 parent
bc58b7bb
Exists in
yxb_dev
and in
1 other branch
no message
Showing
8 changed files
with
37 additions
and
29 deletions
Show diff stats
app/src/main/AndroidManifest.xml
| @@ -154,6 +154,7 @@ | @@ -154,6 +154,7 @@ | ||
| 154 | android:windowSoftInputMode="adjustPan|stateAlwaysHidden" /> | 154 | android:windowSoftInputMode="adjustPan|stateAlwaysHidden" /> |
| 155 | <activity | 155 | <activity |
| 156 | android:name=".ui.MainActivity" | 156 | android:name=".ui.MainActivity" |
| 157 | + android:launchMode="singleTask" | ||
| 157 | android:screenOrientation="portrait" /> | 158 | android:screenOrientation="portrait" /> |
| 158 | <activity | 159 | <activity |
| 159 | android:name=".ui.activity.ChildDetialActivity" | 160 | android:name=".ui.activity.ChildDetialActivity" |
app/src/main/java/com/shunzhi/parent/bean/message/PHMessage.java
| @@ -65,6 +65,7 @@ public class PHMessage { | @@ -65,6 +65,7 @@ public class PHMessage { | ||
| 65 | return dao.queryBuilder() | 65 | return dao.queryBuilder() |
| 66 | .where(PHMessageDao.Properties.SessionType.in( | 66 | .where(PHMessageDao.Properties.SessionType.in( |
| 67 | PHMessageSession.sessionType_homework, | 67 | PHMessageSession.sessionType_homework, |
| 68 | + PHMessageSession.sessionType_kaoqin, | ||
| 68 | PHMessageSession.sessionType_notification//新加通知类型请在此处加上,否则会导致计数不准确 | 69 | PHMessageSession.sessionType_notification//新加通知类型请在此处加上,否则会导致计数不准确 |
| 69 | )) | 70 | )) |
| 70 | .count(); | 71 | .count(); |
app/src/main/java/com/shunzhi/parent/bean/message/PHMessageSession.java
| @@ -2,12 +2,14 @@ package com.shunzhi.parent.bean.message; | @@ -2,12 +2,14 @@ package com.shunzhi.parent.bean.message; | ||
| 2 | 2 | ||
| 3 | import com.shunzhi.parent.AppConfig; | 3 | import com.shunzhi.parent.AppConfig; |
| 4 | import com.shunzhi.parent.AppContext; | 4 | import com.shunzhi.parent.AppContext; |
| 5 | + | ||
| 5 | import org.greenrobot.greendao.annotation.Entity; | 6 | import org.greenrobot.greendao.annotation.Entity; |
| 6 | -import org.greenrobot.greendao.annotation.Id; | ||
| 7 | -import java.util.Date; | ||
| 8 | import org.greenrobot.greendao.annotation.Generated; | 7 | import org.greenrobot.greendao.annotation.Generated; |
| 8 | +import org.greenrobot.greendao.annotation.Id; | ||
| 9 | import org.greenrobot.greendao.annotation.Keep; | 9 | import org.greenrobot.greendao.annotation.Keep; |
| 10 | 10 | ||
| 11 | +import java.util.Date; | ||
| 12 | + | ||
| 11 | /** | 13 | /** |
| 12 | * Created by 10501 on 2018/3/20. | 14 | * Created by 10501 on 2018/3/20. |
| 13 | */ | 15 | */ |
| @@ -29,6 +31,8 @@ public class PHMessageSession { | @@ -29,6 +31,8 @@ public class PHMessageSession { | ||
| 29 | public static final int sessionType_notification = 101; | 31 | public static final int sessionType_notification = 101; |
| 30 | @Keep | 32 | @Keep |
| 31 | public static final int sessionType_homework = 102; | 33 | public static final int sessionType_homework = 102; |
| 34 | + @Keep | ||
| 35 | + public static final int sessionType_kaoqin = 103; | ||
| 32 | 36 | ||
| 33 | @Generated(hash = 1156938953) | 37 | @Generated(hash = 1156938953) |
| 34 | public PHMessageSession(Long id, String sessionId, String sessionText, String sessionName, | 38 | public PHMessageSession(Long id, String sessionId, String sessionText, String sessionName, |
| @@ -60,6 +64,10 @@ public class PHMessageSession { | @@ -60,6 +64,10 @@ public class PHMessageSession { | ||
| 60 | session.setSessionId(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_ID) + "_homework_" + System.currentTimeMillis()); | 64 | session.setSessionId(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_ID) + "_homework_" + System.currentTimeMillis()); |
| 61 | session.setSessionName("作业通知"); | 65 | session.setSessionName("作业通知"); |
| 62 | break; | 66 | break; |
| 67 | + case sessionType_kaoqin: | ||
| 68 | + session.setSessionId(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.USER_ID) + "_kaoqin_" + System.currentTimeMillis()); | ||
| 69 | + session.setSessionName("考勤通知"); | ||
| 70 | + break; | ||
| 63 | } | 71 | } |
| 64 | AppContext.getInstance().getDaoSession().getPHMessageSessionDao().insert(session); | 72 | AppContext.getInstance().getDaoSession().getPHMessageSessionDao().insert(session); |
| 65 | } | 73 | } |
app/src/main/java/com/shunzhi/parent/manager/MessageManager.java
| @@ -99,7 +99,7 @@ public class MessageManager { | @@ -99,7 +99,7 @@ public class MessageManager { | ||
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | private void onCustomNotificationReceive(CustomNotification customNotification) { | 101 | private void onCustomNotificationReceive(CustomNotification customNotification) { |
| 102 | - Timber.d("sss-==" + customNotification.getSessionId()); | 102 | + Timber.d("sss-==" + customNotification.getContent()); |
| 103 | try { | 103 | try { |
| 104 | JSONObject json = new JSONObject(customNotification.getContent()); | 104 | JSONObject json = new JSONObject(customNotification.getContent()); |
| 105 | Timber.d("sss-==" + json.toString()); | 105 | Timber.d("sss-==" + json.toString()); |
| @@ -124,20 +124,21 @@ public class MessageManager { | @@ -124,20 +124,21 @@ public class MessageManager { | ||
| 124 | notifyNotification(uuid, id, "收到一条作业通知"); | 124 | notifyNotification(uuid, id, "收到一条作业通知"); |
| 125 | } else if ("attend".equals(type)) { | 125 | } else if ("attend".equals(type)) { |
| 126 | //考勤 | 126 | //考勤 |
| 127 | - PHMessageSession session = PHMessageSession.findAndCreateSession(PHMessageSession.sessionType_homework, true); | 127 | + PHMessageSession session = PHMessageSession.findAndCreateSession(PHMessageSession.sessionType_kaoqin, true); |
| 128 | session.setSessionName("考勤通知"); | 128 | session.setSessionName("考勤通知"); |
| 129 | session.setDate(new Date(customNotification.getTime())); | 129 | session.setDate(new Date(customNotification.getTime())); |
| 130 | session.setSessionText(json.optString("title")); | 130 | session.setSessionText(json.optString("title")); |
| 131 | -// ToastUtils.showToast(json.optString("title")+"uuid="+uuid); | ||
| 132 | 131 | ||
| 133 | PHMessage message = new PHMessage(); | 132 | PHMessage message = new PHMessage(); |
| 134 | PHMessageDao messageDao = AppContext.getInstance().getDaoSession().getPHMessageDao(); | 133 | PHMessageDao messageDao = AppContext.getInstance().getDaoSession().getPHMessageDao(); |
| 135 | message.setDate(new Date(customNotification.getTime())); | 134 | message.setDate(new Date(customNotification.getTime())); |
| 136 | message.setMessageId(uuid); | 135 | message.setMessageId(uuid); |
| 137 | message.setSessionId(session.getSessionId()); | 136 | message.setSessionId(session.getSessionId()); |
| 137 | + message.setMessageText("不能为空的字段。。。"); | ||
| 138 | message.setExValue(customNotification.getContent()); | 138 | message.setExValue(customNotification.getContent()); |
| 139 | message.setSessionType(session.getSessionType()); | 139 | message.setSessionType(session.getSessionType()); |
| 140 | Long id = messageDao.insert(message); | 140 | Long id = messageDao.insert(message); |
| 141 | + Log.e("aaaaa","------"+id); | ||
| 141 | notifyNotification(uuid, id, "收到一条考勤通知"); | 142 | notifyNotification(uuid, id, "收到一条考勤通知"); |
| 142 | } | 143 | } |
| 143 | } catch (JSONException e) { | 144 | } catch (JSONException e) { |
| @@ -146,8 +147,9 @@ public class MessageManager { | @@ -146,8 +147,9 @@ public class MessageManager { | ||
| 146 | } | 147 | } |
| 147 | 148 | ||
| 148 | public void notifyNotification(String uuid, long msgLongId, String text) { | 149 | public void notifyNotification(String uuid, long msgLongId, String text) { |
| 149 | - if (!isNotiNotification) | 150 | + if (!isNotiNotification) { |
| 150 | return; | 151 | return; |
| 152 | + } | ||
| 151 | int notificationCount = (int) PHMessage.findUnreadNotificationCount();//XSTMessage.findUnreadNotificationCount(); | 153 | int notificationCount = (int) PHMessage.findUnreadNotificationCount();//XSTMessage.findUnreadNotificationCount(); |
| 152 | boolean setBadgerSuccessful = ShortcutBadger.applyCount(AppContext.getInstance(), notificationCount); | 154 | boolean setBadgerSuccessful = ShortcutBadger.applyCount(AppContext.getInstance(), notificationCount); |
| 153 | Timber.i("----== notificationCount : %s ,setBadgerSuccessful : %s", notificationCount, setBadgerSuccessful); | 155 | Timber.i("----== notificationCount : %s ,setBadgerSuccessful : %s", notificationCount, setBadgerSuccessful); |
app/src/main/java/com/shunzhi/parent/ui/MainActivity.java
| @@ -15,9 +15,7 @@ import com.shunzhi.parent.AppContext; | @@ -15,9 +15,7 @@ import com.shunzhi.parent.AppContext; | ||
| 15 | import com.shunzhi.parent.R; | 15 | import com.shunzhi.parent.R; |
| 16 | import com.shunzhi.parent.bean.message.PHMessage; | 16 | import com.shunzhi.parent.bean.message.PHMessage; |
| 17 | import com.shunzhi.parent.bean.message.PHMessageDao; | 17 | import com.shunzhi.parent.bean.message.PHMessageDao; |
| 18 | -import com.shunzhi.parent.bean.message.PHMessageSession; | ||
| 19 | import com.shunzhi.parent.manager.MessageManager; | 18 | import com.shunzhi.parent.manager.MessageManager; |
| 20 | -import com.shunzhi.parent.ui.fragment.CePingFragment; | ||
| 21 | import com.shunzhi.parent.ui.fragment.ConsultFragment; | 19 | import com.shunzhi.parent.ui.fragment.ConsultFragment; |
| 22 | import com.shunzhi.parent.ui.fragment.MineFragment; | 20 | import com.shunzhi.parent.ui.fragment.MineFragment; |
| 23 | import com.shunzhi.parent.ui.fragment.ReportFragment; | 21 | import com.shunzhi.parent.ui.fragment.ReportFragment; |
| @@ -36,6 +34,7 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. | @@ -36,6 +34,7 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. | ||
| 36 | 34 | ||
| 37 | Fragment[] fragments = null; | 35 | Fragment[] fragments = null; |
| 38 | 36 | ||
| 37 | + | ||
| 39 | private int CEPING_INDEX = 0, CONSULT_INDEX = 0, REPORT_INDEX = 1, MINE_INDEX = 2; | 38 | private int CEPING_INDEX = 0, CONSULT_INDEX = 0, REPORT_INDEX = 1, MINE_INDEX = 2; |
| 40 | 39 | ||
| 41 | FragmentTransaction fragmentTransaction = null; | 40 | FragmentTransaction fragmentTransaction = null; |
| @@ -43,10 +42,8 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. | @@ -43,10 +42,8 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. | ||
| 43 | @Override | 42 | @Override |
| 44 | protected void initView(Bundle savedInstanceState) { | 43 | protected void initView(Bundle savedInstanceState) { |
| 45 | 44 | ||
| 46 | - | ||
| 47 | PermissionUtils.requestMultiPermissions(this, this); | 45 | PermissionUtils.requestMultiPermissions(this, this); |
| 48 | bottom_navigationView = findViewById(R.id.bottom_navigationView); | 46 | bottom_navigationView = findViewById(R.id.bottom_navigationView); |
| 49 | - | ||
| 50 | BottomNavigationViewHelper.disableShiftMode(bottom_navigationView); | 47 | BottomNavigationViewHelper.disableShiftMode(bottom_navigationView); |
| 51 | 48 | ||
| 52 | bottom_navigationView.setSelectedItemId(R.id.bottom_navigationView); | 49 | bottom_navigationView.setSelectedItemId(R.id.bottom_navigationView); |
| @@ -73,6 +70,8 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. | @@ -73,6 +70,8 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. | ||
| 73 | }); | 70 | }); |
| 74 | 71 | ||
| 75 | initFragments(); | 72 | initFragments(); |
| 73 | + handIntent(getIntent()); | ||
| 74 | + | ||
| 76 | } | 75 | } |
| 77 | 76 | ||
| 78 | private void initFragments() { | 77 | private void initFragments() { |
| @@ -113,7 +112,7 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. | @@ -113,7 +112,7 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. | ||
| 113 | @Override | 112 | @Override |
| 114 | protected void onNewIntent(Intent intent) { | 113 | protected void onNewIntent(Intent intent) { |
| 115 | super.onNewIntent(intent); | 114 | super.onNewIntent(intent); |
| 116 | -// handIntent(intent); | 115 | + handIntent(intent); |
| 117 | } | 116 | } |
| 118 | 117 | ||
| 119 | private void handIntent(Intent intent) { | 118 | private void handIntent(Intent intent) { |
| @@ -121,8 +120,8 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. | @@ -121,8 +120,8 @@ public class MainActivity extends BaseCompatActivity implements PermissionUtils. | ||
| 121 | PHMessageDao dao = AppContext.getInstance().getDaoSession().getPHMessageDao(); | 120 | PHMessageDao dao = AppContext.getInstance().getDaoSession().getPHMessageDao(); |
| 122 | PHMessage message = dao.queryBuilder().where(PHMessageDao.Properties.Id.eq(msgLongId)).unique(); | 121 | PHMessage message = dao.queryBuilder().where(PHMessageDao.Properties.Id.eq(msgLongId)).unique(); |
| 123 | if (message == null) return; | 122 | if (message == null) return; |
| 124 | - if (message.getSessionType() == PHMessageSession.sessionType_homework) { | ||
| 125 | - //TODO 跳转 | 123 | + if(msgLongId!=-1){ |
| 124 | + showFragment(2); | ||
| 126 | } | 125 | } |
| 127 | } | 126 | } |
| 128 | 127 |
app/src/main/java/com/shunzhi/parent/ui/activity/message/MesageActivity.java
| 1 | package com.shunzhi.parent.ui.activity.message; | 1 | package com.shunzhi.parent.ui.activity.message; |
| 2 | 2 | ||
| 3 | -import android.support.v7.app.AppCompatActivity; | ||
| 4 | import android.os.Bundle; | 3 | import android.os.Bundle; |
| 5 | import android.support.v7.widget.LinearLayoutManager; | 4 | import android.support.v7.widget.LinearLayoutManager; |
| 6 | import android.support.v7.widget.RecyclerView; | 5 | import android.support.v7.widget.RecyclerView; |
| @@ -14,9 +13,9 @@ import com.share.mvpsdk.base.activity.BaseCompatActivity; | @@ -14,9 +13,9 @@ import com.share.mvpsdk.base.activity.BaseCompatActivity; | ||
| 14 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; | 13 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewAdapter; |
| 15 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; | 14 | import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; |
| 16 | import com.share.mvpsdk.utils.DateUtils; | 15 | import com.share.mvpsdk.utils.DateUtils; |
| 16 | +import com.shunzhi.parent.AppContext; | ||
| 17 | import com.shunzhi.parent.R; | 17 | import com.shunzhi.parent.R; |
| 18 | import com.shunzhi.parent.bean.message.PHMessage; | 18 | import com.shunzhi.parent.bean.message.PHMessage; |
| 19 | -import com.shunzhi.parent.bean.message.PHMessageSession; | ||
| 20 | 19 | ||
| 21 | import java.util.ArrayList; | 20 | import java.util.ArrayList; |
| 22 | import java.util.List; | 21 | import java.util.List; |
| @@ -52,6 +51,9 @@ public class MesageActivity extends BaseCompatActivity implements View.OnClickLi | @@ -52,6 +51,9 @@ public class MesageActivity extends BaseCompatActivity implements View.OnClickLi | ||
| 52 | 51 | ||
| 53 | if (null==mEssageAdapter)mEssageAdapter=new MEssageAdapter(); | 52 | if (null==mEssageAdapter)mEssageAdapter=new MEssageAdapter(); |
| 54 | if (null==recyclerView.getAdapter())recyclerView.setAdapter(mEssageAdapter); | 53 | if (null==recyclerView.getAdapter())recyclerView.setAdapter(mEssageAdapter); |
| 54 | + | ||
| 55 | + | ||
| 56 | + phMessages= AppContext.getInstance().getDaoSession().getPHMessageDao().loadAll(); | ||
| 55 | mEssageAdapter.addAll(phMessages); | 57 | mEssageAdapter.addAll(phMessages); |
| 56 | recyclerView.setAdapter(mEssageAdapter); | 58 | recyclerView.setAdapter(mEssageAdapter); |
| 57 | 59 |
app/src/main/java/com/shunzhi/parent/ui/fragment/StartFragment.java
| 1 | package com.shunzhi.parent.ui.fragment; | 1 | package com.shunzhi.parent.ui.fragment; |
| 2 | 2 | ||
| 3 | -import android.media.MediaMetadataRetriever; | ||
| 4 | import android.os.Bundle; | 3 | import android.os.Bundle; |
| 5 | import android.os.CountDownTimer; | 4 | import android.os.CountDownTimer; |
| 6 | import android.support.annotation.NonNull; | 5 | import android.support.annotation.NonNull; |
| 7 | import android.support.annotation.Nullable; | 6 | import android.support.annotation.Nullable; |
| 8 | import android.text.TextUtils; | 7 | import android.text.TextUtils; |
| 9 | -import android.util.Log; | ||
| 10 | import android.view.View; | 8 | import android.view.View; |
| 11 | import android.widget.ImageView; | 9 | import android.widget.ImageView; |
| 12 | import android.widget.TextView; | 10 | import android.widget.TextView; |
| @@ -29,9 +27,6 @@ import com.stx.xhb.xbanner.XBanner; | @@ -29,9 +27,6 @@ import com.stx.xhb.xbanner.XBanner; | ||
| 29 | import java.util.ArrayList; | 27 | import java.util.ArrayList; |
| 30 | import java.util.List; | 28 | import java.util.List; |
| 31 | 29 | ||
| 32 | -import cn.jzvd.JZVideoPlayerStandard; | ||
| 33 | -import timber.log.Timber; | ||
| 34 | - | ||
| 35 | public class StartFragment extends BaseMVPCompatFragment<ConsultContract.ConsultPresenter, ConsultContract.IConsultModel> | 30 | public class StartFragment extends BaseMVPCompatFragment<ConsultContract.ConsultPresenter, ConsultContract.IConsultModel> |
| 36 | implements ConsultContract.IConsultView { | 31 | implements ConsultContract.IConsultView { |
| 37 | 32 | ||
| @@ -102,8 +97,9 @@ public class StartFragment extends BaseMVPCompatFragment<ConsultContract.Consult | @@ -102,8 +97,9 @@ public class StartFragment extends BaseMVPCompatFragment<ConsultContract.Consult | ||
| 102 | return new ConsultPresenter(); | 97 | return new ConsultPresenter(); |
| 103 | } | 98 | } |
| 104 | 99 | ||
| 100 | + | ||
| 105 | @Override | 101 | @Override |
| 106 | - public void showTools() { | 102 | + public void showVote(int position) { |
| 107 | 103 | ||
| 108 | } | 104 | } |
| 109 | 105 |
app/src/main/java/com/shunzhi/parent/ui/service/BadgeIntentService.java
| @@ -7,9 +7,8 @@ import android.app.PendingIntent; | @@ -7,9 +7,8 @@ import android.app.PendingIntent; | ||
| 7 | import android.content.Context; | 7 | import android.content.Context; |
| 8 | import android.content.Intent; | 8 | import android.content.Intent; |
| 9 | import android.os.Build; | 9 | import android.os.Build; |
| 10 | -import android.support.annotation.Nullable; | ||
| 11 | import android.support.v4.app.NotificationCompat; | 10 | import android.support.v4.app.NotificationCompat; |
| 12 | -import android.text.TextUtils; | 11 | +import android.util.Log; |
| 13 | 12 | ||
| 14 | import com.shunzhi.parent.AppConfig; | 13 | import com.shunzhi.parent.AppConfig; |
| 15 | import com.shunzhi.parent.AppContext; | 14 | import com.shunzhi.parent.AppContext; |
| @@ -71,9 +70,10 @@ public class BadgeIntentService extends IntentService { | @@ -71,9 +70,10 @@ public class BadgeIntentService extends IntentService { | ||
| 71 | //String uuid, long xstsid | 70 | //String uuid, long xstsid |
| 72 | String uuid = intent.getStringExtra("uuid"); | 71 | String uuid = intent.getStringExtra("uuid"); |
| 73 | long xstsid = intent.getLongExtra("xstsid", -1); | 72 | long xstsid = intent.getLongExtra("xstsid", -1); |
| 74 | - if (xstsid == -1 || TextUtils.isEmpty(uuid)) | ||
| 75 | - createIntentNotification(badgeCount, title, message); | ||
| 76 | - if (xstsid != -1 && !TextUtils.isEmpty(uuid)) | 73 | + Log.e("1234-===","uuid=="+uuid+"xstsid=="+xstsid); |
| 74 | +// if (xstsid == -1 || TextUtils.isEmpty(uuid)) | ||
| 75 | +// createIntentNotification(badgeCount, title, message); | ||
| 76 | +// if (xstsid != -1 && !TextUtils.isEmpty(uuid)) | ||
| 77 | createPendingIntentNotification(badgeCount, title, message, uuid, xstsid); | 77 | createPendingIntentNotification(badgeCount, title, message, uuid, xstsid); |
| 78 | 78 | ||
| 79 | } | 79 | } |
| @@ -89,13 +89,12 @@ public class BadgeIntentService extends IntentService { | @@ -89,13 +89,12 @@ public class BadgeIntentService extends IntentService { | ||
| 89 | mNotificationManager.cancel(notificationId); | 89 | mNotificationManager.cancel(notificationId); |
| 90 | 90 | ||
| 91 | notificationId++; | 91 | notificationId++; |
| 92 | - | ||
| 93 | Notification.Builder builder = new Notification.Builder(getApplicationContext()) | 92 | Notification.Builder builder = new Notification.Builder(getApplicationContext()) |
| 94 | .setContentTitle(title) | 93 | .setContentTitle(title) |
| 95 | .setContentText(message) | 94 | .setContentText(message) |
| 96 | .setSmallIcon(R.mipmap.ic_launcher); | 95 | .setSmallIcon(R.mipmap.ic_launcher); |
| 97 | Notification notification = Build.VERSION.SDK_INT > 15 ? builder.build() : builder.getNotification(); | 96 | Notification notification = Build.VERSION.SDK_INT > 15 ? builder.build() : builder.getNotification(); |
| 98 | - ShortcutBadger.applyNotification(getApplicationContext(), notification, badgeCount); | 97 | + ShortcutBadger.applyNotification(getApplicationContext(), notification, badgeCount); |
| 99 | if (mNotificationManager != null) | 98 | if (mNotificationManager != null) |
| 100 | mNotificationManager.notify(notificationId, notification); | 99 | mNotificationManager.notify(notificationId, notification); |
| 101 | } | 100 | } |
| @@ -104,7 +103,7 @@ public class BadgeIntentService extends IntentService { | @@ -104,7 +103,7 @@ public class BadgeIntentService extends IntentService { | ||
| 104 | if (mNotificationManager == null) { | 103 | if (mNotificationManager == null) { |
| 105 | mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); | 104 | mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); |
| 106 | } | 105 | } |
| 107 | - Intent resultIntent = new Intent(AppContext.getInstance(), MainActivity.class); | 106 | + Intent resultIntent = new Intent(AppContext.getInstance(),MainActivity.class); |
| 108 | resultIntent.putExtra("sid", xstsid); | 107 | resultIntent.putExtra("sid", xstsid); |
| 109 | resultIntent.putExtra("uuid", uuid); | 108 | resultIntent.putExtra("uuid", uuid); |
| 110 | mNotificationManager.cancel(notificationId); | 109 | mNotificationManager.cancel(notificationId); |