PubSubMessageListener Class - Android
onMessageReceived()
- This event will be emitted whenever any pubsub message received.
Example
- Kotlin
- Java
var pubSubMessageListener = PubSubMessageListener { message ->
Log.d("#message", "onMessageReceived: " + message.message)
}
PubSubMessageListener pubSubMessageListener = new PubSubMessageListener() {
@Override
public void onMessageReceived(PubSubMessage message) {
Log.d("#message", "onMessageReceived: " + message.getMessage());
}
};
Got a Question? Ask us on discord