Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public static Alert buildAlert(Vector<TTSChunk> ttsChunks,
msg.setPlayTone(playTone);
msg.setTtsChunks(ttsChunks);
msg.setSoftButtons(softButtons);

msg.setAlertIcon(icon);
return msg;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4892,7 +4892,7 @@ public void alert(String ttsText, String alertText1,
*/
public void alert(Vector<TTSChunk> ttsChunks,
String alertText1, String alertText2, String alertText3, Boolean playTone,
Integer duration, Vector<SoftButton> softButtons, Integer correlationID) throws SdlException {
Integer duration, Vector<SoftButton> softButtons, Integer correlationID,Image icon) throws SdlException {

Alert msg = new Alert();
msg.setCorrelationID(correlationID);
Expand All @@ -4903,6 +4903,7 @@ public void alert(Vector<TTSChunk> ttsChunks,
msg.setPlayTone(playTone);
msg.setTtsChunks(ttsChunks);
msg.setSoftButtons(softButtons);
msg.setAlertIcon(icon);

sendRPCRequest(msg);
}
Expand Down
24 changes: 24 additions & 0 deletions sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Alert.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,30 @@ public class Alert extends RPCRequest {
public static final String KEY_PROGRESS_INDICATOR = "progressIndicator";
public static final String KEY_TTS_CHUNKS = "ttsChunks";
public static final String KEY_SOFT_BUTTONS = "softButtons";
public static final String KEY_ICON = "alertIcon";

/**
* <p>Sets the Image
* If provided, defines the image to be shown along with an alert</p>
* @param alertIcon
* <p>an Image obj representing the Image obj shown along with an
* alert</p>
* <p>
* <b>Notes: </b>If omitted on supported displays, no (or the
* default if applicable) icon will be displayed</p>
*/
public void setAlertIcon(Image alertIcon) {
setParameters(KEY_ICON, alertIcon);
}

/**
* <p>Gets the image to be shown along with an alert </p>
*
* @return Image -an Image object
*/
public Image getAlertIcon() {
return (Image) getObject(Image.class, KEY_ICON);
}

/**
* Constructs a new Alert object
Expand Down