code: public static String getGcmSenderId(Context context) {
          final Context appContext = context.getApplicationContext();
  
          // Try to use gcm_defaultSenderId generated by google services gradle task
          String gcmSenderId = appContext.getResources().getString(R.string.gcm_defaultSenderId);
          if (!TextUtils.isEmpty(gcmSenderId)) {
              return gcmSenderId;
          }
  
          // Try to use easygcm_sender_id value for backward compatibility
          gcmSenderId = appContext.getResources().getString(R.string.easygcm_sender_id);
          if (!TextUtils.isEmpty(gcmSenderId)) {
              return gcmSenderId;
          }
  
          throw new IllegalArgumentException("You have to override the easygcm_sender_id string "
                  + "resource to provide the GCM sender ID, OR provide it using google services "
                  + "gradle plugin and google-services.json configuration.");
      }
docs: Get GCM sender id from available configuration.
  <p/>
  Returns gcm_defaultSenderId if it's provided by the google services gradle plugin via
  google-services.json. Otherwise, returns easygcm_sender_id value for easygcm backward
  compatibility.
  
  @param context Application context
  @return GCM sender id