Skip to content

Include Android app name in handshake metadata#387

Open
samsamtrum wants to merge 1 commit into
MobileWalletProtocol:mainfrom
samsamtrum:fix-android-handshake-app-name
Open

Include Android app name in handshake metadata#387
samsamtrum wants to merge 1 commit into
MobileWalletProtocol:mainfrom
samsamtrum:fix-android-handshake-app-name

Conversation

@samsamtrum

Copy link
Copy Markdown

Summary

Adds the Android app label to the handshake payload so wallets can display a recognizable dapp name instead of relying only on the package id.

Problem

RequestContent.Handshake already supports optional appName, but the Android native SDK never populated it. As a result, wallet confirmation/connection surfaces can receive only the package identifier (appId), which is less readable for end users and can be inconsistent with the iOS/JS-facing expectation that apps may provide display metadata.

Changes

  • Resolve the host app label from Context.applicationInfo / PackageManager.
  • Pass that label as appName when building the Android handshake message.
  • Keep backward compatibility by exposing appName as an optional parameter with the app label as the default, so callers can still override or omit it.

Verification

  • git diff --check passes.
  • Attempted Android compile/test with:
    • JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 ./gradlew :walletsdk:compileDebugKotlin :walletsdk:testDebugUnitTest --stacktrace
  • The local environment is missing Android SDK / ANDROID_HOME, so Gradle cannot resolve the Android SDK location before compiling. No project test failures were reached.

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