@@ -37,13 +37,13 @@ public class IterableInAppManager {
3737 * @param dialogOptions
3838 * @param clickCallback
3939 */
40- public static void showNotification (Context context , JSONObject dialogOptions , IterableNotificationData trackParams , IterableHelper .IterableActionHandler clickCallback ) {
40+ public static void showNotification (Context context , JSONObject dialogOptions , String messageId , IterableHelper .IterableActionHandler clickCallback ) {
4141 if (dialogOptions != null ) {
4242 String type = dialogOptions .optString (IterableConstants .ITERABLE_IN_APP_TYPE );
4343 if (type .equalsIgnoreCase (IterableConstants .ITERABLE_IN_APP_TYPE_FULL )) {
44- showFullScreenDialog (context , dialogOptions , trackParams , clickCallback );
44+ showFullScreenDialog (context , dialogOptions , messageId , clickCallback );
4545 } else {
46- showNotificationDialog (context , dialogOptions , trackParams , clickCallback );
46+ showNotificationDialog (context , dialogOptions , messageId , clickCallback );
4747 }
4848 } else {
4949 IterableLogger .d (TAG , "In-App notification not displayed: showNotification must contain valid dialogOptions" );
@@ -56,7 +56,7 @@ public static void showNotification(Context context, JSONObject dialogOptions, I
5656 * @param dialogParameters
5757 * @param clickCallback
5858 */
59- static void showNotificationDialog (Context context , JSONObject dialogParameters , IterableNotificationData trackParams , IterableHelper .IterableActionHandler clickCallback ) {
59+ static void showNotificationDialog (Context context , JSONObject dialogParameters , String messageId , IterableHelper .IterableActionHandler clickCallback ) {
6060 Dialog dialog = new Dialog (context , android .R .style .Theme_Material_NoActionBar );
6161 dialog .requestWindowFeature (Window .FEATURE_NO_TITLE );
6262 dialog .setCanceledOnTouchOutside (true );
@@ -105,7 +105,7 @@ static void showNotificationDialog(Context context, JSONObject dialogParameters,
105105 //Buttons
106106 JSONArray buttonJson = dialogParameters .optJSONArray (IterableConstants .ITERABLE_IN_APP_BUTTONS );
107107 if (buttonJson != null ) {
108- verticalLayout .addView (createButtons (context , dialog , buttonJson , null , clickCallback ));
108+ verticalLayout .addView (createButtons (context , dialog , buttonJson , messageId , clickCallback ));
109109 }
110110
111111 dialog .setContentView (verticalLayout );
@@ -118,7 +118,7 @@ static void showNotificationDialog(Context context, JSONObject dialogParameters,
118118 * @param dialogParameters
119119 * @param clickCallback
120120 */
121- static void showFullScreenDialog (Context context , JSONObject dialogParameters , IterableNotificationData trackParams , IterableHelper .IterableActionHandler clickCallback ) {
121+ static void showFullScreenDialog (Context context , JSONObject dialogParameters , String messageId , IterableHelper .IterableActionHandler clickCallback ) {
122122 Dialog dialog = new Dialog (context , android .R .style .Theme_Light );
123123 dialog .requestWindowFeature (Window .FEATURE_NO_TITLE );
124124
@@ -184,7 +184,7 @@ static void showFullScreenDialog(Context context, JSONObject dialogParameters, I
184184 //Buttons
185185 JSONArray buttonJson = dialogParameters .optJSONArray (IterableConstants .ITERABLE_IN_APP_BUTTONS );
186186 if (buttonJson != null ) {
187- View buttons = createButtons (context , dialog , buttonJson , trackParams , clickCallback );
187+ View buttons = createButtons (context , dialog , buttonJson , messageId , clickCallback );
188188 LinearLayout .LayoutParams buttonParams = new LinearLayout .LayoutParams (
189189 LinearLayout .LayoutParams .MATCH_PARENT ,
190190 LinearLayout .LayoutParams .WRAP_CONTENT );
@@ -223,11 +223,11 @@ public static JSONObject getNextMessageFromPayload(String payload) {
223223 * @param context
224224 * @param dialog
225225 * @param buttons
226- * @param trackParams
226+ * @param messageId
227227 * @param clickCallback
228228 * @return
229229 */
230- private static View createButtons (Context context , Dialog dialog , JSONArray buttons , IterableNotificationData trackParams , IterableHelper .IterableActionHandler clickCallback ) {
230+ private static View createButtons (Context context , Dialog dialog , JSONArray buttons , String messageId , IterableHelper .IterableActionHandler clickCallback ) {
231231 LinearLayout .LayoutParams equalParamWidth = new LinearLayout .LayoutParams (
232232 LinearLayout .LayoutParams .MATCH_PARENT ,
233233 LinearLayout .LayoutParams .MATCH_PARENT , 1.0f );
@@ -244,7 +244,7 @@ private static View createButtons(Context context, Dialog dialog, JSONArray butt
244244 button .setBackgroundColor (getIntColorFromJson (buttonJson , IterableConstants .ITERABLE_IN_APP_BACKGROUND_COLOR , Color .LTGRAY ));
245245 String action = buttonJson .optString (IterableConstants .ITERABLE_IN_APP_BUTTON_ACTION );
246246 if (!action .isEmpty ()) {
247- button .setOnClickListener (new IterableInAppActionListener (dialog , i , action , trackParams , clickCallback ));
247+ button .setOnClickListener (new IterableInAppActionListener (dialog , i , action , messageId , clickCallback ));
248248 }
249249
250250 JSONObject textJson = buttonJson .optJSONObject (IterableConstants .ITERABLE_IN_APP_CONTENT );
0 commit comments