1

I send from Firebase Messages in this structure:

{
    "to": "/topics/myapp",
    "data": {
        "id" : "id123",
        "title" : "lksdjkrfrfrereflsjd",
        "body" : "fsdfsd",
        "de": {
            "key1" : "val1",
            "key2" : "val2"
         },
        "en": {
            "key3" : "val3",
            "key4" : "val4"
         }
     }
}

in my override fun onMessageReceived(remoteMessage: RemoteMessage?) method my remoteMessage object has a data field which is from type: Map<String, String>

How can I access de and en from remoteMessage ?

EDIT: It is developed for Android

Ralf Wickum
  • 2,850
  • 9
  • 55
  • 103
  • 1
    It counts now as a regular String value. You're going to have to parse it to JSON. I'm not too familiar with iOS yet, maybe try something like [this](https://stackoverflow.com/q/8606444/4625829) – AL. Oct 08 '17 at 01:22

0 Answers0