Skip to content

Fix DAT registration: APPLICATION_ID read as Integer instead of String#14

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

Fix DAT registration: APPLICATION_ID read as Integer instead of String#14
EnzoDeg40 wants to merge 1 commit intoIntent-Lab:mainfrom
EnzoDeg40:fix/application-id-string-type

Conversation

@EnzoDeg40
Copy link

Summary

  • Fix APPLICATION_ID meta-data in AndroidManifest.xml being interpreted as Integer instead of String by Android's Bundle, causing the Meta Wearables DAT SDK to receive null and fail the registration deep link to Meta Stella
  • Use a string resource reference (@string/mwdat_application_id) instead of an inline numeric literal to force the correct type

Fixes #13

Root Cause

W/Bundle: Key com.meta.wearable.mwdat.APPLICATION_ID expected String
          but value was a java.lang.Integer. The default value <null> was returned.

When android:value="0" is used in a <meta-data> tag, Android parses it as an Integer. The DAT SDK calls Bundle.getString() which returns null for non-String types, breaking the registration flow.

Changes

  • strings.xml: Added <string name="mwdat_application_id" translatable="false">0</string>
  • AndroidManifest.xml: Changed android:value="0" to android:value="@string/mwdat_application_id"

Test plan

  • Build and deploy to Xiaomi device (Android 12+)
  • Click "Connect my glasses" — Meta Stella opens DAT registration screen correctly (no more error dialog)
  • Verified logcat no longer shows the Integer type mismatch warning

🤖 Generated with Claude Code

…d of String

Android's Bundle interprets `android:value="0"` as a java.lang.Integer.
The Meta Wearables DAT SDK expects a String, so it receives null, breaking
the deep link to Meta Stella and causing "Error opening the link" on registration.

Fix by referencing a string resource instead of an inline numeric literal.

Fixes Intent-Lab#13

Co-Authored-By: Claude Opus 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.

Fix: APPLICATION_ID meta-data read as Integer instead of String, breaking DAT registration

1 participant