Skip to content

Commit 66f0ed7

Browse files
author
Evan Greer
committed
Merge branch 'feature/itbl-track-anon-user' into AUA-Beta-Release
# Conflicts: # iterableapi-ui/src/main/res/layout-v21/banner_view.xml # iterableapi-ui/src/main/res/layout-v21/card_view.xml # iterableapi-ui/src/main/res/layout/banner_view.xml # iterableapi-ui/src/main/res/layout/card_view.xml
2 parents 441816c + eabab8b commit 66f0ed7

34 files changed

+2563
-254
lines changed

.editorconfig

+6
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

+5-2
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

+28-4
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,40 @@
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.8]
6+
7+
### Fixed
8+
- Fixed logic issue where notifications were being disabled even when auto push registration was turned off
9+
10+
## [3.5.7]
11+
12+
### Added
13+
- Support for JSON-only in-app messages, JSON-only messages are now handled by the `onNewInApp` handler and consumed after retrieval
14+
- Enhanced notification state tracking to align with system notification permissions changes
15+
16+
## [3.5.6]
17+
18+
#### Fixed
19+
- Fixed Crash while initializing IterableSDK on some devices (Unsupported IV Length).
20+
21+
## [3.5.5]
622

723
#### Added
8-
- nothing yet
24+
- - Added `IterableDecryptionFailureHandler` interface to handle decryption failures of PII information.
925

1026
#### Removed
11-
- nothing yet
27+
- Removed `encryptionEnforced` parameter from `IterableConfig` as data is now always encoded for security
1228

1329
#### Changed
14-
- nothing yet
30+
- 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.
31+
32+
## [3.5.4]
33+
#### Fixed
34+
- In-Apps are now robust with animation, resolving flickering and animation issues observed on Pixel 6 Pro with API 35.
35+
- Fixed an issue where AuthManager was not reset correctly when logging out a user.
36+
- Fixed `ConcurrentModificationException` leading to crashes during application launches.
37+
- Addressed a text truncation issue in Embedded Message templates for applications targeting Android 14 and Android 15.
38+
- Improved InboxActivity compatibility with edge-to-edge layouts, ensuring seamless handling of notches and display cutouts.
1539

1640
## [3.6.0-beta1]
1741

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

+30
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@
9696
android:layout_height="36dp"
9797
android:background="@drawable/secondary_banner_button_background"
9898
android:ellipsize="end"
99-
android:paddingTop="8dp"
100-
android:paddingBottom="8dp"
99+
android:paddingTop="0dp"
100+
android:paddingBottom="0dp"
101101
android:paddingStart="12dp"
102102
android:paddingEnd="12dp"
103103
android:singleLine="true"

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@
108108
android:layout_height="36dp"
109109
android:background="@drawable/secondary_card_button_background"
110110
android:ellipsize="end"
111-
android:paddingTop="8dp"
112-
android:paddingBottom="8dp"
111+
android:paddingTop="0dp"
112+
android:paddingBottom="0dp"
113113
android:paddingStart="12dp"
114114
android:paddingEnd="12dp"
115115
android:singleLine="true"

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

+4-4
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"

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
android:layout_height="wrap_content"
3838
android:layout_marginLeft="16dp"
3939
android:layout_marginStart="16dp"
40+
android:layout_marginLeft="16dp"
4041
android:layout_marginTop="8dp"
4142
android:ellipsize="end"
4243
android:maxLines="2"
@@ -96,8 +97,8 @@
9697
android:layout_marginRight="16dp"
9798
android:background="@drawable/secondary_banner_button_background"
9899
android:ellipsize="end"
99-
android:paddingTop="8dp"
100-
android:paddingBottom="8dp"
100+
android:paddingTop="0dp"
101+
android:paddingBottom="0dp"
101102
android:paddingStart="12dp"
102103
android:paddingEnd="12dp"
103104
android:singleLine="true"

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

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<androidx.constraintlayout.widget.ConstraintLayout
3-
xmlns:android="http://schemas.android.com/apk/res/android"
2+
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
43
xmlns:app="http://schemas.android.com/apk/res-auto"
54
xmlns:tools="http://schemas.android.com/tools"
65
android:layout_width="match_parent"
76
android:layout_height="match_parent"
7+
xmlns:tools="http://schemas.android.com/tools"
88
android:layout_gravity="center_vertical"
9+
android:layout_marginStart="16dp"
910
android:layout_marginTop="8dp"
1011
android:layout_marginLeft="16dp"
1112
android:layout_marginBottom="12dp"
@@ -43,6 +44,8 @@
4344
android:layout_marginLeft="16dp"
4445
android:layout_marginRight="16dp"
4546
android:layout_marginEnd="16dp"
47+
android:layout_marginLeft="16dp"
48+
android:layout_marginRight="16dp"
4649
android:layout_marginTop="16dp"
4750
android:ellipsize="end"
4851
android:maxLines="2"
@@ -61,6 +64,8 @@
6164
android:layout_marginLeft="16dp"
6265
android:layout_marginRight="16dp"
6366
android:layout_marginEnd="16dp"
67+
android:layout_marginLeft="16dp"
68+
android:layout_marginRight="16dp"
6469
android:layout_marginTop="8dp"
6570
android:ellipsize="end"
6671
android:maxLines="2"
@@ -83,7 +88,7 @@
8388

8489
<Button
8590
android:id="@+id/embedded_message_first_button"
86-
android:layout_width="0dp"
91+
android:layout_width="wrap_content"
8792
android:layout_height="36dp"
8893
android:layout_marginStart="16dp"
8994
android:layout_marginLeft="16dp"
@@ -93,6 +98,8 @@
9398
android:ellipsize="end"
9499
android:paddingStart="8dp"
95100
android:paddingEnd="8dp"
101+
android:paddingTop="0dp"
102+
android:paddingBottom="0dp"
96103
android:singleLine="true"
97104
android:stateListAnimator="@null"
98105
android:textAllCaps="false"

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

+6-4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
android:layout_marginRight="16dp"
4242
android:layout_marginTop="8dp"
4343
android:layout_marginEnd="16dp"
44+
android:layout_marginLeft="16dp"
45+
android:layout_marginRight="16dp"
4446
android:ellipsize="end"
4547
android:maxLines="2"
4648
android:text=""
@@ -71,8 +73,8 @@
7173
android:textColor="@color/notification_text_color"
7274
android:background="@drawable/primary_notification_button_background"
7375
android:ellipsize="end"
74-
android:paddingTop="8dp"
75-
android:paddingBottom="8dp"
76+
android:paddingTop="0dp"
77+
android:paddingBottom="0dp"
7678
android:paddingStart="12dp"
7779
android:paddingEnd="12dp"
7880
android:singleLine="true"
@@ -90,8 +92,8 @@
9092
android:textColor="@color/notification_text_color"
9193
android:background="@drawable/secondary_notification_button_background"
9294
android:ellipsize="end"
93-
android:paddingTop="8dp"
94-
android:paddingBottom="8dp"
95+
android:paddingTop="0dp"
96+
android:paddingBottom="0dp"
9597
android:paddingStart="12dp"
9698
android:paddingEnd="12dp"
9799
android:singleLine="true"

iterableapi/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ dependencies {
6666
testImplementation 'androidx.test.ext:junit:1.1.5'
6767
testImplementation 'androidx.test:rules:1.5.0'
6868
testImplementation 'org.mockito:mockito-core:3.3.3'
69-
testImplementation 'org.mockito:mockito-inline:2.8.47'
69+
testImplementation 'org.mockito:mockito-inline:5.2.0'
7070
testImplementation 'org.robolectric:robolectric:4.9.2'
7171
testImplementation 'org.robolectric:shadows-playservices:4.9.2'
7272
testImplementation 'org.khronos:opengl-api:gl1.1-android-2.1_r1'

iterableapi/src/main/AndroidManifest.xml

+12
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
xmlns:tools="http://schemas.android.com/tools">
33

44
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
5+
<uses-permission android:name="android.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS"
6+
tools:ignore="ProtectedPermissions" />
57

68
<uses-permission android:name="android.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS"
79
tools:ignore="ProtectedPermissions" />
@@ -41,6 +43,16 @@
4143
android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyFloatingActivity"
4244
android:exported="true" />
4345

46+
<activity
47+
android:name="androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity"
48+
android:exported="true" />
49+
<activity
50+
android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity"
51+
android:exported="true" />
52+
<activity
53+
android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyFloatingActivity"
54+
android:exported="true" />
55+
4456
<uses-library android:name="androidx.security" android:required="false" />
4557
</application>
4658

0 commit comments

Comments
 (0)