mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-02-21 21:43:02 +08:00
#28 stream cn.jpush.android.EXTRA from JSONObject to String
This commit is contained in:
parent
fe7c52f2c9
commit
cc858c2464
@ -78,7 +78,12 @@ public class JPushPlugin extends CordovaPlugin {
|
|||||||
data.put("message", message);
|
data.put("message", message);
|
||||||
JSONObject jExtras = new JSONObject();
|
JSONObject jExtras = new JSONObject();
|
||||||
for(Entry<String,Object> entry:extras.entrySet()){
|
for(Entry<String,Object> entry:extras.entrySet()){
|
||||||
jExtras.put(entry.getKey(),entry.getValue());
|
if(entry.getKey().equals("cn.jpush.android.EXTRA")){
|
||||||
|
JSONObject jo = new JSONObject((String)entry.getValue());
|
||||||
|
jExtras.put("cn.jpush.android.EXTRA", jo);
|
||||||
|
} else {
|
||||||
|
jExtras.put(entry.getKey(),entry.getValue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(jExtras.length()>0)
|
if(jExtras.length()>0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user