Overriding the FCM Sender ID

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:

res/values/strings.xml

<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.