I am getting the data payload from the firebase not in json format, instead I am getting custom key-value pairs as following format:
Data Payload:{image=htt
I am getting the data payload from the firebase not in json format
Yes, Its behaving as intended.
Because Data payload contains custom key-value pairs not a JSON format
I have to parse the data using
Jsonparsing for further processing.
You need to use Map to convert data payload in to a JSONObject
check below example
SAMPLE CODE
Map params = remoteMessage.getData();
JSONObject object = new JSONObject(params);
Log.e("JSON_OBJECT", object.toString());