Commit 74ea5da467911d6602c3b14af76cf0be95ef6e2d

Authored by jinyan.yi
1 parent d6e7bd39

播放状态添加广告状态

... ... @@ -212,7 +212,7 @@ public class SmartControlService extends BaseService implements EventListener<St
212 212 bleBroadcastReceiver.setResponseObj(null);
213 213 Toast.makeText(SmartControlService.this, "开门成功", Toast.LENGTH_SHORT).show();
214 214 if (needReport) {
215   - mHandler.postDelayed(reportRunnable, 10 * 1000);
  215 + mHandler.postDelayed(reportRunnable, 2 * 1000);
216 216 LogUtils.i("room-info", "user open door ,report the open success status");
217 217 }
218 218 LogUtils.i("room-info", "open success");
... ... @@ -626,9 +626,12 @@ public class SmartControlService extends BaseService implements EventListener<St
626 626 R.string.delay_time_fill_time,
627 627 R.string.play_movie_fill_name),
628 628 offset, roomStatusInfo.getData().getFilm_name());
  629 + Log.d("movie",roomStatusInfo.getData().getFilm_name());
629 630 } else {
630 631 showMsg = String.format(ResUtils.getResResult(mContext, R.string.welcome, R.string.ads_promote, R.string.play_movie_fill_name), roomStatusInfo.getData().getFilm_name());
  632 + Log.d("movie",roomStatusInfo.getData().getFilm_name());
631 633 }
  634 + Log.d("movie","tostring:"+roomStatusInfo.getData().toString());
632 635 CToast.makeText(this, showMsg, 100 * 1000).show();
633 636 OpenMMUtils.openMMWithAds(this, localMovieMessages.getPlayPath(), null);
634 637 } else {
... ...
... ... @@ -188,6 +188,8 @@ public class SocketService1 extends BaseService {
188 188 case 0:
189 189 serverHost = SERVER_HOST_ONLINE;
190 190 serverPort = SERVER_PORT_ONLINE;
  191 +// serverHost = "192.168.200.217";
  192 +// serverPort = 9501;
191 193 break;
192 194 case 1:
193 195 serverHost = SERVER_HOST_DEVELOP;
... ... @@ -196,6 +198,7 @@ public class SocketService1 extends BaseService {
196 198 case 2:
197 199 serverHost = SERVER_HOST;
198 200 serverPort = SERVER_PORT;
  201 +// serverHost = "192.168.200.217";
199 202 break;
200 203 }
201 204
... ... @@ -541,6 +544,7 @@ public class SocketService1 extends BaseService {
541 544 } else {
542 545 sendMessage(USER_OPEN_DOOR, "user open the door");
543 546 }
  547 + Log.d("op","开门");
544 548 break;
545 549 case 20:
546 550 LogUtils.i(TAG, "admin open the door,del the log");
... ... @@ -573,6 +577,13 @@ public class SocketService1 extends BaseService {
573 577 } catch (RemoteException e) {
574 578 e.printStackTrace();
575 579 }
  580 + if (playStatus == 0) {
  581 + boolean bool = ActivityCollector.isActivityExist(AdsPreVideoPlayerActivity.class);
  582 + Log.d("ReportInfo","广告状态:"+bool);
  583 + if(bool) {
  584 + playStatus = 3;
  585 + }
  586 + }
576 587
577 588 if (lightSet == 1 || lightSet == 2) {
578 589 lightStatus = lightSet;
... ...
Please register or login to post a comment