我已经创建了一个蓝牙聊天,我想进行更改,以便我想执行一个动作,如果
if(messageRecieved.equals("message required"){
//Action
}
我不知道哪个陈述是上面提到的消息
REF - :https://github.com/googlesamples/android-BluetoothChat/tree/master/Application/src/main/java/com/example/android/bluetoothchat
答案 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)