EmbeddedDistributorReceiver
UnifiedPush receiver for the Embedded distributor
Expose a receiver
You need to expose a Receiver that extend EmbeddedDistributorReceiver and you must override getEndpoint to return the address of your FCM rewrite-proxy.
class EmbeddedDistributor: EmbeddedDistributorReceiver() {
override fun getEndpoint(context: Context, fcmToken: String, instance: String): String {
// This returns the endpoint of your FCM Rewrite-Proxy
return "https://<your.domain.tld>/FCM?v2&instance=$instance&token=$token"
}
}Content copied to clipboard
Edit your manifest
The receiver has to be exposed in the AndroidManifest.xml in order to receive the UnifiedPush messages.
<receiver android:enabled="true" android:name=".EmbeddedDistributor" android:exported="false">
<intent-filter>
<action android:name="org.unifiedpush.android.distributor.feature.BYTES_MESSAGE"/>
<action android:name="org.unifiedpush.android.distributor.REGISTER"/>
<action android:name="org.unifiedpush.android.distributor.UNREGISTER"/>
</intent-filter>
</receiver>Content copied to clipboard
Functions
Inherited functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard