Commit 1c403fedd4381a26160a7fe9e09cf9654c123df8

Authored by wugian
1 parent 1301b702

ads path ,多次访问二维 码接口问题fix

... ... @@ -147,7 +147,7 @@
147 147 <service android:name="com.xgimi.smartscreen.service.ConfigService"/>
148 148 <service android:name=".poll.PollingServiceDemo"/>
149 149
150   - <activity android:name=".activity.QrCodeShowActivity">
  150 + <activity android:name=".activity.QrCodeShowActivity" android:launchMode="singleTop">
151 151 </activity>
152 152 <activity android:name=".activity.ConfigWifiActivity">
153 153 </activity>
... ...
... ... @@ -148,9 +148,9 @@ public class AdsPreVideoPlayerActivity extends BaseActivity {
148 148 }
149 149
150 150 public String getAdsVideoUrl() {
151   -// return Utils.getSambaMsg(this).getLocalPath() + "ads.mp4";
  151 + return Utils.getSambaMsg(this).getLocalPath() + "ads.mp4";
152 152 // return "rtsp://192.168.31.197/8554/1";
153   - return "http://192.168.31.197:8080/1";
  153 +// return "http://192.168.31.197:8080/1";
154 154 // return "http://192.168.200.193/qnykflv.flv";
155 155 }
156 156 }
\ No newline at end of file
... ...
... ... @@ -1045,19 +1045,20 @@ public class MainActivity extends BaseActivity implements IMainView, EventListen
1045 1045 // if (info == null || info.getData() == null) {
1046 1046 // break;
1047 1047 // }
1048   - presenter.getCleanQrCode(roomStatusInfo.getData().getOrder_sn(), roomInfo.getData().getRoom_sn());
  1048 + if (System.currentTimeMillis() - lastRequest > 3000) {
  1049 + lastRequest = System.currentTimeMillis();
  1050 + presenter.getCleanQrCode(roomStatusInfo.getData().getOrder_sn(), roomInfo.getData().getRoom_sn());
  1051 + }
1049 1052 // startActivity(new Intent(this, QrCodeShowActivity.class).putExtra("qr", "updateOrderInfo"));
1050 1053 break;
1051 1054 }
1052 1055 }
1053 1056
  1057 + private long lastRequest = 0;
  1058 +
1054 1059 private void openDoor() {
1055 1060 Log.d("room-info", "openDoor called");
1056   - //TODO move to write success if release
1057   - if (needReport) {
1058   - handler.postDelayed(reportRunnable, 10 * 1000);
1059   - Log.d("room-info", "user open door ,report the open success status");
1060   - }
  1061 +
1061 1062 bleBroadcastReceiver.setResponseObj(new GREENCITYBLEProtocolFactory.GREENCITYBleDataWritten() {
1062 1063
1063 1064 @Override
... ... @@ -1071,7 +1072,10 @@ public class MainActivity extends BaseActivity implements IMainView, EventListen
1071 1072 intent.setAction(GREENBluetoothLeService.ACTION_OPEN_SUCCESS);
1072 1073 intent.putExtra("openrecord", bleOpenRecord);
1073 1074 sendBroadcast(intent);
1074   -
  1075 + if (needReport) {
  1076 + handler.postDelayed(reportRunnable, 10 * 1000);
  1077 + Log.d("room-info", "user open door ,report the open success status");
  1078 + }
1075 1079 Log.d("room-info", "open success");
1076 1080 }
1077 1081
... ...
... ... @@ -299,7 +299,7 @@ public class CinemaControlService extends Service {
299 299 // PollingUtils.stopPollingService();
300 300 MessageEvent messageEvent = new MessageEvent();
301 301 messageEvent.setEventId(COUNT_DOWN_ZERO);
302   - messageEvent.setMessage("记数为0");
  302 + messageEvent.setMessage("CinemaControlService,记数为0");
303 303 EventBus.getDefault().post(messageEvent);
304 304 }
305 305 }
... ...
Please register or login to post a comment