Android Reference Wallet build instructions
This guide describes how to setup Android EUDI Reference Wallet and how to use it with the FortID Verifier to verify PID or mDL credential in Android EUDI Reference wallet.
Android Reference Wallet build instructions
Prerequisites
-
Android Studio
- Download Android Studio from the official website: https://developer.android.com/studio
- Follow the installation instructions for your operating system
-
Git
- Ensure Git is installed on your system
- You can download Git from: https://git-scm.com/downloads
-
Android Device
- An Android device running Android 8.0 (API level 26) or higher
- USB cable to connect your device to the computer
NOTE: Tested with Android Studio Meerkat | 2024.3.1 Patch 2
Setting Up the Project
-
Clone the Repository
Terminal window git clone git@github.com:eu-digital-identity-wallet/eudi-app-android-wallet-ui.gitcd eudi-app-android-wallet-ui -
Checkout the Specific Version
Terminal window git checkout Wallet/Demo_Version=2025.03.24-Demo_Build=24 -
Open the Project in Android Studio
- Launch Android Studio
- Click on “Open an existing Android Studio project”
- Navigate to the cloned repository folder and select it
- Wait for the project to sync and download dependencies
Configure project
In order for the app to work with FortID verifier we need to update pre-registered OpenId4VP configuration:
- open file in Android Studio
core-logic/src/demo/java/eu/europa/ec/corelogic/config/ConfigWalletCoreImpl.kt
- add updates to file:
- Import in import section
import eu.europa.ec.eudi.wallet.transfer.openId4vp.PreregisteredVerifier- Add constants to companion object
private companion object {const val VCI_ISSUER_URL = "https://issuer.eudiw.dev"const val VCI_CLIENT_ID = "wallet-dev"const val AUTHENTICATION_REQUIRED = falseconst val OPENID4VP_VERIFIER_API_URI = "https://evs.fortid.com:5000/protocol/authorization-response"const val OPENID4VP_VERIFIER_LEGAL_NAME = "FortID Verification Service"const val OPENID4VP_VERIFIER_CLIENT_ID = "FortID-Verification-Service"}- Update OpenId4Vp configuration, withClientIdSchemes part, with constants declared in previous step
withClientIdSchemes(listOf(ClientIdScheme.Preregistered(listOf(PreregisteredVerifier(clientId = OPENID4VP_VERIFIER_CLIENT_ID,verifierApi = OPENID4VP_VERIFIER_API_URI,legalName = OPENID4VP_VERIFIER_LEGAL_NAME)))),)
Connecting Your Android Device
-
Enable Developer Options
- Go to Settings on your Android device
- Scroll down to “About phone”
- Find “Build number” and tap it 7 times
- You’ll see a message that you’re now a developer
-
Enable USB Debugging
- Go back to Settings
- Find “Developer options” (usually at the bottom)
- Enable “USB debugging”
-
Connect Your Device
- Connect your Android device to your computer using a USB cable
- On your device, you might see a prompt asking to allow USB debugging - tap “Allow”
- In Android Studio, you should see your device listed in the “Device Manager”
Building and Running the Application
-
Build and Run the Application
- Make sure your Android device is selected in the device dropdown menu
- Click the “Run” button (green play icon) in the toolbar
- Alternatively, press Shift+F10 (Windows/Linux) or Control+R (Mac)
-
First Run
- The first build might take several minutes as Android Studio downloads dependencies and builds the project
- You’ll see the app being installed and launched on your device
Building Without a Device and Manual APK Installation
Building the APK
-
Generate Release APK
- In Android Studio, click on “Build” in the top menu
- Select “Generate App Bundles or APKs”
- Choose “Generate APKs”
- Wait for the build to complete
- You’ll see a notification when the build is finished
-
Locate the APK
- After successful build, click on “locate” in the notification
- Alternatively, navigate to:
app/build/outputs/apk/demo/debug/app-demo-debug.apk
- The APK file will be named something like
app-demo-debug.apk
Installing the APK on Your Device
-
Transfer the APK
- Connect your Android device to your computer
- Copy the APK file to your device’s storage
- You can use:
- USB file transfer mode
- Cloud storage
- Any file sharing method
-
Install the APK
- On your Android device, navigate to where you saved the APK file
- Tap on the APK file
- If prompted, allow installation from unknown sources:
- Go to Settings > Security
- Enable “Unknown sources” or “Install unknown apps”
- Follow the installation prompts
- The app will be installed and available in your app drawer
-
Alternative Installation Method (ADB)
- Connect your device via USB
- Enable USB debugging (see Connecting Your Android Device section)
- Open a terminal/command prompt
- Navigate to the directory containing the APK
- Run the following command:
Terminal window adb install app-demo-debug.apk - Wait for the installation to complete
Note: The
adb
tool is located in the Android SDK platform-tools directory:- Windows:
%LOCALAPPDATA%\Android\Sdk\platform-tools\adb.exe
- macOS:
~/Library/Android/sdk/platform-tools/adb
- Linux:
~/Android/Sdk/platform-tools/adb
You can also access it through Android Studio:
- Open Android Studio
- Go to Tools > SDK Manager
- Under “SDK Tools” tab, ensure “Android SDK Platform-Tools” is installed
- The path will be shown in the “Android SDK Location” field
Troubleshooting APK Installation
-
Installation Blocked
- Make sure you’ve enabled installation from unknown sources
- Check if your device has any security software blocking the installation
-
ADB Installation Issues
- Ensure USB debugging is enabled
- Check if your device is recognized by running
adb devices
- Try using the full path to the APK file
-
Version Conflicts
- If you have a previous version installed, you might need to uninstall it first
- Use
adb uninstall <package-name>
to remove the old version
Troubleshooting
-
Device Not Recognized
- Ensure USB debugging is enabled
- Try a different USB cable
- Check if your device appears in the list when running
adb devices
in the terminal
-
Build Errors
- Make sure you have the correct version of Android Studio
- Check that you have the required SDK versions installed
- Try “File” > “Invalidate Caches / Restart” if you encounter strange build issues
-
App Crashes
- Check the “Logcat” window in Android Studio for error messages
- Ensure your device meets the minimum Android version requirement
Additional Resources
Remember to keep your Android Studio and SDK tools updated for the best development experience.
Verifying
At this point, the EUDI Reference Wallet stores the PID or mDL VC. You can now proceed with the verification flow by following this guide.