Skip to content

Commit ba16441

Browse files
committed
release: SDK 1.19.4
1 parent 9624dae commit ba16441

File tree

5 files changed

+8926
-3
lines changed

5 files changed

+8926
-3
lines changed

Sources/sdk/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ android {
2525
minSdkVersion 15
2626
targetSdkVersion 33
2727
versionCode 1
28-
versionName "1.19.3"
28+
versionName "1.19.4"
2929
buildConfigField "String", SDK_VERSION, "\"$versionName\""
3030
buildConfigField "Integer", API_LEVEL, '51'
3131
buildConfigField "Integer", MESSAGING_API_LEVEL, '12'

Sources/sdk/src/main/java/com/batch/android/eventdispatcher/DispatcherSerializer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public class DispatcherSerializer {
1818
public static final String MIXPANEL_DISPATCHER_NAME = "mixpanel";
1919
public static final String GOOGLE_ANALYTICS_DISPATCHER_NAME = "google_analytics";
2020
public static final String BATCH_PLUGINS_DISPATCHER_NAME = "batch_plugins";
21+
public static final String BATCH_PIANO_NAME = "piano";
2122

2223
private static final String CUSTOM_DISPATCHER_NAME = "other";
2324

@@ -29,7 +30,8 @@ public class DispatcherSerializer {
2930
AT_INTERNET_DISPATCHER_NAME,
3031
MIXPANEL_DISPATCHER_NAME,
3132
GOOGLE_ANALYTICS_DISPATCHER_NAME,
32-
BATCH_PLUGINS_DISPATCHER_NAME
33+
BATCH_PLUGINS_DISPATCHER_NAME,
34+
BATCH_PIANO_NAME
3335
);
3436

3537
/**

Sources/sdk/src/main/java/com/batch/android/messaging/view/formats/WebFormatView.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,22 @@ public boolean onCreateWindow(
138138
if (!isDialog && isUserGesture && actionListener != null) {
139139
// A link with target="_blank" has been clicked
140140
WebView.HitTestResult result = view.getHitTestResult();
141-
actionListener.onOpenDeeplinkAction(result.getExtra(), null, null);
141+
String url = result.getExtra();
142+
// Fix the case where we have an image in a hyperlink and
143+
// view.getHitTestResult() returns the source of the image
144+
// rather than the url.
145+
if (result.getType() == WebView.HitTestResult.SRC_IMAGE_ANCHOR_TYPE) {
146+
Message href = view.getHandler().obtainMessage();
147+
view.requestFocusNodeHref(href);
148+
Bundle data = href.getData();
149+
if (data != null) {
150+
String imageUrl = data.getString("url");
151+
if (imageUrl != null && !imageUrl.isEmpty()) {
152+
url = imageUrl;
153+
}
154+
}
155+
}
156+
actionListener.onOpenDeeplinkAction(url, null, null);
142157
}
143158
return super.onCreateWindow(view, isDialog, isUserGesture, resultMsg);
144159
}

proguard-mappings/1.19.4/checksum.sha

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
03f72118d6b80f02081fd222c3653c74bbcf16c1 public-sdk/Batch.aar

0 commit comments

Comments
 (0)