Skip to content

AB#281037 - add gamifyWidgetOpen bridge#27

Open
dmytro-b-optimove wants to merge 2 commits intomainfrom
feature/281037-gamify-widget-react-native-bridge
Open

AB#281037 - add gamifyWidgetOpen bridge#27
dmytro-b-optimove wants to merge 2 commits intomainfrom
feature/281037-gamify-widget-react-native-bridge

Conversation

@dmytro-b-optimove
Copy link
Copy Markdown

@dmytro-b-optimove dmytro-b-optimove commented Apr 14, 2026

Summary

  • Bridges the new Android Gamify Widget SDK (GamifyWidgetSDK.open(), added in v7.13.0) to React Native via the existing TurboModule pattern
  • Bumps Android SDK dependency to 7.13.0 and adds gamify-widget-sdk:7.13.0 artifact
  • iOS is a no-op stub with a warning log — pending availability of an equivalent iOS SDK

Changes

File Change
android/build.gradle Bump optimove-android to 7.13.0, add gamify-widget-sdk:7.13.0
src/NativeOptimoveReactNative.ts Add gamifyWidgetOpen to Spec interface
src/index.ts Add static gamifyWidgetOpen(widgetUrl, userId?, token?) facade
android/.../OptimoveReactNativeModule.java @Override gamifyWidgetOpen — UI-thread dispatch via FragmentActivity
ios/OptimoveReactNative.swift No-op stub with log warning
ios/OptimoveReactNative.mm RCT_EXTERN_METHOD declaration

Usage

// All params after widgetUrl are optional
Optimove.gamifyWidgetOpen('https://widget.example.com/path', userId, token);

// Without auth params
Optimove.gamifyWidgetOpen('https://widget.example.com/path');

Test plan

  • Android: call gamifyWidgetOpen from example app — widget bottom sheet opens
  • Android: call without userId/token — widget opens without auth params
  • Android: call when activity is not a FragmentActivity — no crash, silent no-op
  • iOS: call gamifyWidgetOpen — no crash, warning printed to console

Notes

🤖 Generated with Claude Code

- Bump Android SDK dependency to 7.13.0, add gamify-widget-sdk artifact
- Add gamifyWidgetOpen to TurboModule spec
- Add static JS facade (userId/token optional)
- Android: UI-thread dispatch via FragmentActivity
- iOS: no-op stub pending iOS SDK availability

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dmytro-b-optimove dmytro-b-optimove changed the title feat: add gamifyWidgetOpen bridge (AB#281037) AB#281037 - add gamifyWidgetOpen bridge Apr 14, 2026
@dmytro-b-optimove dmytro-b-optimove marked this pull request as ready for review April 14, 2026 08:39
The gamify-widget-sdk module has no Maven publishing config in the
Android SDK repo — it is not a separate published artifact. Depend
only on optimove-android:7.13.0 until the publishing strategy for
the gamify module is decided upstream.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant