Repository navigation
feat: expose Android setOaidData API - #204
Closed
nlinakis-xm wants to merge 1 commit into
Closed
nlinakis-xm wants to merge 1 commit into
nlinakis-xm wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
There are user-facing inconsistencies in the new Android error message and the API documentation parameter naming that should be corrected before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds an Android-only setOaidData API to the Capacitor plugin’s public TypeScript surface so apps can supply a custom OAID to the AppsFlyer Android SDK prior to SDK initialization.
Changes:
- Exposes
AppsFlyer.setOaidData({ oaid })via a Capacitor-specific SDK subclass and transport passthrough. - Implements
setOaidDataon the Android Capacitor plugin with input validation and delegation toAppsFlyerLib.setOaidData. - Updates docs and adds focused TypeScript and Android unit tests for the new API.
File summaries
| File | Description |
|---|---|
| src/index.ts | Introduces SetOaidDataOptions and exposes setOaidData on the exported AppsFlyer singleton via a subclass. |
| src/capacitor-transport.ts | Adds a setOaidData transport method forwarding to the native Capacitor plugin. |
| src/tests/public-types.smoke.ts | Ensures the new public type is included in the public-types smoke check. |
| src/tests/index.test.ts | Verifies the public AppsFlyer instance exposes and forwards setOaidData. |
| src/tests/capacitor-transport.test.ts | Verifies the transport forwards setOaidData to the native plugin call. |
| docs/API.md | Documents the new Android-only setOaidData method and adds it to the API matrix. |
| android/src/test/java/capacitor/plugin/appsflyer/sdk/AppsFlyerPluginTest.kt | Adds unit tests for the OAID validation helper. |
| android/src/main/java/capacitor/plugin/appsflyer/sdk/AppsFlyerPlugin.kt | Implements setOaidData and adds an isValidOaid helper. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
nlinakis-xm
force-pushed
the
feat/android-set-oaid-data
branch
from
September 7, 2026 14:34
35390c0 to
5fbcdc9
Compare
nlinakis-xm
force-pushed
the
feat/android-set-oaid-data
branch
from
September 7, 2026 14:36
5fbcdc9 to
64ea5ea
Compare
Contributor
|
Hi @nlinakis-xm , |
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.
Summary
AppsFlyer.setOaidData({ oaid })in the public TypeScript APIAppsFlyerLib.getInstance().setOaidData(oaid)INVALID_REQUESTpatternThis enables applications using custom OAID providers to retrieve the OAID themselves and supply it to AppsFlyer before SDK initialization, as documented in the AppsFlyer OAID guide.
Platform support
This method is Android-only. No iOS behavior is introduced; unsupported platforms continue to reject through Capacitor's existing unimplemented-method behavior.
Testing
npm run fmt(ESLint and Prettier completed; SwiftLint was unavailable locally and no Swift files changed)npm run eslintnpm run prettier -- --checknpm testnpm run buildgradle clean build test --no-daemonwith Gradle 8.14.3The exact Android API signature was verified against the pinned
com.appsflyer:af-android-sdk:7.0.1AAR:public abstract void setOaidData(java.lang.String).