Yes, as question title. I got a single string received in android consist of 2 JSONObject.
I have to do 2 different processes in PHP but both result are returned (echo) in single string result which I don't know how to seperate it.
I'm using :
JSONObject json = new JSONObject(result);
String success = json.optString("success");
// "success" here shows empty in logcat. I think it doesn't get the second json object
Example of Result string:
{"username":"xx","activated":"0"}{"multicast_id":xxx,"success":0,"failure":0,"canonical_ids":0,"results":[{"message_id":"xxx"}]}
How can I do?
(btw 2nd string is Firebase Cloud Messanging result example.
EDIT: I'm using PHP to send FCM, that's why the result is forced to return together with my other string result even I do not (PHP::echo) it)