Universal Android Music Player (UAMP) Deployment Guide
Prerequisites
- Android Studio 3.x or higher - Required for development and building the project
- Android SDK - Included with Android Studio, ensure you have the latest SDK tools and platform tools
- Java Development Kit (JDK) 8 or higher - Required for Android development
- Physical Android device or emulator - For testing the application across different form factors
Installation
-
Clone the repository:
git clone https://github.com/android/uamp.git cd uamp -
Open in Android Studio:
- Launch Android Studio
- Select "Open an existing project"
- Navigate to the cloned
uampdirectory and select it
-
Sync Gradle:
- Android Studio will automatically start syncing the Gradle files
- Wait for the sync to complete and any necessary dependencies to download
Configuration
UAMP is a sample application and doesn't require external API keys or complex configuration. However, you may want to:
-
Set up Android Emulator (if needed):
- In Android Studio, go to Tools → AVD Manager
- Create a new virtual device with different form factors (phone, tablet, TV) to test the multi-form factor support
-
Enable USB Debugging (for physical devices):
- On your Android device, go to Settings → About phone
- Tap "Build number" 7 times to enable Developer options
- Go to Settings → Developer options → Enable USB debugging
Build & Run
Running on a Device or Emulator
-
Select a build variant:
- In Android Studio, open the Build Variants tool window
- Select the desired build variant (e.g.,
automotiveDebugfor Android Automotive,mobileDebugfor phones/tablets)
-
Build and run:
# From the command line ./gradlew assembleDebug ./gradlew installDebugOr use the Android Studio interface:
- Click the green "Run" button or press Shift+F10
- Select your target device or emulator
- Wait for the app to build and install
-
Alternative: Run from Android Studio:
- Click the "Run" button (green triangle) in the toolbar
- Select your target device from the device selector
- The app will compile, install, and launch automatically
Testing Different Form Factors
UAMP supports multiple form factors. To test each:
- Mobile/Tablet: Use a phone or tablet emulator/device
- Android TV: Use a TV emulator or physical Android TV device
- Android Auto: Use a compatible head unit or emulator (requires additional setup)
- Android Wear: Use a Wear OS emulator or device
- Google Cast: Use a Cast device or emulator (requires additional setup)
Deployment
Note: UAMP is a sample application and is no longer being maintained (as indicated by the deprecation warning). It is intended for learning and demonstration purposes rather than production deployment.
If you wish to distribute a modified version:
-
Prepare for release:
./gradlew assembleRelease -
Sign the APK:
- Create a signing key using Android Studio or the
keytoolcommand - Configure the signing settings in
gradle.propertiesorlocal.properties
- Create a signing key using Android Studio or the
-
Distribution options:
- Google Play Store: Follow Google's app publishing guidelines
- Direct APK distribution: Share the APK file directly with users
- Enterprise deployment: Use Android Enterprise features for internal distribution
Troubleshooting
Common Issues and Solutions
-
Build failures due to missing dependencies:
- Ensure you have a stable internet connection for Gradle to download dependencies
- Try "File → Invalidate Caches / Restart" in Android Studio
- Clean and rebuild the project (Build → Clean Project, then Build → Rebuild Project)
-
API level compatibility issues:
- Check the
compileSdkVersion,minSdkVersion, andtargetSdkVersioninbuild.gradlefiles - Ensure your SDK manager has the required Android versions installed
- Check the
-
Emulator performance issues:
- Enable hardware acceleration in your emulator settings
- Use Android Studio's "Cold Boot Now" option to improve startup times
- Consider using a physical device for better performance
-
Media playback issues:
- Check device permissions (storage, audio focus)
- Verify that media files are accessible and not corrupted
- Review the logcat output for specific media-related errors
-
Multi-form factor display issues:
- Test on actual devices when possible, as emulators may not perfectly replicate behavior
- Check the layout files in
res/layout*directories for form factor-specific adjustments
Getting Help
- Official Documentation: Visit Android Developer Documentation
- Stack Overflow: Search for issues tagged with
androidandmedia-player - GitHub Issues: While UAMP is deprecated, you can still browse existing issues for solutions
- Android Community: Join Android developer communities and forums for support
Important Notes
- UAMP is deprecated and no longer maintained, so some features may not work with the latest Android versions
- For production applications, consider using the latest Android media APIs and following current best practices
- The sample includes music from the Free Music Archive and sound libraries - ensure you comply with their licensing terms if redistributing
For more detailed information about UAMP's architecture and implementation, refer to the full guide included in the repository.