This code that i have implemnted in my app for pushing imagemessage and also link for opening in your webView

suggest change

This is my FirebaseMessagingService

public class MyFirebaseMessagingService extends FirebaseMessagingService { 
Bitmap bitmap;
@Override 
public void onMessageReceived(RemoteMessage remoteMessage) {
String message = remoteMessage.getData().get("message");
//imageUri will contain URL of the image to be displayed with Notification 
String imageUri = remoteMessage.getData().get("image");
String link=remoteMessage.getData().get("link");

//To get a Bitmap image from the URL received 
bitmap = getBitmapfromUrl(imageUri);
sendNotification(message, bitmap,link);

} 

/** 
* Create and show a simple notification containing the received FCM message. 
*/ 

private void sendNotification(String messageBody, Bitmap image, String link) {
Intent intent = new Intent(this, NewsListActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.putExtra("LINK",link);
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)
        .setLargeIcon(image)/*Notification icon image*/
        .setSmallIcon(R.drawable.hindi)
        .setContentTitle(messageBody)
        .setStyle(new NotificationCompat.BigPictureStyle()
                .bigPicture(image))/*Notification with Image*/
        .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 imageUrl) {
try { 
    URL url = new URL(imageUrl);
    HttpURLConnection connection = (HttpURLConnection) url.openConnection();
    connection.setDoInput(true);
    connection.connect();
    InputStream input = connection.getInputStream();
    Bitmap bitmap = BitmapFactory.decodeStream(input);
    return bitmap;

} catch (Exception e) {
    // TODO Auto-generated catch block 
    e.printStackTrace();
    return null; 

} 
}}

And this is MainActivity to open link in my WebView or other browser depand on your requirement through intents.

if (getIntent().getExtras() != null) {
    if (getIntent().getStringExtra("LINK")!=null) {
        Intent i=new Intent(this,BrowserActivity.class);
        i.putExtra("link",getIntent().getStringExtra("LINK"));
        i.putExtra("PUSH","yes");
        NewsListActivity.this.startActivity(i);
        finish();
    }}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Firebase Cloud Messaging:
* This code that i have implemnted in my app for pushing imagemessage and also link for opening in your webView

Table Of Contents
2 Gradle
5 Intent
17 Service
19 WebView
31 SQLite
35 Glide
37 Dialog
38 ACRA
44 Handler
53 Toast
63 Menu
65 Picasso
70 Volley
71 Widgets
78 Realm
90 Spinner
95 OkHttp
108 TextView
109 ListView
111 Loader
118 Xposed
119 Security
121 ImageView
123 Doze Mode
130 Drawables
131 Colors
134 Fresco
139 AdMob
145 Keyboard
146 Button
150 EditText
155 Vk SDK
163 ExoPlayer
169 XMPP
175 OpenCV
177 Threads
184 ORMLite
186 TabLayout
190 LruCache
192 Zip files
194 Fastlane
199 FileIO
202 Moshi
207 Firebase Cloud Messaging
210 VideoView
216 Paint
218 ProGuard
226 CleverTap
228 ADB shell
229 Ping ICMP
230 AIDL
234 Context
240 JCodec
242 Okio
249 FuseView
254 Looper
261 Fastjson
263 Jackson
267 Smartcard