Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
2030d49
Merge pull request #668 from mindbox-cloud/master
itmindbox Jan 13, 2026
2643284
MOBILEWEBVIEW-3: Add mindbox webview
enotniy Jan 20, 2026
0e0c490
MOBILEWEBVIEW-3: Fix lint error
enotniy Jan 20, 2026
b7a43d9
MOBILEWEBVIEW-3: Fix lint error
enotniy Jan 20, 2026
8e1795f
MOBILEWEBVIEW-3: Follow code review
enotniy Jan 21, 2026
6bb0c86
MOBILEWEBVIEW-3: Refactoring
enotniy Jan 21, 2026
b8f34b4
MOBILEWEBVIEW-3: Fix InAppPositionController for BottomSheet
enotniy Jan 21, 2026
961f777
Merge pull request #669 from mindbox-cloud/feature/MOBILEWEBVIEW-3
enotniy Jan 21, 2026
a6e7858
WMSDK-608: Support app distribution from all branches (#670)
justSmK Jan 26, 2026
3a50ab0
MOBILEWEBVIEW-6: Add js brige
enotniy Feb 2, 2026
014d236
MOBILEWEBVIEW-6: Add message validator
enotniy Feb 2, 2026
2ca8c4b
MOBILEWEBVIEW-6: Add tests
enotniy Feb 2, 2026
7406683
MOBILEWEBVIEW-6: Update common sdk
enotniy Feb 2, 2026
0473969
MOBILEWEBVIEW-6: Follow code review
enotniy Feb 2, 2026
933cf11
Merge pull request #671 from mindbox-cloud/feature/MOBILEWEBVIEW-6
enotniy Feb 3, 2026
e1412f8
MOBILEWEBVIEW-31: support featureToggle section in config
sergeysozinov Feb 4, 2026
8d9a627
MOBILEWEBVIEW-31: change default logic (#673)
sergeysozinov Feb 6, 2026
d136817
MOBILEWEBVIEW-7: add back action
enotniy Feb 6, 2026
36d8bf0
MOBILEWEBVIEW-7: refactoring contentUrl request
enotniy Feb 6, 2026
1bb636b
Merge pull request #674 from mindbox-cloud/feature/MOBILEWEBVIEW-7
enotniy Feb 6, 2026
1065d40
WMSDK-608: Support app distribution from all branches (#670)
justSmK Feb 9, 2026
e5b54b0
MOBILEWEBVIEW-10: Add Inapp.ShowFailure operation
sergeysozinov Feb 12, 2026
1c4fab0
MOBILEWEBVIEW-3: Fix InAppPositionController for BottomSheet
enotniy Jan 21, 2026
8ae583f
MOBILEWEBVIEW-8: Add data collector
enotniy Feb 11, 2026
6cc3e3c
MOBILEWEBVIEW-8: ADd constant for status
enotniy Feb 12, 2026
a6d3560
MOBILEWEBVIEW-8: Add tests
enotniy Feb 12, 2026
f5df263
MOBILEWEBVIEW-8: Fix ime padding
enotniy Feb 12, 2026
aa56e6b
Merge pull request #677 from mindbox-cloud/feature/MOBILEWEBVIEW-8
enotniy Feb 13, 2026
adad8ae
MOBILEWEBVIEW-10: change field name
sergeysozinov Feb 13, 2026
b820c2a
MOBILEWEBVIEW-8: Fix permissions in ready action
enotniy Feb 16, 2026
fa4a897
MOBILEWEBVIEW-7: Fix back action on reattach webview
enotniy Feb 16, 2026
c2a15f0
Merge pull request #679 from mindbox-cloud/feature/MOBILEWEBVIEW-8
enotniy Feb 16, 2026
a591388
MOBILEWEBVIEW-46: Add sync/async operations
enotniy Feb 16, 2026
4eb8a61
MOBILEWEBVIEW-5: support web layer
sergeysozinov Feb 17, 2026
1343f3e
MOBILEWEBVIEW-46: Follow code review
enotniy Feb 17, 2026
609accd
Merge pull request #681 from mindbox-cloud/feature/MOBILEWEBVIEW-46
enotniy Feb 17, 2026
bb6d08e
MOBILEWEBVIEW-10: fix bugs and delete sending error when no internet
sergeysozinov Feb 19, 2026
569fd39
MOBILEWEBVIEW-54: Fix js bridge
enotniy Feb 18, 2026
44da113
MOBILEWEBVIEW-54: Follow code review
enotniy Feb 19, 2026
1ba8426
Merge pull request #682 from mindbox-cloud/feature/MOBILEWEBVIEW-54
enotniy Feb 19, 2026
32e25a9
MOBILEWEBVIEW-57: Add link router for webview
enotniy Mar 2, 2026
5b9326a
MOBILEWEBVIEW-57: Change error format
enotniy Mar 2, 2026
2410acd
MOBILEWEBVIEW-60: add timeToDisplay for Inapp.Show action
sergeysozinov Mar 2, 2026
29f9031
MOBILEWEBVIEW-57: Fix log
enotniy Mar 2, 2026
e3c3bd4
Merge pull request #685 from mindbox-cloud/feature/MOBILEWEBVIEW-57
enotniy Mar 2, 2026
728ddff
Bump SDK version to 2.15.0-rc
github-actions[bot] Mar 5, 2026
fc8de01
MOBILEWEBVIEW-75: fix back button for modal window
sergeysozinov Mar 5, 2026
1416c0c
MOBILEWEBVIEW-34: Refactoring close inapp
enotniy Mar 4, 2026
1c4c988
MOBILEWEBVIEW-34: Refactoring stop inapp
enotniy Mar 5, 2026
5853c2d
MOBILEWEBVIEW-34: Fix trigger dismiss
enotniy Mar 6, 2026
d7c5085
Merge pull request #687 from mindbox-cloud/feature/MOBILEWEBVIEW-34
enotniy Mar 10, 2026
42ae503
Change version badge image url
enotniy Mar 10, 2026
f2510f1
Merge pull request #688 from mindbox-cloud/release/2.15.0-rc
AndreyEmtsov Mar 10, 2026
fccc1d5
Merge pull request #689 from mindbox-cloud/hotfix/fix_version_badge
enotniy Mar 11, 2026
55f1f05
MOBILEWEBVIEW-94: Add local state storage
enotniy Mar 11, 2026
c432976
MOBILEWEBVIEW-94: Add test. Add local state version to ready response
enotniy Mar 12, 2026
331229e
MOBILEWEBVIEW-94: Follow code review
enotniy Mar 12, 2026
1ca1652
Merge pull request #690 from mindbox-cloud/feature/MOBILEWEBVIEW-94
enotniy Mar 12, 2026
b1f8eca
MOBILEWEBVIEW-97: add firstInitializationDateTime
sergeysozinov Mar 12, 2026
2ad0d87
MOBILEWEBVIEW-34: Fix remove paused viewholder
enotniy Mar 13, 2026
37927c3
MOBILEWEBVIEW-34: Fix remove inapp for part activity
enotniy Mar 16, 2026
0921383
MOBILEWEBVIEW-34: Fix paused viewholder inapp
enotniy Mar 17, 2026
5db51ac
MOBILEWEBVIEW-98: support vibration
sergeysozinov Mar 18, 2026
bf38a8e
MOBILEWEBVIEW-100: Add permission request for jsbridge
enotniy Mar 18, 2026
2f7e27e
MOBILEWEBVIEW-98: fix unit test stubbing
Mar 18, 2026
fa41ceb
MOBILEWEBVIEW-100: Follow code review
enotniy Mar 18, 2026
717826d
MOBILEWEBVIEW-100: Follow code review
enotniy Mar 18, 2026
84ef639
Merge pull request #694 from mindbox-cloud/feature/MOBILEWEBVIEW-100
enotniy Mar 19, 2026
8d58f66
MOBILEWEBVIEW-133: Add push permission request for jsbridge
enotniy Mar 20, 2026
357905a
MOBILEWEBVIEW-133: Remove activity for repmissions
enotniy Mar 20, 2026
4ffe116
MOBILEWEBVIEW-133: Remove route to settings
enotniy Mar 20, 2026
c4a6fe4
Merge pull request #695 from mindbox-cloud/feature/MOBILEWEBVIEW-133
enotniy Mar 20, 2026
bbc58c5
MOBILE-53: Add settings.open action for js bridge
enotniy Mar 24, 2026
a0e210d
Merge pull request #696 from mindbox-cloud/feature/MOBILE-53
enotniy Mar 24, 2026
700808d
MOBILEWEBVIEW-126: change back action handler
sergeysozinov Mar 25, 2026
d2e4bcd
MOBILEWEBVIEW-133: Fix dialogShown
enotniy Mar 25, 2026
37ba88e
Merge pull request #698 from mindbox-cloud/feature/MOBILEWEBVIEW-133_2
enotniy Mar 26, 2026
2ca8821
MOBILEWEBVIEW-133: Fix open settings after request permission
enotniy Mar 27, 2026
7161112
MOBILE-39: support shake and flip
sergeysozinov Mar 27, 2026
0fee705
Merge branch 'develop' into mission/webview-inapp
enotniy Mar 27, 2026
8f5fd74
Merge pull request #700 from mindbox-cloud/mission/webview-inapp
enotniy Mar 27, 2026
1ba61e0
Bump SDK version to 2.15.0
github-actions[bot] Apr 2, 2026
6fbc622
MOBILE-97: delete ios tests
sergeysozinov Apr 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/distribute-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ name: Distribute PushOk (manual)

on:
workflow_dispatch:
inputs:
app_ref:
description: "GitLab App branch (Optional)"
required: false
default: ""

jobs:
call-reusable:
uses: ./.github/workflows/distribute-reusable.yml
with:
branch: ${{ github.ref_name }}
secrets: inherit
app_ref: ${{ inputs.app_ref }}
secrets: inherit
194 changes: 186 additions & 8 deletions .github/workflows/distribute-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ on:
branch:
required: true
type: string
app_ref:
required: false
type: string
default: ""
secrets:
GITLAB_TRIGGER_TOKEN:
required: true

jobs:
distribution:
Expand All @@ -16,16 +23,187 @@ jobs:
with:
ref: ${{ inputs.branch }}
submodules: recursive
fetch-depth: 3

- name: Get last 3 commit messages
shell: bash
run: |
commits=$(git log -3 --pretty=format:"%s")
echo "commits=$commits" >> $GITHUB_ENV
set -euo pipefail
commits="$(git log -3 --pretty=format:"%s")"
echo "commits<<EOF" >> "$GITHUB_ENV"
echo "$commits" >> "$GITHUB_ENV"
echo "EOF" >> "$GITHUB_ENV"

- name: Trigger build & send to FAD
- name: Debug payload that will be sent to GitLab
shell: bash
env:
SOURCE_BRANCH: ${{ inputs.branch }}
APP_REF_OVERRIDE: ${{ inputs.app_ref }}
DEFAULT_APP_REF: develop
INPUT_COMMITS: ${{ env.commits }}
run: |
curl --location 'https://mindbox.gitlab.yandexcloud.net/api/v4/projects/900/trigger/pipeline' \
--form 'token="${{ secrets.GITLAB_TRIGGER_TOKEN }}"' \
--form 'ref="develop"' \
--form "variables[INPUT_BRANCH]=\"${{ inputs.branch }}\"" \
--form "variables[INPUT_COMMITS]=\"${{ env.commits }}\""
set -euo pipefail

# Trim override so " " becomes empty
APP_REF_OVERRIDE="$(printf '%s' "${APP_REF_OVERRIDE:-}" | xargs)"

echo "---- DEBUG (GitHub -> GitLab trigger payload) ----"
echo "SDK branch (INPUT_BRANCH): $SOURCE_BRANCH"
echo "Manual App ref override: ${APP_REF_OVERRIDE:-<empty>}"
echo "Default App ref: $DEFAULT_APP_REF"
echo ""
echo "RAW INPUT_COMMITS (cat -A):"
printf '%s' "${INPUT_COMMITS:-}" | cat -A
echo ""
echo "RAW INPUT_COMMITS (printf %q):"
printf '%q\n' "${INPUT_COMMITS:-}"
echo "--------------------------------------------------"

- name: Trigger build & send to FAD (override strict; else same->develop)
env:
GITLAB_HOST: mindbox.gitlab.yandexcloud.net
APP_PROJECT_ID: "900"
DEFAULT_APP_REF: develop

SOURCE_BRANCH: ${{ inputs.branch }}
APP_REF_OVERRIDE: ${{ inputs.app_ref }}

GITLAB_TRIGGER_TOKEN: ${{ secrets.GITLAB_TRIGGER_TOKEN }}
INPUT_COMMITS: ${{ env.commits }}
shell: bash
run: |
set -euo pipefail

# Trim override so " " becomes empty
APP_REF_OVERRIDE="$(printf '%s' "${APP_REF_OVERRIDE:-}" | xargs)"

# Normalize commits:
# - convert CRLF -> LF
# - if commits accidentally contain literal "\n", expand them to real newlines
normalize_commits() {
local raw="${1:-}"
# CRLF -> LF
raw="$(printf '%s' "$raw" | tr -d '\r')"

# If it contains literal "\n" (backslash+n), expand escapes
if [[ "$raw" == *"\\n"* ]]; then
raw="$(printf '%b' "$raw")"
fi

printf '%s' "$raw"
}

COMMITS_TO_SEND="$(normalize_commits "${INPUT_COMMITS:-}")"

echo "SDK branch (INPUT_BRANCH): $SOURCE_BRANCH"
echo "Manual App ref override: ${APP_REF_OVERRIDE:-<empty>}"
echo "Default App ref: $DEFAULT_APP_REF"
echo ""
echo "COMMITS_TO_SEND preview (cat -A):"
printf '%s' "$COMMITS_TO_SEND" | cat -A
echo ""

trigger_pipeline() {
local ref="$1"
local tmp_body
tmp_body="$(mktemp)"

local code
code="$(curl -sS -o "$tmp_body" -w '%{http_code}' --location \
--retry 3 --retry-all-errors --retry-delay 2 \
"https://${GITLAB_HOST}/api/v4/projects/${APP_PROJECT_ID}/trigger/pipeline" \
--form "token=${GITLAB_TRIGGER_TOKEN}" \
--form "ref=${ref}" \
--form "variables[INPUT_BRANCH]=${SOURCE_BRANCH}" \
--form "variables[INPUT_COMMITS]=${COMMITS_TO_SEND}")"

local body
body="$(cat "$tmp_body" 2>/dev/null || true)"
rm -f "$tmp_body"

echo "Trigger HTTP: $code (ref=$ref)"
echo "Response body:"
echo "$body"

if [[ "$code" == "200" || "$code" == "201" ]]; then
local web_url
web_url="$(
printf '%s\n' "$body" |
grep -o '"web_url":"[^"]*"' |
head -n 1 |
cut -d'"' -f4
)"
if [[ -n "${web_url:-}" ]]; then
echo "Pipeline URL: $web_url"
fi
return 0
fi

if [[ "$code" == "401" || "$code" == "403" ]]; then
echo "Auth error (HTTP $code). Check that GITLAB_TRIGGER_TOKEN is valid and has access to project ${APP_PROJECT_ID}."
return 1
fi

# Missing ref: GitLab returns 400 + "Reference not found"
if [[ "$code" == "400" || "$code" == "404" ]]; then
if [[ "$body" == *"Reference not found"* ]]; then
return 2
fi

echo "Got HTTP $code but it's NOT 'Reference not found'."
echo "This can happen if pipelines are blocked for triggers by workflow:rules or job rules when CI_PIPELINE_SOURCE == 'trigger'."
echo "Check the target repo .gitlab-ci.yml rules/workflow:rules."
return 1
fi

if [[ "$code" =~ ^5[0-9][0-9]$ ]]; then
echo "Server error (HTTP $code). GitLab/proxy might be temporarily unavailable."
return 1
fi

echo "Unexpected HTTP status: $code"
return 1
}

# If override is provided: try ONLY override; if missing ref -> fail
if [[ -n "$APP_REF_OVERRIDE" ]]; then
echo "Override provided -> trying ONLY App ref: $APP_REF_OVERRIDE"
trigger_pipeline "$APP_REF_OVERRIDE" || rc=$?
rc="${rc:-0}"

if [[ "$rc" == "0" ]]; then
echo "Triggered on override ref."
exit 0
fi

if [[ "$rc" == "2" ]]; then
echo "ERROR: App ref not found: $APP_REF_OVERRIDE (GitLab returned 'Reference not found')"
exit 1
fi

echo "Trigger failed for reasons other than missing ref."
exit 1
fi

# No override: same branch -> fallback develop
desired_ref="$SOURCE_BRANCH"
fallback_ref="$DEFAULT_APP_REF"

echo "No override -> trying App ref: $desired_ref"
trigger_pipeline "$desired_ref" || rc=$?
rc="${rc:-0}"

if [[ "$rc" == "0" ]]; then
echo "Triggered on same branch."
exit 0
fi

if [[ "$rc" == "2" ]]; then
echo "Same branch not found. Falling back to: $fallback_ref"
trigger_pipeline "$fallback_ref"
echo "Triggered on fallback ref."
exit 0
fi

echo "Trigger failed for reasons other than missing ref."
exit 1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/cloud.mindbox/mobile-sdk/badge.svg)](https://central.sonatype.com/artifact/cloud.mindbox/mobile-sdk)
[![Maven Central](https://img.shields.io/maven-central/v/cloud.mindbox/mobile-sdk?label=Maven%20Central)](https://central.sonatype.com/artifact/cloud.mindbox/mobile-sdk)

# Mindbox SDK for Android

Expand Down
2 changes: 1 addition & 1 deletion example/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ dependencies {
implementation 'com.google.code.gson:gson:2.11.0'

//Mindbox
implementation 'cloud.mindbox:mobile-sdk:2.14.5'
implementation 'cloud.mindbox:mobile-sdk:2.15.0'
implementation 'cloud.mindbox:mindbox-firebase'
implementation 'cloud.mindbox:mindbox-huawei'
implementation 'cloud.mindbox:mindbox-rustore'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# SDK version property
SDK_VERSION_NAME=2.14.5
SDK_VERSION_NAME=2.15.0
USE_LOCAL_MINDBOX_COMMON=true
android.nonTransitiveRClass=false
kotlin.mpp.androidGradlePluginCompatibility.nowarn=true
Expand Down
1 change: 1 addition & 0 deletions sdk/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
<uses-permission android:name="android.permission.VIBRATE" />

<uses-sdk tools:overrideLibrary="io.mockk, io.mockk.proxy.android" />
<application>
Expand Down
17 changes: 17 additions & 0 deletions sdk/src/main/java/cloud/mindbox/mobile_sdk/Extensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import cloud.mindbox.mobile_sdk.Mindbox.logE
import cloud.mindbox.mobile_sdk.Mindbox.logW
import cloud.mindbox.mobile_sdk.inapp.domain.models.InApp
import cloud.mindbox.mobile_sdk.inapp.domain.models.InAppType
import cloud.mindbox.mobile_sdk.inapp.domain.models.Layer
import cloud.mindbox.mobile_sdk.logger.MindboxLoggerImpl
import cloud.mindbox.mobile_sdk.pushes.PushNotificationManager.EXTRA_UNIQ_PUSH_BUTTON_KEY
import cloud.mindbox.mobile_sdk.pushes.PushNotificationManager.EXTRA_UNIQ_PUSH_KEY
Expand Down Expand Up @@ -299,3 +300,19 @@ internal fun List<InApp>.sortByPriority(): List<InApp> {
internal inline fun <T> Queue<T>.pollIf(predicate: (T) -> Boolean): T? {
return peek()?.takeIf(predicate)?.let { poll() }
}

internal fun InAppType.getImageUrl(): String? {
return when (this) {
is InAppType.WebView -> this.layers
is InAppType.ModalWindow -> this.layers
is InAppType.Snackbar -> this.layers
}
.filterIsInstance<Layer.ImageLayer>()
.firstOrNull()
?.source
?.let { source ->
when (source) {
is Layer.ImageLayer.Source.UrlSource -> source.url
}
}
}
10 changes: 9 additions & 1 deletion sdk/src/main/java/cloud/mindbox/mobile_sdk/Mindbox.kt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public object Mindbox : MindboxLog {
private lateinit var lifecycleManager: LifecycleManager

private val userVisitManager: UserVisitManager by mindboxInject { userVisitManager }
private val timeProvider by mindboxInject { timeProvider }

internal var pushServiceHandlers: List<PushServiceHandler> = listOf()

Expand Down Expand Up @@ -1244,6 +1245,11 @@ public object Mindbox : MindboxLog {
MindboxPreferences.isNotificationEnabled = isNotificationEnabled
MindboxPreferences.instanceId = instanceId

if (MindboxPreferences.firstInitializationTime == null) {
MindboxPreferences.firstInitializationTime = timeProvider.currentTimestamp()
.convertToIso8601String()
}

MindboxEventManager.appInstalled(context, initData, configuration.shouldCreateCustomer)

deliverDeviceUuid(deviceUuid)
Expand Down Expand Up @@ -1358,7 +1364,9 @@ public object Mindbox : MindboxLog {
requestUrl = requestUrl,
sdkVersionNumeric = Constants.SDK_VERSION_NUMERIC
)

if (source != null || requestUrl != null) {
sessionStorageManager.lastTrackVisitData = trackVisitData
}
MindboxEventManager.appStarted(applicationContext, trackVisitData)
}
}
Expand Down
Loading
Loading