Skip to content

Latest commit

 

History

History
101 lines (71 loc) · 2.5 KB

File metadata and controls

101 lines (71 loc) · 2.5 KB

Mobile

Android-only Expo client for Enmarch. The mobile app uses Mobile Wallet Adapter (MWA) for wallet auth, derives the messaging identity on-device, and talks to the same backend relay as the web client.

Prerequisites

  • Bun
  • Android Studio / Android SDK for local builds
  • A compatible Solana wallet on the device
  • A reachable backend URL

Environment

Create mobile/.env with the values the device should use at build time:

EXPO_PUBLIC_API_BASE_URL=http://192.168.1.23:3001
EXPO_PUBLIC_SOLANA_RPC_URL=https://api.devnet.solana.com
EXPO_PUBLIC_MWA_CHAIN=solana:devnet
EXPO_PUBLIC_APP_NAME=Enmarch
EXPO_PUBLIC_APP_URI=https://enmarch.app
EXPO_PUBLIC_APP_ICON_URI=/icon.png
EXPO_PUBLIC_EXPO_PROJECT_ID=

Notes:

  • EXPO_PUBLIC_API_BASE_URL is baked into native builds. Rebuild the APK after changing it.
  • 10.0.2.2 only works on the Android emulator. For a physical device, use your machine's LAN IP or an HTTPS tunnel.
  • The backend must expose both HTTP and WebSocket traffic on the same host.

Run In Expo

From the repo root:

bun run mobile:start

For a dev-client session:

bun run mobile:start:dev-client

Build For Android

Debug APK:

cd enmarch
rm -rf mobile/android/app/build mobile/android/app/.cxx mobile/android/.cxx
cd mobile/android
./gradlew assembleDebug

APK path:

  • enmarch/mobile/android/app/build/outputs/apk/debug/app-debug.apk

Release APK:

cd enmarch
rm -rf mobile/android/app/build mobile/android/app/.cxx mobile/android/.cxx
cd mobile/android
./gradlew assembleRelease

APK path:

  • enmarch/mobile/android/app/build/outputs/apk/release/app-release.apk

Emulator

  • Set EXPO_PUBLIC_API_BASE_URL=http://10.0.2.2:3001 if the backend is running on the same machine.
  • Install an MWA-compatible wallet on the emulator before testing auth flows.

Physical Device / Seeker

  • Put the phone and dev machine on the same network, or expose the backend through HTTPS.
  • Set EXPO_PUBLIC_API_BASE_URL to the machine's LAN IP or tunnel URL.
  • Ensure the wallet supports MWA.
  • If using a Seeker or Android 11+ device, wallet discovery depends on the solana-wallet package visibility query in the Android manifest.

Invite Links

The app accepts invite deep links in both forms:

  • enmarch://invite/<url-encoded invite code>
  • https://enmarch.app/invite/<url-encoded invite code>

Shared invites include the deep link and the raw invite code so a recipient can still paste the code manually if Android does not hand off the link.