I'm trying to send the click-action data with the notification to handle the onClick event for it but unfortunately the app receives no data through the onMessageReceived(). I have tried plenty of things but all in vain.
Here is my code:
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
    super.onMessageReceived(remoteMessage);
     String notification_title = 
remoteMessage.getNotification().getTitle();
    String notification_message = 
remoteMessage.getNotification().getBody();
    String click_action = 
remoteMessage.getNotification().getClickAction();
    String from_user_id = remoteMessage.getData().get("from_user");
    Log.v("user id", from_user_id);
    if(from_user_id!= null){
        Toast.makeText(this, from_user_id, Toast.LENGTH_SHORT).show();
    }
    NotificationCompat.Builder mBuilder = new 
NotificationCompat.Builder(this)
            .setSmallIcon(R.drawable.ic_launcher)
            .setContentTitle(notification_title)
            .setContentText(notification_message)
            .setPriority(NotificationCompat.PRIORITY_DEFAULT);
    Intent resultIntent = new Intent(click_action);
    resultIntent.putExtra("user_id", from_user_id);
    Log.v("user id", from_user_id);
    TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);
    stackBuilder.addNextIntentWithParentStack(resultIntent);
    PendingIntent resultPendingIntent =
            stackBuilder.getPendingIntent(0, 
PendingIntent.FLAG_UPDATE_CURRENT);
    mBuilder.setContentIntent(resultPendingIntent);
    int mNotificationID = (int)System.currentTimeMillis();
    NotificationManager mNotifyManger = 
(NotificationManager)getSystemService(NOTIFICATION_SERVICE);
    mNotifyManger.notify(mNotificationID, mBuilder.build());
    }
and here is my mainfest:
<service android:name=".FirebaseMessagingService">
        <intent-filter>
            <action android:name="com.google.firebase.MESSAGING_EVENT" />
        </intent-filter>
    </service>
and this is my gradle:
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-database:16.0.3'
implementation 'com.google.firebase:firebase-storage:16.0.3'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.firebaseui:firebase-ui-database:4.2.1'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
Edited: Here is the data I'm expecting:
const deviceToken = 
admin.database().ref(`/Users/${user_id}/device_token`).once('value');
return deviceToken.then(result => {
if (!result || !result.exists){throw new Error("Profile doesn't exist")}
const token_id = result.val();
const payload = {
    notification: {
        title: "New Friend Request",
        body: `${userName} has sent you a Friend Request`,
        icon: "default",
        click_action: "com.example.alaa.lapitchatapp.Target_Notification"
    },
    data:{
        from_user: from_user_id
    }
};