├── app
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── back.png
│ │ │ │ ├── icon.png
│ │ │ │ ├── next.png
│ │ │ │ ├── pause.png
│ │ │ │ ├── stop.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── drawable-hdpi
│ │ │ │ ├── jetlight.png
│ │ │ │ ├── ic_stop_white_24dp.png
│ │ │ │ ├── ic_album_white_48dp.png
│ │ │ │ ├── ic_repeat_white_24dp.png
│ │ │ │ ├── ic_shuffle_black_24dp.png
│ │ │ │ ├── ic_shuffle_white_24dp.png
│ │ │ │ ├── ic_skip_next_white_24dp.png
│ │ │ │ ├── ic_volume_up_white_24dp.png
│ │ │ │ ├── ic_audiotrack_white_24dp.png
│ │ │ │ ├── ic_play_arrow_black_24dp.png
│ │ │ │ ├── ic_queue_music_white_24dp.png
│ │ │ │ ├── ic_repeat_one_white_24dp.png
│ │ │ │ ├── ic_volume_off_white_24dp.png
│ │ │ │ ├── ic_skip_previous_white_24dp.png
│ │ │ │ ├── ic_play_circle_filled_black_24dp.png
│ │ │ │ ├── ic_play_circle_outline_white_24dp.png
│ │ │ │ └── ic_pause_circle_outline_white_24dp.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── drawable-mdpi
│ │ │ │ ├── ic_stop_white_24dp.png
│ │ │ │ ├── ic_album_white_48dp.png
│ │ │ │ ├── ic_repeat_white_24dp.png
│ │ │ │ ├── ic_shuffle_black_24dp.png
│ │ │ │ ├── ic_shuffle_white_24dp.png
│ │ │ │ ├── ic_skip_next_white_24dp.png
│ │ │ │ ├── ic_volume_up_white_24dp.png
│ │ │ │ ├── ic_audiotrack_white_24dp.png
│ │ │ │ ├── ic_play_arrow_black_24dp.png
│ │ │ │ ├── ic_queue_music_white_24dp.png
│ │ │ │ ├── ic_repeat_one_white_24dp.png
│ │ │ │ ├── ic_volume_off_white_24dp.png
│ │ │ │ ├── ic_skip_previous_white_24dp.png
│ │ │ │ ├── ic_play_circle_filled_black_24dp.png
│ │ │ │ ├── ic_play_circle_outline_white_24dp.png
│ │ │ │ └── ic_pause_circle_outline_white_24dp.png
│ │ │ ├── drawable-xhdpi
│ │ │ │ ├── ic_album_white_48dp.png
│ │ │ │ ├── ic_stop_white_24dp.png
│ │ │ │ ├── ic_repeat_white_24dp.png
│ │ │ │ ├── ic_shuffle_black_24dp.png
│ │ │ │ ├── ic_shuffle_white_24dp.png
│ │ │ │ ├── ic_audiotrack_white_24dp.png
│ │ │ │ ├── ic_play_arrow_black_24dp.png
│ │ │ │ ├── ic_repeat_one_white_24dp.png
│ │ │ │ ├── ic_skip_next_white_24dp.png
│ │ │ │ ├── ic_volume_off_white_24dp.png
│ │ │ │ ├── ic_volume_up_white_24dp.png
│ │ │ │ ├── ic_queue_music_white_24dp.png
│ │ │ │ ├── ic_skip_previous_white_24dp.png
│ │ │ │ ├── ic_play_circle_filled_black_24dp.png
│ │ │ │ ├── ic_pause_circle_outline_white_24dp.png
│ │ │ │ └── ic_play_circle_outline_white_24dp.png
│ │ │ ├── drawable-xxhdpi
│ │ │ │ ├── ic_stop_white_24dp.png
│ │ │ │ ├── ic_album_white_48dp.png
│ │ │ │ ├── ic_repeat_white_24dp.png
│ │ │ │ ├── ic_shuffle_black_24dp.png
│ │ │ │ ├── ic_shuffle_white_24dp.png
│ │ │ │ ├── ic_skip_next_white_24dp.png
│ │ │ │ ├── ic_volume_up_white_24dp.png
│ │ │ │ ├── ic_audiotrack_white_24dp.png
│ │ │ │ ├── ic_play_arrow_black_24dp.png
│ │ │ │ ├── ic_queue_music_white_24dp.png
│ │ │ │ ├── ic_repeat_one_white_24dp.png
│ │ │ │ ├── ic_volume_off_white_24dp.png
│ │ │ │ ├── ic_skip_previous_white_24dp.png
│ │ │ │ ├── ic_play_circle_filled_black_24dp.png
│ │ │ │ ├── ic_play_circle_outline_white_24dp.png
│ │ │ │ └── ic_pause_circle_outline_white_24dp.png
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ ├── drawable-xxxhdpi
│ │ │ │ ├── ic_album_white_48dp.png
│ │ │ │ ├── ic_repeat_white_24dp.png
│ │ │ │ ├── ic_stop_white_24dp.png
│ │ │ │ ├── ic_shuffle_black_24dp.png
│ │ │ │ ├── ic_shuffle_white_24dp.png
│ │ │ │ ├── ic_audiotrack_white_24dp.png
│ │ │ │ ├── ic_play_arrow_black_24dp.png
│ │ │ │ ├── ic_queue_music_white_24dp.png
│ │ │ │ ├── ic_repeat_one_white_24dp.png
│ │ │ │ ├── ic_skip_next_white_24dp.png
│ │ │ │ ├── ic_volume_off_white_24dp.png
│ │ │ │ ├── ic_volume_up_white_24dp.png
│ │ │ │ ├── ic_skip_previous_white_24dp.png
│ │ │ │ ├── ic_play_circle_filled_black_24dp.png
│ │ │ │ ├── ic_pause_circle_outline_white_24dp.png
│ │ │ │ └── ic_play_circle_outline_white_24dp.png
│ │ │ ├── drawable
│ │ │ │ └── custompanel.xml
│ │ │ ├── drawable-v21
│ │ │ │ ├── rectangleripple.xml
│ │ │ │ └── circleripple.xml
│ │ │ └── layout
│ │ │ │ ├── customadapter.xml
│ │ │ │ ├── activity_player.xml
│ │ │ │ └── activity_song.xml
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── jetlightstudio
│ │ │ └── jettunes
│ │ │ ├── Song.java
│ │ │ ├── SongActivity.java
│ │ │ └── MainActivity.java
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── jetlightstudio
│ │ │ └── jettunes
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── jetlightstudio
│ │ └── jettunes
│ │ └── ExampleInstrumentedTest.java
├── proguard-rules.pro
└── build.gradle
├── settings.gradle
├── JetTunes
├── MusicList.png
└── MusicPlayer.png
├── .idea
├── copyright
│ └── profiles_settings.xml
├── vcs.xml
├── modules.xml
├── runConfigurations.xml
├── gradle.xml
├── compiler.xml
└── misc.xml
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── gradle.properties
├── README.md
├── LICENSE
├── gradlew.bat
└── gradlew
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/JetTunes/MusicList.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/JetTunes/MusicList.png
--------------------------------------------------------------------------------
/JetTunes/MusicPlayer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/JetTunes/MusicPlayer.png
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/mipmap-hdpi/back.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/mipmap-hdpi/icon.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/mipmap-hdpi/next.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/mipmap-hdpi/pause.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/mipmap-hdpi/stop.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/jetlight.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-hdpi/jetlight.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_stop_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-hdpi/ic_stop_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_stop_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-mdpi/ic_stop_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_album_white_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-hdpi/ic_album_white_48dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_repeat_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-hdpi/ic_repeat_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_album_white_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-mdpi/ic_album_white_48dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_repeat_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-mdpi/ic_repeat_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_album_white_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xhdpi/ic_album_white_48dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_stop_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xhdpi/ic_stop_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_stop_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxhdpi/ic_stop_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | JetTunes
3 | Settings
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_shuffle_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-hdpi/ic_shuffle_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_shuffle_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-hdpi/ic_shuffle_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_skip_next_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-hdpi/ic_skip_next_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_volume_up_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-hdpi/ic_volume_up_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_shuffle_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-mdpi/ic_shuffle_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_shuffle_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-mdpi/ic_shuffle_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_skip_next_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-mdpi/ic_skip_next_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_volume_up_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-mdpi/ic_volume_up_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_repeat_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xhdpi/ic_repeat_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_shuffle_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xhdpi/ic_shuffle_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_shuffle_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xhdpi/ic_shuffle_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_album_white_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxhdpi/ic_album_white_48dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_repeat_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxhdpi/ic_repeat_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_shuffle_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxhdpi/ic_shuffle_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_shuffle_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxhdpi/ic_shuffle_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_album_white_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_album_white_48dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_repeat_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_repeat_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_stop_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_stop_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_audiotrack_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-hdpi/ic_audiotrack_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_play_arrow_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-hdpi/ic_play_arrow_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_queue_music_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-hdpi/ic_queue_music_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_repeat_one_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-hdpi/ic_repeat_one_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_volume_off_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-hdpi/ic_volume_off_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_audiotrack_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-mdpi/ic_audiotrack_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_play_arrow_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-mdpi/ic_play_arrow_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_queue_music_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-mdpi/ic_queue_music_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_repeat_one_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-mdpi/ic_repeat_one_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_volume_off_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-mdpi/ic_volume_off_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_audiotrack_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xhdpi/ic_audiotrack_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_play_arrow_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xhdpi/ic_play_arrow_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_repeat_one_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xhdpi/ic_repeat_one_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_skip_next_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xhdpi/ic_skip_next_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_volume_off_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xhdpi/ic_volume_off_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_volume_up_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xhdpi/ic_volume_up_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_skip_next_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxhdpi/ic_skip_next_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_volume_up_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxhdpi/ic_volume_up_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_shuffle_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_shuffle_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_shuffle_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_shuffle_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_skip_previous_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-hdpi/ic_skip_previous_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_skip_previous_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-mdpi/ic_skip_previous_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_queue_music_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xhdpi/ic_queue_music_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_skip_previous_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xhdpi/ic_skip_previous_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_audiotrack_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxhdpi/ic_audiotrack_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_play_arrow_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxhdpi/ic_play_arrow_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_queue_music_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxhdpi/ic_queue_music_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_repeat_one_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxhdpi/ic_repeat_one_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_volume_off_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxhdpi/ic_volume_off_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_audiotrack_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_audiotrack_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_play_arrow_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_play_arrow_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_queue_music_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_queue_music_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_repeat_one_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_repeat_one_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_skip_next_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_skip_next_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_volume_off_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_volume_off_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_volume_up_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_volume_up_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_skip_previous_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxhdpi/ic_skip_previous_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_skip_previous_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_skip_previous_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_play_circle_filled_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-hdpi/ic_play_circle_filled_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_play_circle_outline_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-hdpi/ic_play_circle_outline_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_play_circle_filled_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-mdpi/ic_play_circle_filled_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_play_circle_outline_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-mdpi/ic_play_circle_outline_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_play_circle_filled_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xhdpi/ic_play_circle_filled_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_pause_circle_outline_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-hdpi/ic_pause_circle_outline_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_pause_circle_outline_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-mdpi/ic_pause_circle_outline_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_pause_circle_outline_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xhdpi/ic_pause_circle_outline_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_play_circle_outline_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xhdpi/ic_play_circle_outline_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_play_circle_filled_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxhdpi/ic_play_circle_filled_black_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_play_circle_outline_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxhdpi/ic_play_circle_outline_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_play_circle_filled_black_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_play_circle_filled_black_24dp.png
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_pause_circle_outline_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxhdpi/ic_pause_circle_outline_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_pause_circle_outline_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_pause_circle_outline_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_play_circle_outline_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oussamabonnor1/JetTunes_android/HEAD/app/src/main/res/drawable-xxxhdpi/ic_play_circle_outline_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #222222
4 | #202021
5 | #FFFFFF
6 |
7 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Nov 21 21:09:08 WAT 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/custompanel.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/rectangleripple.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | -
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/circleripple.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 | -
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/test/java/com/jetlightstudio/jettunes/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.jetlightstudio.jettunes;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/jetlightstudio/jettunes/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.jetlightstudio.jettunes;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.jetlightstudio.jettunes", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # JetTunes_android
2 |
3 | 
4 | 
5 |
6 | ## Description:
7 | JetTunes is an android mp3 player. This app is currently under build and it represents my learning journey in android development and materiel design
8 |
9 | ## Tools & languages:
10 | * Android Studio (IDE).
11 | * Java (Logic code).
12 | * XML (Design).
13 | * Paint.Net (Image editting).
14 |
15 | ## Screenshots:
16 | 
17 | 
18 |
19 | ## Contribution:
20 | Feel free to `fork` this project and add whatever you like. If you have any suggestions or any comments please feel free to contact me or to open an issue, use free license art assets please.
21 |
22 | ## Team:
23 | [Jetlighters](https://github.com/JetLightStudio) having fun.
24 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in C:\Users\oussama\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 26
5 | buildToolsVersion "26.0.2"
6 | defaultConfig {
7 | applicationId "com.jetlightstudio.jettunes"
8 | minSdkVersion 17
9 | targetSdkVersion 26
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
25 | exclude group: 'com.android.support', module: 'support-annotations'
26 | })
27 | compile 'com.android.support:appcompat-v7:26.+'
28 | compile 'com.android.support:design:26.+'
29 | compile 'com.android.support.constraint:constraint-layout:1.0.2'
30 | testCompile 'junit:junit:4.12'
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
15 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Oussama Bonnor
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/jetlightstudio/jettunes/Song.java:
--------------------------------------------------------------------------------
1 | package com.jetlightstudio.jettunes;
2 |
3 | import android.content.ContentUris;
4 | import android.net.Uri;
5 |
6 | /**
7 | * Created by oussama on 24/11/2017.
8 | */
9 |
10 | public class Song {
11 | private long mSongID;
12 | private String mSongTitle;
13 | private String mSongAlbum;
14 | private String duration;
15 | private int idAlbum;
16 |
17 | public Song(long mSongID, String mSongTitle, String mSongAlbum, String duration, int idAlbum) {
18 |
19 | this.mSongID = mSongID;
20 | this.mSongTitle = mSongTitle;
21 | this.mSongAlbum = mSongAlbum;
22 | this.duration = duration;
23 | this.idAlbum = idAlbum;
24 | }
25 |
26 | public String getDuration() {
27 | return duration;
28 | }
29 |
30 | public long getmSongID() {
31 | return mSongID;
32 | }
33 |
34 | public String getmSongAlbum() {
35 | return mSongAlbum;
36 | }
37 |
38 | public int getIdAlbum() {
39 | return idAlbum;
40 | }
41 |
42 | public String getSongTitle() {
43 | return mSongTitle;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/customadapter.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
16 |
17 |
25 |
26 |
32 |
33 |
39 |
40 |
52 |
53 |
64 |
65 |
66 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_player.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
20 |
21 |
31 |
32 |
42 |
43 |
44 |
49 |
50 |
60 |
61 |
70 |
71 |
80 |
81 |
86 |
87 |
94 |
95 |
102 |
103 |
110 |
111 |
112 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/app/src/main/java/com/jetlightstudio/jettunes/SongActivity.java:
--------------------------------------------------------------------------------
1 | package com.jetlightstudio.jettunes;
2 |
3 | import android.content.ContentUris;
4 | import android.content.Intent;
5 | import android.media.MediaPlayer;
6 | import android.net.Uri;
7 | import android.os.Handler;
8 | import android.support.v7.app.AppCompatActivity;
9 | import android.os.Bundle;
10 | import android.view.View;
11 | import android.widget.Button;
12 | import android.widget.SeekBar;
13 | import android.widget.TextView;
14 | import android.widget.Toast;
15 |
16 | import java.util.HashMap;
17 | import java.util.Random;
18 |
19 | public class SongActivity extends AppCompatActivity {
20 | TextView songTitle;
21 | TextView currentTime;
22 | TextView songDuartion;
23 | TextView songIndex;
24 | Button muteButton;
25 | Button playButton;
26 | Button shuffleButton;
27 | Button repeatButton;
28 |
29 | SeekBar seekBar;
30 | final Handler handler = new Handler();
31 | Runnable runnable;
32 |
33 | Uri currentURI;
34 | int currentIndex = 0;
35 | boolean shuffle = true;
36 | boolean repeatAll = true;
37 | boolean mute = false;
38 |
39 | @Override
40 | protected void onCreate(Bundle savedInstanceState) {
41 | super.onCreate(savedInstanceState);
42 | setContentView(R.layout.activity_song);
43 | songTitle = (TextView) findViewById(R.id.songTitle);
44 | songIndex = (TextView) findViewById(R.id.songIndex);
45 | muteButton = (Button) findViewById(R.id.mute);
46 | seekBar = (SeekBar) findViewById(R.id.seekBar);
47 | currentTime = (TextView) findViewById(R.id.currentTime);
48 | songDuartion = (TextView) findViewById(R.id.duration);
49 | repeatButton = (Button) findViewById(R.id.repeat);
50 | shuffleButton = (Button) findViewById(R.id.shuffle);
51 | playButton = (Button) findViewById(R.id.play);
52 |
53 | loadData();
54 | settingUpSeekBar();
55 | }
56 |
57 | public void setCurrentURI(int index) {
58 | int i = MainActivity.songsMap.size() - 1 - index;
59 | String Title = MainActivity.songsMap.get(i).getSongTitle();
60 | currentURI = ContentUris.withAppendedId(
61 | android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
62 | MainActivity.songsMap.get(i).getmSongID());
63 | currentIndex = index;
64 | songIndex.setText((currentIndex + 1) + "/" + MainActivity.songsMap.size());
65 | songTitle.setText(Title);
66 | long total = Long.valueOf(MainActivity.songsMap.get(MainActivity.songsMap.size() - 1 - currentIndex).getDuration());
67 | int min = (int) total / 60000;
68 | int sec = (int) total / 1000 % 60;
69 | songDuartion.setText(String.format("%02d:%02d", min, sec));
70 | songIndex.setText((currentIndex + 1) + "/" + MainActivity.songsMap.size());
71 | }
72 |
73 | public void startMusic(final View v) {
74 | MainActivity.mp.stop();
75 | MainActivity.mp = MediaPlayer.create(this, currentURI);
76 | playButton.setBackgroundResource(R.drawable.ic_pause_circle_outline_white_24dp);
77 | if (MainActivity.mp != null) {
78 | MainActivity.mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
79 | @Override
80 | public void onCompletion(MediaPlayer mediaPlayer) {
81 | if (repeatAll) {
82 | if (currentIndex >= MainActivity.songsMap.size() - 1) {
83 | currentIndex = 0;
84 | startMusic(v);
85 | } else {
86 | nextSong(v);
87 | }
88 | } else {
89 | startMusic(v);
90 | }
91 | }
92 | });
93 | MainActivity.mp.start();
94 | }
95 | }
96 |
97 | public void nextSong(View view) {
98 | setCurrentURI(!shuffle ? currentIndex + 1 : new Random().nextInt(MainActivity.songsMap.size()));
99 | startMusic(view);
100 | }
101 |
102 | public void prevSong(View view) {
103 | setCurrentURI(!shuffle ? currentIndex - 1 : new Random().nextInt(MainActivity.songsMap.size()));
104 | startMusic(view);
105 | }
106 |
107 | public void shuffleSong(View view) {
108 | shuffle = !shuffle;
109 | Toast.makeText(this, shuffle ? "Shuffle On" : "Shuffle Off", Toast.LENGTH_SHORT).show();
110 | shuffleButton.setBackgroundResource(shuffle ? R.drawable.ic_shuffle_white_24dp : R.drawable.ic_shuffle_black_24dp);
111 | }
112 |
113 | public void repeatSong(View view) {
114 | repeatAll = !repeatAll;
115 | repeatButton.setBackgroundResource(repeatAll ? R.drawable.ic_repeat_white_24dp : R.drawable.ic_repeat_one_white_24dp);
116 | }
117 |
118 | public void playMusic(View view) {
119 | if (MainActivity.mp != null) {
120 | if (MainActivity.mp.isPlaying()) {
121 | MainActivity.mp.pause();
122 | handler.removeCallbacks(runnable);
123 | playButton.setBackgroundResource(R.drawable.ic_play_circle_outline_white_24dp);
124 | } else {
125 | MainActivity.mp.start();
126 | handler.postDelayed(runnable, 0);
127 | playButton.setBackgroundResource(R.drawable.ic_pause_circle_outline_white_24dp);
128 | }
129 | }
130 | }
131 |
132 | public void loadData() {
133 | currentIndex = getIntent().getExtras().getInt("currentIndex");
134 | shuffle = getIntent().getExtras().getBoolean("shuffle");
135 | repeatAll = getIntent().getExtras().getBoolean("repeatAll");
136 | songTitle.setText(MainActivity.songsMap.get(MainActivity.songsMap.size() - 1 - currentIndex).getSongTitle());
137 | long total = Long.valueOf(MainActivity.songsMap.get(MainActivity.songsMap.size() - 1 - currentIndex).getDuration());
138 | int min = (int) total / 60000;
139 | int sec = (int) total / 1000 % 60;
140 | songDuartion.setText(String.format("%02d:%02d", min, sec));
141 | seekBar.setMax(MainActivity.mp.getDuration());
142 | songIndex.setText((currentIndex + 1) + "/" + MainActivity.songsMap.size());
143 | }
144 |
145 | public void goToList(View view) {
146 | onBackPressed();
147 | }
148 |
149 | public void muteSong(View view) {
150 | mute = !mute;
151 | muteButton.setBackgroundResource(mute ? R.drawable.ic_volume_off_white_24dp : R.drawable.ic_volume_up_white_24dp);
152 | MainActivity.mp.setVolume(mute ? 0 : 1, mute ? 0 : 1);
153 | }
154 |
155 | public void settingUpSeekBar() {
156 | runnable = new Runnable() {
157 | @Override
158 | public void run() {
159 | seekBar.setProgress(MainActivity.mp.getCurrentPosition());
160 | int total = MainActivity.mp.getCurrentPosition();
161 | int min = total / 60000;
162 | int sec = total / 1000 % 60;
163 | currentTime.setText(String.format("%02d:%02d", min, sec));
164 | handler.postDelayed(this, 50);
165 | }
166 | };
167 |
168 | seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
169 | @Override
170 | public void onProgressChanged(SeekBar seekBar, int i, boolean b) {
171 | if (b) {
172 | MainActivity.mp.seekTo(i);
173 | }
174 | }
175 |
176 | @Override
177 | public void onStartTrackingTouch(SeekBar seekBar) {
178 |
179 | }
180 |
181 | @Override
182 | public void onStopTrackingTouch(SeekBar seekBar) {
183 |
184 | }
185 | });
186 |
187 | handler.postDelayed(runnable, 0);
188 | }
189 | }
190 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_song.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
18 |
19 |
25 |
26 |
33 |
34 |
41 |
42 |
52 |
53 |
60 |
61 |
62 |
63 |
64 |
65 |
74 |
75 |
81 |
82 |
89 |
90 |
96 |
97 |
108 |
109 |
113 |
114 |
125 |
126 |
127 |
128 |
129 |
143 |
144 |
154 |
155 |
164 |
165 |
171 |
172 |
179 |
180 |
187 |
188 |
195 |
196 |
197 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
--------------------------------------------------------------------------------
/app/src/main/java/com/jetlightstudio/jettunes/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.jetlightstudio.jettunes;
2 |
3 | import android.content.ContentResolver;
4 | import android.content.ContentUris;
5 | import android.content.Intent;
6 | import android.database.Cursor;
7 | import android.graphics.Color;
8 | import android.graphics.Typeface;
9 | import android.media.MediaPlayer;
10 | import android.net.Uri;
11 | import android.os.Bundle;
12 | import android.provider.MediaStore;
13 | import android.view.View;
14 | import android.support.v7.app.AppCompatActivity;
15 | import android.view.ViewGroup;
16 | import android.widget.AdapterView;
17 | import android.widget.ArrayAdapter;
18 | import android.widget.BaseAdapter;
19 | import android.widget.Button;
20 | import android.widget.ImageView;
21 | import android.widget.LinearLayout;
22 | import android.widget.ListView;
23 | import android.widget.TextView;
24 | import android.widget.Toast;
25 |
26 | import java.util.ArrayList;
27 | import java.util.HashMap;
28 | import java.util.Random;
29 |
30 | public class MainActivity extends AppCompatActivity {
31 |
32 | //TextView text;
33 | Button playButton;
34 | Button shuffleButton;
35 | Button repeatButton;
36 | static MediaPlayer mp;
37 | ArrayList songs;
38 | static HashMap songsMap;
39 | CustumAdapter c;
40 | ListView listView;
41 | Uri currentURI;
42 | int currentIndex = 0;
43 | boolean shuffle = true;
44 | boolean repeatAll = true;
45 |
46 | @Override
47 | protected void onCreate(Bundle savedInstanceState) {
48 | super.onCreate(savedInstanceState);
49 | setContentView(R.layout.activity_player);
50 | songsMap = new HashMap<>();
51 | mp = new MediaPlayer();
52 | listView = (ListView) findViewById(R.id.listView);
53 | listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
54 | @Override
55 | public void onItemClick(AdapterView> adapterView, View view, int i, long l) {
56 | int scroll = listView.getFirstVisiblePosition();
57 | setCurrentURI(i);
58 | startMusic(view);
59 |
60 | //weird code about getting back to position when we switch
61 | View v = listView.getChildAt(0);
62 | int top = (v == null) ? 0 : (v.getTop());
63 | listView.setSelectionFromTop(scroll, top);
64 | }
65 | });
66 | playButton = (Button) findViewById(R.id.play);
67 | shuffleButton = (Button) findViewById(R.id.shuffle);
68 | repeatButton = (Button) findViewById(R.id.repeat);
69 | songs = new ArrayList<>();
70 | fillMusic();
71 | }
72 |
73 | public void setCurrentURI(int index) {
74 | int i = songsMap.size() - 1 - index;
75 | String songTitle = songsMap.get(i).getSongTitle();
76 | currentURI = ContentUris.withAppendedId(
77 | android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
78 | songsMap.get(i).getmSongID());
79 | currentIndex = index;
80 | //text.setText(songTitle);
81 | }
82 |
83 | public void startMusic(final View v) {
84 | mp.stop();
85 | mp = MediaPlayer.create(this, currentURI);
86 | playButton.setBackgroundResource(R.drawable.ic_pause_circle_outline_white_24dp);
87 | if (mp != null) {
88 | mp.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
89 | @Override
90 | public void onCompletion(MediaPlayer mediaPlayer) {
91 | if (repeatAll) {
92 | if (currentIndex >= songs.size() - 1) {
93 | currentIndex = 0;
94 | startMusic(v);
95 | } else {
96 | nextSong(v);
97 | }
98 | } else {
99 | startMusic(v);
100 | }
101 | }
102 | });
103 | mp.start();
104 | //Refreshing the list view to make sure only current song is highlighted
105 | listView.setAdapter(c);
106 | }
107 | }
108 |
109 | public void nextSong(View view) {
110 | setCurrentURI(!shuffle ? currentIndex + 1 : new Random().nextInt(songs.size()));
111 | startMusic(view);
112 | }
113 |
114 | public void prevSong(View view) {
115 | setCurrentURI(!shuffle ? currentIndex - 1 : new Random().nextInt(songs.size()));
116 | startMusic(view);
117 | }
118 |
119 | public void shuffleSong(View view) {
120 | shuffle = !shuffle;
121 | Toast.makeText(this, shuffle ? "Shuffle On" : "Shuffle Off", Toast.LENGTH_SHORT).show();
122 | shuffleButton.setBackgroundResource(shuffle ? R.drawable.ic_shuffle_white_24dp : R.drawable.ic_shuffle_black_24dp);
123 | }
124 |
125 | public void repeatSong(View view) {
126 | repeatAll = !repeatAll;
127 | repeatButton.setBackgroundResource(repeatAll ? R.drawable.ic_repeat_white_24dp : R.drawable.ic_repeat_one_white_24dp);
128 | }
129 |
130 | public void goToSong(View view) {
131 | Intent i = new Intent(MainActivity.this, SongActivity.class);
132 | i.putExtra("currentIndex", currentIndex);
133 | System.out.println(currentIndex);
134 | i.putExtra("shuffle", shuffle);
135 | i.putExtra("repeatAll", repeatAll);
136 | //i.putExtra("songsMap", songsMap);
137 | startActivity(i);
138 | }
139 |
140 | public void playMusic(View view) {
141 | if (mp != null) {
142 | if (mp.isPlaying()) {
143 | mp.pause();
144 | playButton.setBackgroundResource(R.drawable.ic_play_circle_outline_white_24dp);
145 | } else {
146 | mp.start();
147 | playButton.setBackgroundResource(R.drawable.ic_pause_circle_outline_white_24dp);
148 | }
149 | }
150 | }
151 |
152 | public void fillMusic() {
153 | ArrayList titles = new ArrayList<>();
154 | //SONG CURSOR INITIALISED
155 | ContentResolver contentResolver = getContentResolver();
156 | Uri songUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
157 | Cursor songCursor = contentResolver.query(songUri, null, null, null, null);
158 | //Album cursor initialised
159 | ContentResolver cr = getContentResolver();
160 | Uri albumUri = MediaStore.Audio.Albums.EXTERNAL_CONTENT_URI;
161 | Cursor albumCursor = cr.query(albumUri, null, null, null, null);
162 |
163 | if (songCursor != null && songCursor.moveToFirst() && albumCursor != null && albumCursor.moveToFirst()) {
164 | int songId = songCursor.getColumnIndex(MediaStore.Audio.Media._ID);
165 | int songTitle = songCursor.getColumnIndex(MediaStore.Audio.Media.TITLE);
166 | int songArtist = songCursor.getColumnIndex(MediaStore.Audio.Media.ARTIST);
167 | int songDuration = songCursor.getColumnIndex(MediaStore.Audio.Media.DURATION);
168 | int songAlbum = albumCursor.getColumnIndex(MediaStore.Audio.Albums.ALBUM_ART);
169 |
170 | do {
171 | int currentId = songCursor.getInt(songId);
172 | String currentTitle = songCursor.getString(songTitle);
173 | String currentArtist = songCursor.getString(songArtist);
174 | String currentDuration = songCursor.getString(songDuration);
175 | int currentAlbum = albumCursor.getInt(songAlbum);
176 |
177 | songs.add(new Song(currentId, currentTitle, currentArtist, currentDuration, currentAlbum));
178 | songsMap.put(songs.size() - 1, songs.get(songs.size() - 1));
179 | } while (songCursor.moveToNext());
180 | for (int i = 0; i < songs.size(); i++) {
181 | titles.add(songs.get(i).getSongTitle());
182 | }
183 | }
184 | albumCursor.close();
185 | songCursor.close();
186 | c = new CustumAdapter(songsMap);
187 | ArrayAdapter a = new ArrayAdapter(this, android.R.layout.simple_list_item_1, titles);
188 | listView.setAdapter(c);
189 | }
190 |
191 | @Override
192 | public void grantUriPermission(String toPackage, Uri uri, int modeFlags) {
193 | super.grantUriPermission(toPackage, uri, modeFlags);
194 | }
195 |
196 |
197 | public class CustumAdapter extends BaseAdapter {
198 |
199 | HashMap songsMap;
200 |
201 | public CustumAdapter(HashMap songsMap) {
202 | this.songsMap = songsMap;
203 | }
204 |
205 | @Override
206 | public int getCount() {
207 | return songsMap.size();
208 | }
209 |
210 | @Override
211 | public Object getItem(int i) {
212 | return null;
213 | }
214 |
215 | @Override
216 | public long getItemId(int i) {
217 | return i;
218 | }
219 |
220 | @Override
221 | public View getView(int i, View view, ViewGroup viewGroup) {
222 | System.out.println("called");
223 | int index = songsMap.size() - 1 - i;
224 | view = getLayoutInflater().inflate(R.layout.customadapter, null);
225 | ImageView imageView = view.findViewById(R.id.album);
226 | TextView title = view.findViewById(R.id.title);
227 | TextView albumTitle = view.findViewById(R.id.albumTitle);
228 | TextView duration = view.findViewById(R.id.duration);
229 |
230 | title.setText(songsMap.get(index).getSongTitle());
231 | albumTitle.setText(songsMap.get(index).getmSongAlbum());
232 |
233 | if (i == currentIndex) {
234 | imageView.setImageResource(R.drawable.ic_play_circle_filled_black_24dp);
235 | title.setTypeface(Typeface.DEFAULT_BOLD);
236 | title.setTextColor(Color.parseColor("#212121"));
237 | albumTitle.setTypeface(Typeface.DEFAULT_BOLD);
238 | albumTitle.setTextColor(Color.parseColor("#212121"));
239 | duration.setTypeface(Typeface.DEFAULT_BOLD);
240 | duration.setTextColor(Color.parseColor("#212121"));
241 | LinearLayout background = view.findViewById(R.id.background);
242 | background.setBackgroundColor(Color.parseColor("#F4F4F4"));
243 | title.setSelected(true);
244 | }
245 |
246 | long total = Long.valueOf(songsMap.get(index).getDuration());
247 | int min = (int) total / 60000;
248 | int sec = (int) total / 1000 % 60;
249 | duration.setText(String.format("%02d:%02d", min, sec));
250 | return view;
251 | }
252 | }
253 | }
254 |
--------------------------------------------------------------------------------