Commit 1cdfcd27b51682531e189ab6ed3bc44be8f8f9a5

Authored by 杨帅
1 parent 3ee7a10b

1 修复用户运动超过9小时后,返回赛事详情页,服务未停止的问题

config.gradle
... ... @@ -21,7 +21,7 @@ ext {
21 21 //编译方式
22 22 debug : false,
23 23 //版本号
24   - version: "0.7.12",
  24 + version: "0.7.13",
25 25 //Lib库前缀
26 26 packeg : "com.cnlive.module",
27 27 //Lib库名称
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/service/CollKeepLiveService.java
... ... @@ -219,9 +219,9 @@ public class CollKeepLiveService extends Service implements MediaPlayer.OnComple
219 219 channel.setLockscreenVisibility(NotificationCompat.VISIBILITY_PRIVATE);
220 220 mNM.createNotificationChannel(channel);
221 221 }
222   - Intent notificationIntent = new Intent(this, CollRunningMapActivity.class);
  222 +// Intent notificationIntent = new Intent(this, CollRunningMapActivity.class);
223 223 notification = new NotificationCompat.Builder(this, CHANNEL_ONE_ID)
224   - .setContentIntent(PendingIntent.getActivity(this, 0, notificationIntent, 0))
  224 +// .setContentIntent(PendingIntent.getActivity(this, 0, notificationIntent, 0))
225 225 .setSmallIcon(R.mipmap.ic_launcher)
226 226 // .setCustomContentView(remoteViews)
227 227 .setContentTitle(getResources().getString(R.string.app_name))
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/service/CollStepService.java
... ... @@ -439,9 +439,9 @@ public class CollStepService extends Service implements SensorEventListener {
439 439 }
440 440  
441 441  
442   - Intent notificationIntent = new Intent(this, CollRunningMapActivity.class);
  442 +// Intent notificationIntent = new Intent(this, CollRunningMapActivity.class);
443 443 notification = new NotificationCompat.Builder(this, CHANNEL_ONE_ID)
444   - .setContentIntent(PendingIntent.getActivity(this, 0, notificationIntent, 0))
  444 +// .setContentIntent(PendingIntent.getActivity(this, 0, notificationIntent, 0))
445 445 .setSmallIcon(R.mipmap.ic_launcher)
446 446 // .setCustomContentView(remoteViews)
447 447 .setContentTitle(getResources().getString(R.string.app_name))
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunRaceDetailFragmentView.java
... ... @@ -1108,6 +1108,8 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener {
1108 1108 fragment.binding.rlScrollViewStartBtn.setTag(BTN_CONTINUE_RACE);
1109 1109 } else {
1110 1110 Log.e(TAG, "大于9小时");
  1111 + //停止服务
  1112 + stopStepService();
1111 1113 //重置数据
1112 1114 CommonInfo.resetRace(getContext());
1113 1115 //清空数据库
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/service/KeepLiveService.java
... ... @@ -237,9 +237,9 @@ public class KeepLiveService extends Service implements MediaPlayer.OnCompletion
237 237 // .setContentText("正在计步,请勿关闭")
238 238 // .setSound(null)
239 239 // .build();
240   - Intent notificationIntent = new Intent(this, PedometerMainActivity.class);
  240 +// Intent notificationIntent = new Intent(this, PedometerMainActivity.class);
241 241 notification = new NotificationCompat.Builder(this, CHANNEL_ONE_ID)
242   - .setContentIntent(PendingIntent.getActivity(this, 0, notificationIntent, 0))
  242 +// .setContentIntent(PendingIntent.getActivity(this, 0, notificationIntent, 0))
243 243 .setSmallIcon(R.mipmap.ic_launcher)
244 244 // .setCustomContentView(remoteViews)
245 245 .setContentTitle(getResources().getString(R.string.app_name))
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/service/StepService.java
... ... @@ -630,9 +630,9 @@ public class StepService extends Service implements SensorEventListener {
630 630 }
631 631  
632 632  
633   - Intent notificationIntent = new Intent(this, PedometerMainActivity.class);
  633 +// Intent notificationIntent = new Intent(this, PedometerMainActivity.class);
634 634 notification = new NotificationCompat.Builder(this, CHANNEL_ONE_ID)
635   - .setContentIntent(PendingIntent.getActivity(this, 0, notificationIntent, 0))
  635 +// .setContentIntent(PendingIntent.getActivity(this, 0, notificationIntent, 0))
636 636 .setSmallIcon(R.mipmap.ic_launcher)
637 637 // .setCustomContentView(remoteViews)
638 638 .setContentTitle(getResources().getString(R.string.app_name))
... ...