MOBILE-103: new arch in Android#168
Merged
sergeysozinov merged 10 commits intonew-archfrom Apr 17, 2026
Merged
Conversation
added 5 commits
April 13, 2026 15:28
There was a problem hiding this comment.
Pull request overview
This PR updates the React Native SDK and the included example app to align with React Native 0.76 / Android New Architecture (TurboModules + codegen), modernizes build tooling, and adjusts the JS↔native event wiring accordingly.
Changes:
- Introduces a TurboModule proxy (
src/NativeMindboxSdk.ts) and migrates JS to use it for native calls and event subscriptions. - Migrates Android native module packaging to
TurboReactPackage/ codegen-based module (MindboxSdkModule/MindboxSdkPackage) and updates Android build tooling. - Updates the example app to RN 0.76 templates/build settings and simplifies navigation by removing React Navigation.
Reviewed changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Removes a TS compiler option as part of the TS/RN tooling update. |
| src/index.tsx | Switches JS implementation to TurboModule-based native access and event subscriptions. |
| src/tests/index.test.ts | Updates mocks to support TurboModuleRegistry and new native surface. |
| src/NativeMindboxSdk.ts | Adds TurboModule spec + lazy resolver proxy used by the JS wrapper. |
| package.json | Bumps RN/Jest/TS toolchain, tightens peer deps, adds codegenConfig for TurboModules. |
| babel.config.js | Updates Babel preset to the RN 0.76 preset package. |
| android/build.gradle | Modernizes Android library build (AGP/Kotlin/Java 17), adds New Arch gating, configures codegen source set. |
| android/src/main/java/com/mindboxsdk/MindboxSdkPackage.kt | Migrates package to TurboReactPackage and provides module info for TurboModules. |
| android/src/main/java/com/mindboxsdk/MindboxSdkModule.kt | Migrates module to generated-spec base class and emits codegen events for JS. |
| android/src/main/java/com/mindboxsdk/MindboxJsDelivery.kt | Routes push-click delivery through the new module event emission path. |
| android/src/main/java/com/mindboxsdk/MindboxEventSubscriber.kt | Converts subscriber to Kotlin fun interface. |
| android/src/main/java/com/mindboxsdk/MindboxEventEmitter.kt | Minor cleanup/formatting while integrating with updated delivery flow. |
| example/exampleApp/package.json | Bumps example app to RN 0.76 and removes React Navigation deps. |
| example/exampleApp/src/navigation/AppNavigationContext.tsx | Adds a minimal navigation context used instead of React Navigation. |
| example/exampleApp/src/App.tsx | Replaces navigation container/stack with context-driven conditional rendering. |
| example/exampleApp/src/screens/HomeScreen.tsx | Switches to context navigation and refactors push navigation helpers. |
| example/exampleApp/src/screens/NotificationCenterScreen.tsx | Uses navigation context instead of injected navigation prop. |
| example/exampleApp/src/screens/PushNotificationScreen.tsx | Adds a “Back to Home” action using navigation context. |
| example/exampleApp/android/settings.gradle | Updates to RN 0.76 settings plugin/autolinking style. |
| example/exampleApp/android/gradle/wrapper/gradle-wrapper.properties | Updates Gradle wrapper version. |
| example/exampleApp/android/gradle.properties | Minor CLI comment tweak (new arch flag remains configured here). |
| example/exampleApp/android/build.gradle | Updates Android buildscript/tool versions and aligns with RN 0.76 rootproject plugin. |
| example/exampleApp/android/app/build.gradle | Updates app Gradle config to RN 0.76 autolinking and dependency style. |
| example/exampleApp/android/app/src/main/java/com/exampleapp/MainApplication.kt | Updates Application wiring for RN 0.76 / New Arch host setup. |
| example/exampleApp/android/app/src/main/java/com/exampleapp/MainActivity.kt | Updates intent delivery logic for both New Arch and Old Arch startup flows. |
| example/exampleApp/ios/exampleApp/PrivacyInfo.xcprivacy | Expands privacy manifest entries for accessed APIs / tracking keys. |
| example/exampleApp/ios/exampleApp.xcodeproj/project.pbxproj | Raises iOS deployment target and adjusts Swift compilation conditions. |
| example/exampleApp/ios/Podfile | Updates Podfile script loading and formatting consistent with newer templates. |
Comments suppressed due to low confidence (2)
example/exampleApp/android/settings.gradle:16
includeBuild("../node_modules/@react-native/gradle-plugin")is declared twice (insidepluginManagementand again at the bottom). This duplication can cause Gradle warnings or plugin resolution issues; keep only thepluginManagementone (the bottom includeBuild is typically unnecessary).
rootProject.name = "exampleApp"
include(":app")
includeBuild("../node_modules/@react-native/gradle-plugin")
src/index.tsx:300
onPushClickReceivednow subscribes viaMindboxSdkNative.onPushNotificationClicked, but iOS currently emitspushNotificationClickedfrom the separateMindboxJsDeliveryevent emitter module. Without a platform-specific fallback (or an iOS TurboModule event), this listener will be undefined on iOS and push click handling will break.
public onPushClickReceived(callback: (pushUrl: string | null, pushPayload: string | null) => void) {
if (!callback || typeof callback !== 'function') {
this.writeNativeLog('PushClick callback is not set', LogLevel.ERROR)
throw new Error('callback is required!')
}
this.removeOnPushClickReceived()
this.writeNativeLog('Set push click listener', LogLevel.INFO)
this._pushSubscription = MindboxSdkNative.onPushNotificationClicked((event: PushNotificationClickedPayload) => {
callback(event.pushUrl || null, event.pushPayload || null)
})
if (Platform.OS === 'android') {
this.writeNativeLog('Register push click listener for android', LogLevel.INFO)
MindboxSdkNative.onPushClickedIsRegistered(true)
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
justSmK
reviewed
Apr 17, 2026
justSmK
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://tracker.yandex.ru/MOBILE-103