title: GCM notification not displaying
body: <p>I am using GCM in my app,the issue is i am able to hear sound of notification but it is not displaying,following is my snippet code can any one help me to solve out that,thanks in advance,...................</p>
  
  <pre><code>public class MyGcmListenerService extends GcmListenerService {
  
      private static final String TAG = "MyGcmListenerService";
  
      /**
       * Called when message is received.
       *
       * @param from SenderID of the sender.
       * @param data Data bundle containing message data as key/value pairs.
       *             For Set of keys use data.keySet().
       */
      // [START receive_message]
      @Override
      public void onMessageReceived(String from, Bundle data) {
          String message = data.getString("message");
          String img = data.getString("img");
          Log.d(TAG, "From: " + from);
          Log.d(TAG, "Message: " + message);
          Log.d(TAG, "Images: " + img);
  
          if (from.startsWith("/topics/")) {
              // message received from some topic.
          } else {
              // normal downstream message.
          }
  
          // [START_EXCLUDE]
          /**
           * Production applications would usually process the message here.
           * Eg: - Syncing with server.
           *     - Store message in local database.
           *     - Update UI.
           */
  
          /**
           * In some cases it may be useful to show a notification indicating to the user
           * that a message was received.
           */
          sendNotification(message,img);
          // [END_EXCLUDE]
      }
      // [END receive_message]
  
      /**
       * Create and show a simple notification containing the received GCM message.
       *
       * @param message GCM message received.
       */
      private void sendNotification(String message,String img) {
          Intent intent = new Intent(this, MainActivity.class);
          intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
          PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, intent,
                  PendingIntent.FLAG_ONE_SHOT);
  
         // Integer imgs=Integer.parseInt(img);
  
          Bitmap bitmap = getBitmapFromURL(img);
  
          Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
          NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
                  .setLargeIcon(bitmap)
                  .setContentTitle("New Product Added")
                  .setContentText(message)
                  .setAutoCancel(true)
                  .setSound(defaultSoundUri)
                  .setContentIntent(pendingIntent);
  
  
  
  
  
          NotificationManager notificationManager =
                  (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
  
          notificationManager.notify(0 /* ID of notification */, notificationBuilder.build());
      }
  
      public Bitmap getBitmapFromURL(String strURL) {
          try {
              URL url = new URL(strURL);
              HttpURLConnection connection = (HttpURLConnection) url.openConnection();
              connection.setDoInput(true);
              connection.connect();
              InputStream input = connection.getInputStream();
              Bitmap myBitmap = BitmapFactory.decodeStream(input);
              return myBitmap;
          } catch (IOException e) {
              e.printStackTrace();
              return null;
          }
      }
  }
  </code></pre>