Project made in collaboration with August Pratt. We wanted to create a music player app that controls the volume of the device with the speed of the user.
This is an Android Studio Project developed in Kotlin, using a wide range of technologies such as Google Firebase, GPS location or Google Ads.
For this project you will need a Google Ads ID credential which you can create and use here.
Furthermore, you will have to create and use your own Firebase database, importing your google-services.json or linking your project to Firebase in Android Studio. You will find more info here.
This is the general structure of the project.
-
Inside
./app/src/main/java/com/example/music_player/
- MainActivity.kt: Activity for the home page. Links the views from the xml with the functionalities of the app.
- MusicActivity.kt: Activity for the current song page. Links the views from the xml with the functionalities of the app.
- SettingsActivity.kt: Activity for the settings page. Links the views from the xml with the functionalities of the app.
- GPSSpeed.kt: Model for the speed tracking using the GPS from the device.
- PlayerManager.kt: Manager for the ExoPlayer. Useful for using the same media3 player in the whole app.
- Song.kt: Model for each song.
- Songs.kt: Model for a group of songs (ArrayList).
- SongAdapter.kt: Adapter for the recycler view in the home page. Retrieves all the songs and adds the necessary functionality.
-
Inside
./app/src/main/res/
- drawable: folder in which all the images/icons are stored.
- layout: all the xml files necessary for the views of the app.
- transition: all the xml files used for the transitions between layouts.
- values: inside, there are folders for the strings, colors, and themes used in the app.
-
Inside
./app/src/main/
- AndroidManifest.xml: Stores the necessary permissions for the app to run. Also, all the activities are declared in this file.
-
Clone
this repository into your Android Studio projects folder.git clone https://github.com/javierortizmi/MusicPlayerApp.git
-
Open the MusicPlayerApp with Android Studio.
-
Add your own Firebase database (
google-services.json
) and credentials for Google Ads (inAndroidManifest.xml
). -
Run the project in an emulator or an actual Android physical device.