Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Implement dcs parameter
  • Loading branch information
algra4 committed Jul 4, 2023
commit 42990af4cb46fbe569d0084a989e5990f92aabd4
11 changes: 11 additions & 0 deletions src/main/java/com/cm/text/MessageBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,15 @@ public MessageBuilder WithTemplate(TemplateMessage template){
this.richContent.AddConversationPart(template);
return this;
}

/// <summary>
/// Add a custom DCS
/// </summary>
/// <param name="dcs"></param>
/// <returns></returns>
public MessageBuilder WithDcs(String dcs)
{
this.message.Dcs = dcs;
return this;
}
}
7 changes: 7 additions & 0 deletions src/main/java/com/cm/text/models/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ public class Message {
@SerializedName("validity")
public String Validity;

/// <summary>
/// Optional: If you set DCS to '0' or do not include the parameter, the messages uses standard GSM encoding.
/// To set your message up for unicode messaging set the value of dcs to 8
/// https://developers.cm.com/messaging/docs/sms#custom-dcs
/// </summary>
@SerializedName("dcs")
public String Dcs = "0";
Comment thread
michelmegens marked this conversation as resolved.
Outdated

public Message(Body body, String from, List<Recipient> recipientList) {
this.Body = body;
Expand Down