5
我正在嘗試實施Firebase通知。但是我無法找到任何有關如何從Firebase通知中檢索自定義數據的文檔。如何從android firebase通知中獲取自定義數據?
但在代碼如何獲得自定義鍵。
我使用FirebaseMessagingService.onMessageReceived
得到的消息數據。
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
// TODO(developer): Handle FCM messages here.
// If the application is in the foreground handle both data and notification messages here.
// Also if you intend on generating your own notifications as a result of a received FCM
// message, here is where that should be initiated. See sendNotification method below.
Log.d(TAG, "From: " + remoteMessage.getFrom());
Log.d(TAG, "Notification Message Body: " + remoteMessage.getNotification().getBody());
}
我使用火力的反應原生的Android,在那裏我應該提到這一點的循環。 ...在MyFirebaseMessagingService.java中? @Chintan Soni – Vijay