根据RECEIVED-Bluetooth消息启动if语句

时间:2017-06-11 18:35:44

标签: android bluetooth android-bluetooth

我已经创建了一个蓝牙聊天,我想进行更改,以便我想执行一个动作,如果

if(messageRecieved.equals("message required"){ //Action } 我不知道哪个陈述是上面提到的消息 REF - :https://github.com/googlesamples/android-BluetoothChat/tree/master/Application/src/main/java/com/example/android/bluetoothchat

1 个答案:

答案 0 :(得分:0)

<ion-content class="fondo"> <div ion-fixed> <img src="assets/markerBoy.png" class="logo" /> <ion-card center> <ion-card-header> Credenciales </ion-card-header> <ion-card-content> <form> <ion-list> <ion-item> <ion-label floating> Usuario: </ion-label> <ion-input type="text" [(ngModel)]="user" name="user"> </ion-input> </ion-item> <ion-item> <ion-label floating> Contraseña: </ion-label> <ion-input type="password" [(ngModel)]="password" name="password"> </ion-input> </ion-item> </ion-list> <div padding> <button ion-button block (click)="iniciarSesionValidar()" color="royal"> Entrar </button> </div> </form> </ion-card-content> </ion-card> </div> </ion-content> 中,在BluetoothChatFragment.java内添加您的逻辑,其中UI片段从服务接收消息: -

handleMessage(Message msg)