Merge pull request #29 from Samurais/master

#28 stream cn.jpush.android.EXTRA from JSONObject to String
This commit is contained in:
qinghe.zhang 2015-02-14 16:23:01 +08:00
commit e945bcf53d

View File

@ -78,7 +78,12 @@ public class JPushPlugin extends CordovaPlugin {
data.put("message", message);
JSONObject jExtras = new JSONObject();
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)
{