Overriding the FCM Sender ID

Sender ID overriding is not compatible with FCM tokens and forces a downgrade to Instance ID. As we move towards removing support for FCM Instance ID, support for this has been removed in Batch 1.21.

Available in Batch 1.12.1 and higher

When using FCM, Batch autodetects the Sender ID to use with the one set in your google-services.json.

If for any reason you want to specify another Sender ID, add the following line in your AndroidManifest.xml, under <application>:

<meta-data android:name="batch_push_fcm_sender_id_override" android:resource="@string/batch_fcm_sender_id" />

Then, add the matching String ressource with the Sender ID you want to use:


<string name="batch_fcm_sender_id">123456</string>

(You do not have to name your string ressource batch_fcm_sender_id , it can be anything as long as it is referenced in the manifest meta-data.)

You should also make sure that you migrate your legacy Google API Project to Firebase so that you do not accidentally delete it.