Skip to content

Commit

Permalink
fix #3
Browse files Browse the repository at this point in the history
  • Loading branch information
xingePush committed Aug 31, 2018
1 parent 7553caf commit 20808e2
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 20 deletions.
Binary file modified SDK.Test/bin/Debug/netcoreapp2.1/SDK.Test.dll
Binary file not shown.
Binary file modified SDK.Test/bin/Debug/netcoreapp2.1/SDK.Test.pdb
Binary file not shown.
Binary file modified SDK.Test/bin/Debug/netcoreapp2.1/XingeApp.dll
Binary file not shown.
Binary file modified SDK.Test/bin/Debug/netcoreapp2.1/XingeApp.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified SDK.Test/obj/Debug/netcoreapp2.1/SDK.Test.dll
Binary file not shown.
Binary file modified SDK.Test/obj/Debug/netcoreapp2.1/SDK.Test.pdb
Binary file not shown.
41 changes: 22 additions & 19 deletions SDK/Message.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,39 +165,42 @@ public object toJson()
return m_raw;
Dictionary<string, object> dict = new Dictionary<string, object>();
Dictionary<string, object> message = new Dictionary<string, object>();

dict.Add("title", m_title);
dict.Add("content", m_content);
dict.Add("accept_time", acceptTimeToJsonArray());

if (m_type.Equals(XGPushConstants.OrdinaryMessage))
{
dict.Add("title", m_title);
dict.Add("content", m_content);
dict.Add("accept_time", acceptTimeToJsonArray());
dict.Add("builder_id", m_style.getBuilderId());
dict.Add("ring", m_style.getRing());
dict.Add("vibrate", m_style.getVibrate());
dict.Add("clearable", m_style.getClearable());
dict.Add("n_id", m_style.getNId());
dict.Add("ring_raw", m_style.getRingRaw());
dict.Add("lights", m_style.getLights());
dict.Add("icon_type", m_style.getIconType());
dict.Add("icon_res", m_style.getIconRes());
dict.Add("style_id", m_style.getStyleId());
dict.Add("small_icon", m_style.getSmallIcon());
dict.Add("action", m_action.toJson());

message.Add("builder_id", m_style.getBuilderId());
message.Add("ring", m_style.getRing());
message.Add("vibrate", m_style.getVibrate());
message.Add("clearable", m_style.getClearable());
message.Add("n_id", m_style.getNId());
message.Add("ring_raw", m_style.getRingRaw());
message.Add("lights", m_style.getLights());
message.Add("icon_type", m_style.getIconType());
message.Add("icon_res", m_style.getIconRes());
message.Add("style_id", m_style.getStyleId());
message.Add("small_icon", m_style.getSmallIcon());
message.Add("action", m_action.toJson());
}
else if(m_type.Equals(XGPushConstants.SilentMessage))
{
dict.Add("title", m_title);
dict.Add("content", m_content);
dict.Add("accept_time", acceptTimeToJsonArray());
//
}

if (this.m_custom != null)
{
foreach(var kvp in m_custom)
{
dict.Add(kvp.Key, kvp.Value);
message.Add(kvp.Key, kvp.Value);
}
}

dict.Add("android", message);

return dict;
}
}
Expand Down
2 changes: 1 addition & 1 deletion SDK/MessageiOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public object toJson()
}


dict.Add("iOS", iOS);
dict.Add("ios", iOS);

return dict;
}
Expand Down
Binary file modified SDK/bin/Debug/netstandard2.0/XingeApp.dll
Binary file not shown.
Binary file modified SDK/bin/Debug/netstandard2.0/XingeApp.pdb
Binary file not shown.
Binary file modified SDK/obj/Debug/netstandard2.0/XingeApp.dll
Binary file not shown.
Binary file modified SDK/obj/Debug/netstandard2.0/XingeApp.pdb
Binary file not shown.

0 comments on commit 20808e2

Please sign in to comment.