handle

open fun handle(@NonNull message: Xml, highPriority: Boolean): Boolean

Inform the library that a Firebase push message has arrived.

The data of RemoteMessages from Firebase Cloud Messaging are Maps and need to be parsed via toXml.

See the following example of handing RemoteMessages over to libSoftphone:

public static boolean handleFirebasePush(@NonNull RemoteMessage message) { Xml messageData = AndroidUtil.toXml("pushData", message.getData()); boolean highPriority = message.getPriority() == RemoteMessage.PRIORITY_HIGH; return Instance.Notifications.Push.handle(messageData, highPriority); }

Parameters

message

The incoming message data, converted to XML.

highPriority

Whether the message is a high priority message