Skip to main content
All CollectionsPush notificationsAndroid
Overriding the FCM Sender ID
Overriding the FCM Sender ID

How to explicitly set the Sender ID rather than using the one from google-services.json

Arnaud avatar
Written by Arnaud
Updated over a week ago

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 resource with the Sender ID you want to use:

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

(You do not have to name your string resource 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.

This article belongs to Batch's FAQ. Need more help? Find insightful articles, documentation, case & market studies, guides, and even more in our website's Resources section on and our blog.

Did this answer your question?