Skip to content

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

@EnzoDeg40

Description

@EnzoDeg40

Bug Description

When clicking "Connect my glasses" on the home screen, the app opens the Meta Stella app but immediately shows an error dialog:

Image

"Erreur lors de l'ouverture du lien" — "An error occurred while opening the link"

Root Cause

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. This results in null being returned, which breaks the deep link construction for the registration flow.

Logcat evidence:

W/Bundle: Key com.meta.wearable.mwdat.APPLICATION_ID expected String but value was a java.lang.Integer. The default value <null> was returned.
W/MetaWearablesConfig: com.meta.wearable.mwdat.CLIENT_TOKEN not found in manifest metadata

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:

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

This forces Android to treat the value as a String, which the SDK can read correctly.

Environment

  • Device: Xiaomi (Android 12+)
  • Meta Stella app (com.facebook.stella) installed
  • DAT SDK version: 0.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions