Skip to content

Commit 2b00b3b

Browse files
authored
Merge branch 'master' into InApp-Display-E2E
2 parents 02106ba + 2443374 commit 2b00b3b

File tree

27 files changed

+2861
-57
lines changed

27 files changed

+2861
-57
lines changed

.github/workflows/codeql.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: "CodeQL Scan"
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
analyze:
11+
name: Analyze Java
12+
runs-on: ubuntu-latest
13+
permissions:
14+
# required for all workflows
15+
security-events: write
16+
17+
# required to fetch internal or private CodeQL packsCodeQ
18+
packages: read
19+
20+
# only required for workflows in private repositories
21+
actions: read
22+
contents: read
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
include:
28+
- language: java-kotlin
29+
build-mode: autobuild
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v4
33+
34+
- name: Initialize CodeQL
35+
uses: github/codeql-action/init@v3
36+
with:
37+
languages: ${{ matrix.language }}
38+
build-mode: ${{ matrix.build-mode }}
39+
# If you wish to specify custom queries, you can do so here or in a config file.
40+
# By default, queries listed here will override any specified in a config file.
41+
# Prefix the list here with "+" to use these queries and those in the config file.
42+
43+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
44+
queries: ${{ matrix.language == 'java-kotlin' && 'security-extended, security-and-quality' }}
45+
46+
# If the analyze step fails for one of the languages you are analyzing with
47+
# "We were unable to automatically build your code", modify the matrix above
48+
# to set the build mode to "manual" for that language. Then modify this step
49+
# to build your code.
50+
# ℹ️ Command-line programs to run using the OS shell.
51+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
52+
- if: matrix.build-mode == 'manual'
53+
shell: bash
54+
run: |
55+
echo 'If you are using a "manual" build mode for one or more of the' \
56+
'languages you are analyzing, replace this with the commands to build' \
57+
'your code, for example:'
58+
echo ' make bootstrap'
59+
echo ' make release'
60+
exit 1
61+
62+
- name: Perform CodeQL Analysis
63+
uses: github/codeql-action/analyze@v3
64+
with:
65+
category: "/language:${{matrix.language}}"

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
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.6.1]
6+
### Added
7+
- Added edge-to-edge support for in-app messages to ensure proper display on devices with notches, cutouts, and system bars. Test your in-app messages on various devices to ensure optimal display.
8+
9+
### Note
10+
> **⚠️ Important**: The system applies white insets by default, which may contrast with dark-themed apps. Marketers can control the visual appearance using the background overlay option in the Iterable UI to choose appropriate background colors that work well with their app's theme.
611
712
## [3.6.0]
813
#### Added

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,34 @@ To learn more about various SDK features, read:
3737
- [Embedded Messages with Iterable's Android SDK](https://support.iterable.com/hc/articles/23061877893652)
3838
- [Unknown User Activation: Developer Docs](https://support.iterable.com/hc/sections/40078809116180)
3939

40+
## Background Initialization (Recommended)
41+
42+
To prevent ANRs during app startup, use background initialization instead of the standard `initialize()` method:
43+
44+
```kotlin
45+
// In Application.onCreate()
46+
IterableApi.initializeInBackground(this, "your-api-key", config) {
47+
// SDK is ready - this callback is optional
48+
}
49+
```
50+
51+
**For subscribing to initialization completion from multiple places:**
52+
53+
```kotlin
54+
IterableApi.onSDKInitialized {
55+
// This callback will be invoked when initialization completes
56+
// If already initialized, it's called immediately
57+
}
58+
```
59+
60+
Background initialization prevents ANRs by:
61+
- Running all initialization work on a background thread
62+
- Automatically queuing API calls until initialization completes
63+
- Ensuring no data is lost during startup
64+
- Providing callbacks on the main thread when ready
65+
66+
**⚠️ Important:** Always wait for initialization completion before accessing SDK internals. Accessing the SDK internals before initialization completes can cause crashes. Use the callback methods above to ensure the SDK is ready before use.
67+
4068
## Sample projects
4169

4270
For sample code, take a look at:

iterableapi-ui/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ dependencies {
6161

6262
ext {
6363
libraryName = 'iterableapi-ui'
64-
libraryVersion = '3.6.0'
64+
libraryVersion = '3.6.1'
6565
}
6666

6767
if (hasProperty("mavenPublishEnabled")) {

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import com.iterable.iterableapi.IterableApi;
1515
import com.iterable.iterableapi.IterableInAppLocation;
1616
import com.iterable.iterableapi.IterableInAppMessage;
17+
import com.iterable.iterableapi.IterableUtil;
1718
import com.iterable.iterableapi.ui.R;
1819

1920
import java.util.List;
@@ -76,7 +77,8 @@ private IterableInAppMessage getMessageById(String messageId) {
7677
private void loadMessage() {
7778
message = getMessageById(messageId);
7879
if (message != null) {
79-
webView.loadDataWithBaseURL("", message.getContent().html, "text/html", "UTF-8", "");
80+
// Use configured base URL to enable CORS for external resources (e.g., custom fonts)
81+
webView.loadDataWithBaseURL(IterableUtil.getWebViewBaseUrl(), message.getContent().html, "text/html", "UTF-8", "");
8082
webView.setWebViewClient(webViewClient);
8183
if (!loaded) {
8284
IterableApi.getInstance().trackInAppOpen(message, IterableInAppLocation.INBOX);

iterableapi/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ android {
2121
minSdkVersion 21
2222
targetSdkVersion 34
2323

24-
buildConfigField "String", "ITERABLE_SDK_VERSION", "\"3.6.0\""
24+
buildConfigField "String", "ITERABLE_SDK_VERSION", "\"3.6.1\""
2525

2626
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2727
}
@@ -89,7 +89,7 @@ dependencies {
8989

9090
ext {
9191
libraryName = 'iterableapi'
92-
libraryVersion = '3.6.0'
92+
libraryVersion = '3.6.1'
9393
}
9494

9595
if (hasProperty("mavenPublishEnabled")) {

0 commit comments

Comments
 (0)