Showing
1 changed file
with
2 additions
and
7 deletions
| @@ -64,7 +64,7 @@ public class SmartControlService extends BaseService implements EventListener<St | @@ -64,7 +64,7 @@ public class SmartControlService extends BaseService implements EventListener<St | ||
| 64 | private RoomInfo roomInfo; | 64 | private RoomInfo roomInfo; |
| 65 | private RoomQrCodeInfo info; | 65 | private RoomQrCodeInfo info; |
| 66 | 66 | ||
| 67 | - private String lockMac = ""; | 67 | + private String lockMac = "CA:EC:56:60:CA:79"; |
| 68 | private boolean needReport = false; | 68 | private boolean needReport = false; |
| 69 | //___________________________________________ | 69 | //___________________________________________ |
| 70 | 70 | ||
| @@ -87,10 +87,7 @@ public class SmartControlService extends BaseService implements EventListener<St | @@ -87,10 +87,7 @@ public class SmartControlService extends BaseService implements EventListener<St | ||
| 87 | @Override | 87 | @Override |
| 88 | public int onStartCommand(Intent intent, int flags, int startId) { | 88 | public int onStartCommand(Intent intent, int flags, int startId) { |
| 89 | super.onStartCommand(intent, flags, startId); | 89 | super.onStartCommand(intent, flags, startId); |
| 90 | - //TODO check super() | ||
| 91 | new SmartControlPresenter(this); | 90 | new SmartControlPresenter(this); |
| 92 | -// ServiceCommandCollector.addService(this, this.getClass()); | ||
| 93 | -// Log.d("BaseService", this.getClass().toString() + ""); | ||
| 94 | mApplication = (FangTangApplication) getApplication(); | 91 | mApplication = (FangTangApplication) getApplication(); |
| 95 | mApplication.doInit(); | 92 | mApplication.doInit(); |
| 96 | Log.d(TAG, "onStartCommand"); | 93 | Log.d(TAG, "onStartCommand"); |
| @@ -137,8 +134,6 @@ public class SmartControlService extends BaseService implements EventListener<St | @@ -137,8 +134,6 @@ public class SmartControlService extends BaseService implements EventListener<St | ||
| 137 | if (hasSystemFeatureBluetoothLe) { | 134 | if (hasSystemFeatureBluetoothLe) { |
| 138 | unregisterReceiver(bleBroadcastReceiver); | 135 | unregisterReceiver(bleBroadcastReceiver); |
| 139 | } | 136 | } |
| 140 | -// Log.d("BaseService", this.getClass().toString() + ""); | ||
| 141 | -// ServiceCommandCollector.removeService(this); | ||
| 142 | unregisterReceiver(mReceiver); | 137 | unregisterReceiver(mReceiver); |
| 143 | EventBus.getDefault().unregister(this); | 138 | EventBus.getDefault().unregister(this); |
| 144 | super.onDestroy(); | 139 | super.onDestroy(); |
| @@ -200,7 +195,7 @@ public class SmartControlService extends BaseService implements EventListener<St | @@ -200,7 +195,7 @@ public class SmartControlService extends BaseService implements EventListener<St | ||
| 200 | 195 | ||
| 201 | }); | 196 | }); |
| 202 | String openCMD = "Open the door"; | 197 | String openCMD = "Open the door"; |
| 203 | - GREENBLE.send(this, "CA:EC:56:60:CA:79", openCMD.getBytes()); | 198 | + GREENBLE.send(this, lockMac, openCMD.getBytes()); |
| 204 | } | 199 | } |
| 205 | 200 | ||
| 206 | @Subscribe(threadMode = ThreadMode.MAIN) | 201 | @Subscribe(threadMode = ThreadMode.MAIN) |
Please
register
or
login
to post a comment