title: Google FCM: badge counter restricted to iOS?
body: <p>I'm pretty confused about Google FCM.
  The documentation page <a href="https://firebase.google.com/docs/cloud-messaging/http-server-ref" rel="nofollow">https://firebase.google.com/docs/cloud-messaging/http-server-ref</a> lists the parameters supported by API, but oddly, the "badge" parameter appears as "iOS" only. </p>
  
  <p>I was setting my android app badge counter successfully until last week, but today, sending parameter "badge" inside the "notification" section does not work. The notification arrives successfully.</p>
  
  <p>My notification data structure:</p>
  
  <pre><code>Array
  (
      [to] =&gt; (device token)
      [notification] =&gt; Array
          (
              [title] =&gt; Title
              [text] =&gt; Test message
              [sound] =&gt; default
              [vibrate] =&gt; 1
              [badge] =&gt; 2
          )
  )
  </code></pre>
  
  <p>My server side code (PHP):</p>
  
  <pre><code>$jsonData = json_encode($data);
  
  $ch     = curl_init("https://fcm.googleapis.com/fcm/send");
  $header = array(
      'Content-Type: application/json',
      "Authorization: key=".MY_GCM_API_KEY
  );
  
  curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
  curl_setopt( $ch,CURLOPT_SSL_VERIFYPEER, true);
  curl_setopt( $ch,CURLOPT_RETURNTRANSFER, true );
  
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData);
  
  $result = curl_exec($ch);
  curl_close($ch);
  </code></pre>