Skip to content

Commit

Permalink
Add record to voice xml builder
Browse files Browse the repository at this point in the history
  • Loading branch information
aksalj committed Oct 9, 2017
1 parent 0434faa commit 42529b6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions libs/voice/src/main/java/com/africastalking/VoiceMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,18 @@ public Builder reject() {
return this;
}

public Builder record(String text, URL url, int maxLength, long timeout, String finishOnKey, boolean trimSilence, boolean playBeep, URL callbackUrl) {
xml.append("<Record finishOnKey=\""+finishOnKey+"\" maxLength=\""+ maxLength +"\" timeout=\""+timeout+"\" trimSilence=\""+ String.valueOf(trimSilence) + "\"" +
"playBeep=\"" + String.valueOf(playBeep) + "\" callbackUrl=\""+ callbackUrl +"\">");
this.say(text);
xml.append("</Record>");
return this;
}

public Builder record() {
xml.append("<Record />");
return this;
}

}
}

0 comments on commit 42529b6

Please sign in to comment.