Skip to content

zerodevapp/omni-sdk-android-example

Repository files navigation

Gas Sponsorship Demo — ZeroDev + Privy (Android)

A Jetpack Compose Android app demonstrating gasless smart account transactions using ZeroDev Omni SDK for ERC-4337 account abstraction and Privy for authentication + embedded wallet signing.

What it does

  1. Login — User authenticates via email OTP (Privy)
  2. Embedded wallet — Privy creates a secure embedded Ethereum wallet
  3. Smart account — ZeroDev creates a Kernel v3.3 smart account with the Privy wallet as owner
  4. Gas sponsorship — ZeroDev's paymaster sponsors all gas fees (user pays nothing)
  5. Send transaction — Gasless UserOp from the smart account, confirmed on Sepolia

Setup

  1. Set your credentials in gradle.properties:

    ZERODEV_PROJECT_ID=your-project-id
    PRIVY_APP_ID=your-privy-app-id
    PRIVY_CLIENT_ID=client-your-privy-client-id
  2. Build and run:

    ./gradlew assembleDebug
    adb install app/build/outputs/apk/debug/app-debug.apk

    Or open in Android Studio and hit Run.

File structure

app/src/main/java/com/zerodev/demo/
├── DemoApplication.kt    # Application class, Privy SDK init
├── MainActivity.kt       # Entry point, Compose setup
├── PrivySigner.kt        # SignerImpl: Privy wallet → ZeroDev signer
├── WalletViewModel.kt    # Auth → wallet → smart account state machine
└── WalletApp.kt          # Compose UI (login, OTP, dashboard)

Dependencies

From Maven Central and Google:

Tested on

  • Android 15 (API 35) — Pixel 8 emulator
  • Android 16 (API 37) — Pixel 8 emulator (16KB page aligned)

About

Gasless smart account Android app: ZeroDev Omni SDK + Privy (Kotlin/Compose)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages