I know you can send info in the push notification parameters like message, title, image URL, etc. How does Facebook show your profile pic with your message in the notificati
I used Universal Image Loader to solve this. Take a look at the wiki on how to set it up. After you instantiate it once, this is the code I use in my GCM listener to download and display the image. I download the bitmap and then set it in the notification:
// Download profile picture of the user with Universal Image Loader
Bitmap bitmap = ImageLoader.getInstance().loadImageSync(profilePhotoUrl);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, intent,
PendingIntent.FLAG_ONE_SHOT);
Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_my_app)
.setLargeIcon(bitmap) // This is the image displayed on the lock screen
.setContentTitle("My App")
.setContentText(message)
.setAutoCancel(true)
.setSound(defaultSoundUri)
.setContentIntent(pendingIntent);