Skip to content

docs(cordova): fix Android shake-to-report property name - #43

Closed
fishmanalex wants to merge 1 commit into
bugsee:mainfrom
fishmanalex:fix/cordova-android-shake-to-report
Closed

docs(cordova): fix Android shake-to-report property name#43
fishmanalex wants to merge 1 commit into
bugsee:mainfrom
fishmanalex:fix/cordova-android-shake-to-report

Conversation

@fishmanalex

Copy link
Copy Markdown
Contributor

Summary

  • docs/sdk/cordova/configuration.mdx set bugseeOptions.shakeToReport = true in the Android code sample and options table — that's the iOS property name.
  • The real Android property is shakeToTrigger, confirmed against React Native's own configuration page (which correctly uses shakeToReport for iOS and shakeToTrigger for Android) and the native Android SDK docs.
  • A Cordova developer on Android who sets shakeToReport gets silent no-op behavior — the option simply doesn't exist on that platform.

Test plan

  • npx cspell on docs/sdk/cordova/** — 0 issues
  • Spot-check the Android tab of /sdk/cordova/configuration/ renders correctly after merge

🤖 Generated with Claude Code

https://claude.ai/code/session_01QnXDhVitCVmMNafPRvKUat

The Android sample and options table both used shakeToReport, the iOS
property name. The real Android property is shakeToTrigger (confirmed
against React Native's configuration page and the native Android SDK
docs), so a Cordova developer on Android setting shakeToReport gets a
silent no-op.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@krassx
krassx self-requested a review September 5, 2026 05:24
var bugseeOptions = new Bugsee.AndroidLaunchOptions();

bugseeOptions.shakeToReport = true;
bugseeOptions.shakeToTrigger = true;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked this with the code. shakeToReport is used for both platforms.

@krassx

krassx commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Closing this — I validated it against the Cordova plugin source and the change is inverted: it replaces a working property with one that doesn't exist.

The page documents the Cordova JS API, not native Android option names.

shakeToReport is an accessor on the base BugseeLaunchOptions class, which both AndroidLaunchOptions and IOSLaunchOptions extend (cross/cordova/src/code/options.ts:126-136). AndroidLaunchOptions.$setDefaults() sets it explicitly:

// options.ts:510, inside AndroidLaunchOptions
this.shakeToReport = false;

It serializes to the wire key "ShakeToReport", which the Android bridge handles — and it already accepts both spellings at the wire level:

// src/plugin/src/android/BugseePlugin.java:215-217
case "ShakeToReport":
case "ShakeToTrigger":
    out.put(Options.ReportingTriggerByShake, src.getBoolean(key));

shakeToTrigger does not exist in src/code/ (grep returns nothing). Because it isn't a declared accessor, assigning it writes a plain own-property on the instance — and $serialize() iterates only the internal $options map, so the value is never sent to native at all. That's the silent no-op the PR set out to fix, just moved onto the option that currently works.

Where the evidence went wrong: the PR cited src/plugin/templates/README.md:94. That table lists native Android key names (useSdCard, extendedVideoMode, …) rather than the JS property names, and it's stale — it's the same table the docs site inherited. The React Native comparison doesn't carry over either; RN's bridge is a different shape.

There is a real cleanup hiding here — the plugin's own README table should be reconciled with the TypeScript API — but that's a cross/cordova change, not a docs one.

🤖 Generated with Claude Code

@krassx krassx closed this Sep 5, 2026
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.

2 participants