diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCRequestFactory.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCRequestFactory.java index 983c496a75..c4c0f0c356 100644 --- a/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCRequestFactory.java +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCRequestFactory.java @@ -240,7 +240,7 @@ public static Alert buildAlert(Vector ttsChunks, msg.setPlayTone(playTone); msg.setTtsChunks(ttsChunks); msg.setSoftButtons(softButtons); - + msg.setAlertIcon(icon); return msg; } diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java index ea55702bd7..6177819fad 100644 --- a/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java @@ -4892,7 +4892,7 @@ public void alert(String ttsText, String alertText1, */ public void alert(Vector ttsChunks, String alertText1, String alertText2, String alertText3, Boolean playTone, - Integer duration, Vector softButtons, Integer correlationID) throws SdlException { + Integer duration, Vector softButtons, Integer correlationID,Image icon) throws SdlException { Alert msg = new Alert(); msg.setCorrelationID(correlationID); @@ -4903,6 +4903,7 @@ public void alert(Vector ttsChunks, msg.setPlayTone(playTone); msg.setTtsChunks(ttsChunks); msg.setSoftButtons(softButtons); + msg.setAlertIcon(icon); sendRPCRequest(msg); } diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Alert.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Alert.java index d0c4e04003..2819e2f22b 100644 --- a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Alert.java +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Alert.java @@ -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"; + + /** + *

Sets the Image + * If provided, defines the image to be shown along with an alert

+ * @param alertIcon + *

an Image obj representing the Image obj shown along with an + * alert

+ *

+ * Notes: If omitted on supported displays, no (or the + * default if applicable) icon will be displayed

+ */ + public void setAlertIcon(Image alertIcon) { + setParameters(KEY_ICON, alertIcon); + } + + /** + *

Gets the image to be shown along with an alert

+ * + * @return Image -an Image object + */ + public Image getAlertIcon() { + return (Image) getObject(Image.class, KEY_ICON); + } /** * Constructs a new Alert object