Skip to content

Commit 8bbcd3f

Browse files
authored
Merge branch 'master' into bugfix/MOB-6575-Android-crash-on-press-push-notification
2 parents 47a59ca + bd6cf8d commit 8bbcd3f

35 files changed

+2287
-240
lines changed

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
tab_width = 4

.github/workflows/build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ jobs:
2222

2323
- run: touch local.properties
2424

25+
- name: Lint Check
26+
run: ./gradlew :iterableapi:lintDebug
27+
2528
- name: Checkstyle
2629
run: ./gradlew :iterableapi:checkstyle :iterableapi-ui:assembleDebug
2730

@@ -58,7 +61,7 @@ jobs:
5861
5962
instrumentation-tests:
6063
name: Instrumentation tests
61-
runs-on: macos-12
64+
runs-on: macos-13
6265
steps:
6366
- name: Checkout
6467
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -69,7 +72,7 @@ jobs:
6972
- name: Configure JDK
7073
uses: actions/setup-java@d202f5dbf7256730fb690ec59f6381650114feb2 # v1.4.3
7174
with:
72-
java-version: 11
75+
java-version: 17
7376

7477
- run: touch local.properties
7578

CHANGELOG.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,29 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5-
## [Unreleased]
5+
## [3.5.6]
6+
7+
#### Fixed
8+
- Fixed Crash while initializing IterableSDK on some devices (Unsupported IV Length).
9+
10+
## [3.5.5]
611

712
#### Added
8-
- nothing yet
13+
- - Added `IterableDecryptionFailureHandler` interface to handle decryption failures of PII information.
914

1015
#### Removed
11-
- nothing yet
16+
- Removed `encryptionEnforced` parameter from `IterableConfig` as data is now always encoded for security
1217

1318
#### Changed
14-
- nothing yet
19+
- Migrated from EncryptedSharedPreferences to regular SharedPreferences to prevent ANRs while EncryptedSharedPreferences was created on the main thread. We are now using our own encryption library to encrypt PII information before storing it in SharedPreferences.
20+
21+
## [3.5.4]
22+
#### Fixed
23+
- In-Apps are now robust with animation, resolving flickering and animation issues observed on Pixel 6 Pro with API 35.
24+
- Fixed an issue where AuthManager was not reset correctly when logging out a user.
25+
- Fixed `ConcurrentModificationException` leading to crashes during application launches.
26+
- Addressed a text truncation issue in Embedded Message templates for applications targeting Android 14 and Android 15.
27+
- Improved InboxActivity compatibility with edge-to-edge layouts, ensuring seamless handling of notches and display cutouts.
1528

1629
## [3.5.3]
1730
#### Fixed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ android {
1717
defaultConfig {
1818
applicationId "com.iterable.iterableapi.testapp"
1919
minSdkVersion 16
20-
targetSdkVersion 27
20+
targetSdkVersion 31
2121
versionCode 1
2222
versionName "1.0"
2323
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

app/src/main/AndroidManifest.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,23 @@
1010
android:theme="@style/AppTheme">
1111
<activity
1212
android:name="com.iterable.androidsdk.MainActivity"
13+
android:exported="true"
1314
android:label="@string/app_name"
1415
android:theme="@style/AppTheme.NoActionBar">
1516
<intent-filter>
1617
<action android:name="android.intent.action.MAIN" />
18+
1719
<category android:name="android.intent.category.LAUNCHER" />
1820
</intent-filter>
1921
</activity>
22+
<activity
23+
android:name="androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity"
24+
android:exported="true" />
25+
<activity
26+
android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity"
27+
android:exported="true" />
28+
<activity
29+
android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyFloatingActivity"
30+
android:exported="true" />
2031
</application>
2132
</manifest>

iterableapi-ui/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ android {
88

99
defaultConfig {
1010
minSdkVersion 16
11-
targetSdkVersion 28
11+
targetSdkVersion 31
1212
vectorDrawables.useSupportLibrary = true
1313
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1414
}
@@ -51,7 +51,7 @@ dependencies {
5151

5252
ext {
5353
libraryName = 'iterableapi-ui'
54-
libraryVersion = '3.5.3'
54+
libraryVersion = '3.5.6'
5555
}
5656

5757
if (hasProperty("mavenPublishEnabled")) {

iterableapi-ui/src/main/java/com/iterable/iterableapi/ui/inbox/IterableInboxFragment.java

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
package com.iterable.iterableapi.ui.inbox;
22

33
import android.content.Intent;
4+
import android.graphics.Insets;
5+
import android.os.Build;
46
import android.os.Bundle;
57
import androidx.annotation.LayoutRes;
68
import androidx.annotation.NonNull;
79
import androidx.annotation.Nullable;
10+
import androidx.core.view.ViewCompat;
811
import androidx.fragment.app.Fragment;
912
import androidx.recyclerview.widget.LinearLayoutManager;
1013
import androidx.recyclerview.widget.RecyclerView;
@@ -184,6 +187,33 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
184187
return relativeLayout;
185188
}
186189

190+
@Override
191+
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
192+
super.onViewCreated(view, savedInstanceState);
193+
// Use ViewCompat to handle insets dynamically
194+
ViewCompat.setOnApplyWindowInsetsListener(view, (v, insets) -> {
195+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
196+
// For API 30 and above: Use WindowInsetsCompat to handle insets
197+
Insets systemBarsInsets = insets.getSystemGestureInsets().toPlatformInsets();
198+
v.setPadding(
199+
0,
200+
systemBarsInsets.top, // Padding for status bar and cutout
201+
0,
202+
systemBarsInsets.bottom // Padding for navigation bar
203+
);
204+
} else {
205+
// For older Android versions: Use legacy methods
206+
v.setPadding(
207+
0,
208+
insets.getSystemWindowInsetTop(), // Padding for status bar and cutout
209+
0,
210+
insets.getSystemWindowInsetBottom() // Padding for navigation bar
211+
);
212+
}
213+
return insets;
214+
});
215+
}
216+
187217
@Override
188218
public void onResume() {
189219
super.onResume();

iterableapi-ui/src/main/res/layout-v21/banner_view.xml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
android:layout_gravity="center_vertical"
88
android:layout_marginTop="8dp"
99
android:layout_marginStart="16dp"
10+
android:layout_marginLeft="16dp"
1011
android:layout_marginBottom="12dp"
1112
app:cardCornerRadius="8dp"
1213
app:cardElevation="0dp"
@@ -18,6 +19,7 @@
1819
android:layout_width="240dp"
1920
android:layout_height="wrap_content"
2021
android:layout_marginStart="16dp"
22+
android:layout_marginLeft="16dp"
2123
android:layout_marginTop="16dp"
2224
android:ellipsize="end"
2325
android:maxLines="2"
@@ -34,6 +36,7 @@
3436
android:layout_width="240dp"
3537
android:layout_height="wrap_content"
3638
android:layout_marginStart="16dp"
39+
android:layout_marginLeft="16dp"
3740
android:layout_marginTop="8dp"
3841
android:ellipsize="end"
3942
android:maxLines="2"
@@ -74,8 +77,10 @@
7477
android:ellipsize="end"
7578
android:layout_marginStart="16dp"
7679
android:layout_marginEnd="8dp"
77-
android:paddingTop="8dp"
78-
android:paddingBottom="8dp"
80+
android:layout_marginLeft="16dp"
81+
android:layout_marginRight="8dp"
82+
android:paddingTop="0dp"
83+
android:paddingBottom="0dp"
7984
android:paddingStart="12dp"
8085
android:paddingEnd="12dp"
8186
android:singleLine="true"
@@ -91,8 +96,8 @@
9196
android:layout_height="36dp"
9297
android:background="@drawable/secondary_banner_button_background"
9398
android:ellipsize="end"
94-
android:paddingTop="8dp"
95-
android:paddingBottom="8dp"
99+
android:paddingTop="0dp"
100+
android:paddingBottom="0dp"
96101
android:paddingStart="12dp"
97102
android:paddingEnd="12dp"
98103
android:singleLine="true"

iterableapi-ui/src/main/res/layout-v21/card_view.xml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
android:layout_height="wrap_content"
4141
android:layout_marginStart="16dp"
4242
android:layout_marginEnd="16dp"
43+
android:layout_marginLeft="16dp"
44+
android:layout_marginRight="16dp"
4345
android:layout_marginTop="16dp"
4446
android:ellipsize="end"
4547
android:maxLines="2"
@@ -56,6 +58,8 @@
5658
android:layout_height="wrap_content"
5759
android:layout_marginStart="16dp"
5860
android:layout_marginEnd="16dp"
61+
android:layout_marginLeft="16dp"
62+
android:layout_marginRight="16dp"
5963
android:layout_marginTop="8dp"
6064
android:ellipsize="end"
6165
android:maxLines="2"
@@ -85,8 +89,10 @@
8589
android:ellipsize="end"
8690
android:layout_marginStart="16dp"
8791
android:layout_marginEnd="8dp"
88-
android:paddingTop="8dp"
89-
android:paddingBottom="8dp"
92+
android:layout_marginLeft="16dp"
93+
android:layout_marginRight="8dp"
94+
android:paddingTop="0dp"
95+
android:paddingBottom="0dp"
9096
android:paddingStart="12dp"
9197
android:paddingEnd="12dp"
9298
android:singleLine="true"
@@ -102,8 +108,8 @@
102108
android:layout_height="36dp"
103109
android:background="@drawable/secondary_card_button_background"
104110
android:ellipsize="end"
105-
android:paddingTop="8dp"
106-
android:paddingBottom="8dp"
111+
android:paddingTop="0dp"
112+
android:paddingBottom="0dp"
107113
android:paddingStart="12dp"
108114
android:paddingEnd="12dp"
109115
android:singleLine="true"

iterableapi-ui/src/main/res/layout-v21/notification_view.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@
6767
android:textColor="@color/notification_text_color"
6868
android:background="@drawable/primary_notification_button_background"
6969
android:ellipsize="end"
70-
android:paddingTop="8dp"
71-
android:paddingBottom="8dp"
70+
android:paddingTop="0dp"
71+
android:paddingBottom="0dp"
7272
android:paddingStart="12dp"
7373
android:paddingEnd="12dp"
7474
android:singleLine="true"
@@ -84,8 +84,8 @@
8484
android:textColor="@color/notification_text_color"
8585
android:background="@drawable/secondary_notification_button_background"
8686
android:ellipsize="end"
87-
android:paddingTop="8dp"
88-
android:paddingBottom="8dp"
87+
android:paddingTop="0dp"
88+
android:paddingBottom="0dp"
8989
android:paddingStart="12dp"
9090
android:paddingEnd="12dp"
9191
android:singleLine="true"

0 commit comments

Comments
 (0)