Overriding the Push Notification Handler
ChatSDK.config().setInboundPushHandlingEnabled(false)BaseBroadcastHandler bbc = new BaseBroadcastHandler()public void onReceive(Context context, Intent intent) {
Bundle extras = intent.getExtras();
final String threadEntityID = extras.getString(Keys.PushKeyThreadEntityID);
final String userEntityID = extras.getString(Keys.PushKeyUserEntityID);
if (!StringChecker.isNullOrEmpty(threadEntityID) && !StringChecker.isNullOrEmpty(userEntityID)) {
// Valid Chat SDK push, send it to the Chat SDK
bbc.onReceive(context, intent);
} else {
// Handle the push yourself
}
}Local Push Notifications
Last updated