Skip to content

fix: APPLICATION_ID meta-data read as Integer instead of String (fixes #13)#42

Open
juliosuas wants to merge 1 commit intoIntent-Lab:mainfrom
juliosuas:fix/android-application-id-string
Open

fix: APPLICATION_ID meta-data read as Integer instead of String (fixes #13)#42
juliosuas wants to merge 1 commit intoIntent-Lab:mainfrom
juliosuas:fix/android-application-id-string

Conversation

@juliosuas
Copy link
Copy Markdown

Problem

In AndroidManifest.xml, the APPLICATION_ID meta-data is defined as:

<meta-data
    android:name="com.meta.wearable.mwdat.APPLICATION_ID"
    android:value="0"
/>

Android's Bundle interprets "0" as a java.lang.Integer, not a String. The Meta Wearables DAT SDK expects a String value via Bundle.getString(), which returns null for non-String types. This breaks the deep link construction for the registration flow, showing "Error opening link" on the Meta Stella app.

Logcat evidence:

W/Bundle: Key com.meta.wearable.mwdat.APPLICATION_ID expected String but value was a java.lang.Integer.

Fix

Reference the value via a string resource instead of an inline literal:

strings.xml:

<string name="mwdat_application_id" translatable="false">0</string>

AndroidManifest.xml:

android:value="@string/mwdat_application_id"

This forces Android to treat the value as a String.

Files Changed

  • app/src/main/AndroidManifest.xml
  • app/src/main/res/values/strings.xml

Test plan

  • "Connect my glasses" opens Meta Stella correctly (no error dialog)
  • Logcat no longer shows the Integer type mismatch warning

🤖 Generated with Claude Code

Android's Bundle interprets android:value="0" as java.lang.Integer.
The Meta DAT SDK calls Bundle.getString() which returns null for
non-String types, breaking the registration deep link to Meta Stella.

Use a string resource reference (@string/mwdat_application_id) to
force Android to treat the value as a String.

Co-Authored-By: Claude Opus 4.6 (1M context) <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