├── .gitignore
├── HISTORY
├── LICENSE
├── MODULE_LICENSE_APACHE2
├── NOTICE
├── README
├── build.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── graphics
└── icon.xcf
├── lint.xml
├── proguard.pro
└── src
├── main
├── AndroidManifest.xml
├── java
│ └── nu
│ │ └── staldal
│ │ ├── djdplayer
│ │ ├── AboutActivity.java
│ │ ├── ExportPlaylistTask.java
│ │ ├── FragmentServiceConnection.java
│ │ ├── IdAndName.java
│ │ ├── ImportPlaylistTask.java
│ │ ├── MediaPlayback.java
│ │ ├── MediaPlaybackService.java
│ │ ├── MusicAlphabetIndexer.java
│ │ ├── MusicUtils.java
│ │ ├── MyMediaPlayer.java
│ │ ├── PickMusicFolderActivity.java
│ │ ├── PlayQueueCursor.java
│ │ ├── SettingsActivity.java
│ │ ├── SettingsFragment.java
│ │ ├── ShufflePlaylistTask.java
│ │ └── provider
│ │ │ ├── CursorWithCountColumn.java
│ │ │ ├── ID3Utils.java
│ │ │ ├── MusicContract.java
│ │ │ └── MusicProvider.java
│ │ └── ui
│ │ ├── RepeatingImageButton.java
│ │ ├── TouchInterceptor.java
│ │ └── WithSectionMenu.java
└── res
│ ├── drawable-hdpi
│ ├── albumart_mp_unknown_list.png
│ ├── app_icon.png
│ ├── ic_context_menu.png
│ ├── ic_launcher_shortcut_music_playlist.png
│ ├── ic_menu_add.png
│ ├── ic_menu_clear_playlist.png
│ ├── ic_menu_delete.png
│ ├── ic_menu_eq.png
│ ├── ic_menu_info_details.png
│ ├── ic_menu_interleave.png
│ ├── ic_menu_play_clip.png
│ ├── ic_menu_preferences.png
│ ├── ic_menu_search.png
│ ├── ic_menu_share.png
│ ├── ic_menu_shuffle.png
│ ├── ic_menu_uniqueify.png
│ ├── ic_menu_unzoom.png
│ ├── ic_menu_zoom.png
│ ├── ic_mp_artist_list.png
│ ├── ic_mp_artist_playback.png
│ ├── ic_mp_genre_playback.png
│ ├── ic_mp_repeat_all_btn.png
│ ├── ic_mp_repeat_off_btn.png
│ ├── ic_mp_repeat_once_btn.png
│ ├── ic_mp_repeat_stopafter_btn.png
│ ├── ic_mp_song_list.png
│ ├── ic_mp_song_playback.png
│ ├── ic_section_menu.png
│ ├── indicator_ic_mp_crossfading_list.png
│ ├── indicator_ic_mp_playing_list.png
│ ├── playlist_tile_drag.9.png
│ ├── playlist_tile_longpress.9.png
│ ├── playlist_tile_normal.9.png
│ ├── playlist_tile_pressed.9.png
│ ├── playlist_tile_selected.9.png
│ └── stat_notify_musicplayer.png
│ ├── drawable-mdpi
│ ├── albumart_mp_unknown_list.png
│ ├── app_icon.png
│ ├── ic_context_menu.png
│ ├── ic_launcher_shortcut_music_playlist.png
│ ├── ic_menu_add.png
│ ├── ic_menu_clear_playlist.png
│ ├── ic_menu_delete.png
│ ├── ic_menu_eq.png
│ ├── ic_menu_info_details.png
│ ├── ic_menu_interleave.png
│ ├── ic_menu_play_clip.png
│ ├── ic_menu_preferences.png
│ ├── ic_menu_search.png
│ ├── ic_menu_share.png
│ ├── ic_menu_shuffle.png
│ ├── ic_menu_uniqueify.png
│ ├── ic_menu_unzoom.png
│ ├── ic_menu_zoom.png
│ ├── ic_mp_artist_list.png
│ ├── ic_mp_artist_playback.png
│ ├── ic_mp_genre_playback.png
│ ├── ic_mp_repeat_all_btn.png
│ ├── ic_mp_repeat_off_btn.png
│ ├── ic_mp_repeat_once_btn.png
│ ├── ic_mp_repeat_stopafter_btn.png
│ ├── ic_mp_song_list.png
│ ├── ic_mp_song_playback.png
│ ├── ic_section_menu.png
│ ├── indicator_ic_mp_crossfading_list.png
│ ├── indicator_ic_mp_playing_list.png
│ ├── playlist_tile_drag.9.png
│ ├── playlist_tile_longpress.9.png
│ ├── playlist_tile_normal.9.png
│ ├── playlist_tile_pressed.9.png
│ ├── playlist_tile_selected.9.png
│ └── stat_notify_musicplayer.png
│ ├── drawable-xhdpi
│ ├── app_icon.png
│ ├── ic_context_menu.png
│ ├── ic_menu_add.png
│ ├── ic_menu_delete.png
│ ├── ic_menu_eq.png
│ ├── ic_menu_info_details.png
│ ├── ic_menu_preferences.png
│ ├── ic_menu_search.png
│ ├── ic_menu_share.png
│ ├── ic_menu_shuffle.png
│ ├── ic_menu_unzoom.png
│ ├── ic_menu_zoom.png
│ ├── ic_mp_repeat_all_btn.png
│ ├── ic_mp_repeat_off_btn.png
│ ├── ic_mp_repeat_once_btn.png
│ ├── ic_mp_repeat_stopafter_btn.png
│ └── ic_section_menu.png
│ ├── drawable-xxhdpi
│ └── app_icon.png
│ ├── layout
│ └── select_music_folder.xml
│ └── values
│ ├── arrays.xml
│ ├── colors.xml
│ ├── dimens.xml
│ ├── strings.xml
│ └── strings2.xml
├── mobile
├── AndroidManifest.xml
├── java
│ └── nu
│ │ └── staldal
│ │ └── djdplayer
│ │ └── mobile
│ │ ├── AlbumFragment.java
│ │ ├── ArtistFragment.java
│ │ ├── BrowserFragment.java
│ │ ├── CategoryFragment.java
│ │ ├── CreatePlaylist.java
│ │ ├── FolderFragment.java
│ │ ├── GenreFragment.java
│ │ ├── MediaAppWidgetProvider.java
│ │ ├── MediaButtonIntentReceiver.java
│ │ ├── MediaPlaybackActivity.java
│ │ ├── MetadataCategoryFragment.java
│ │ ├── MetadataCategoryListAdapter.java
│ │ ├── MobileMediaPlaybackService.java
│ │ ├── MusicBrowserActivity.java
│ │ ├── NarrowPlayerFooterFragment.java
│ │ ├── NowPlayingFragment.java
│ │ ├── PlayQueueFragment.java
│ │ ├── PlayerFooterFragment.java
│ │ ├── PlayerHeaderFragment.java
│ │ ├── PlaylistFragment.java
│ │ ├── PlaylistShortcutActivity.java
│ │ ├── QueryFragment.java
│ │ ├── RescanActivity.java
│ │ ├── SimpleCursorAdapterWithContextMenu.java
│ │ ├── TrackFragment.java
│ │ └── TrackInfoFragment.java
└── res
│ ├── drawable
│ ├── actionbar_background.xml
│ ├── appwidget_background.xml
│ ├── appwidget_preview.png
│ ├── appwidget_preview_w600dp.png
│ ├── button_background.xml
│ ├── list_selector_background.xml
│ ├── list_selector_background_transition.xml
│ ├── nowplaying_background.xml
│ └── playlist_tile.xml
│ ├── layout-h400dp
│ └── audio_player.xml
│ ├── layout-w500dp
│ ├── music_browser_activity.xml
│ └── player_footer.xml
│ ├── layout-w600dp-h400dp
│ ├── appwidget.xml
│ ├── music_browser_activity.xml
│ └── narrow_player_footer.xml
│ ├── layout-w600dp
│ └── player_footer.xml
│ ├── layout-w800dp
│ ├── audio_player.xml
│ ├── narrow_player_footer.xml
│ └── track_list_item_common.xml
│ ├── layout
│ ├── about.xml
│ ├── appwidget.xml
│ ├── audio_player.xml
│ ├── audio_player_land.xml
│ ├── audio_player_port.xml
│ ├── create_playlist.xml
│ ├── edit_track_list_item.xml
│ ├── music_browser_activity.xml
│ ├── narrow_player_footer.xml
│ ├── nowplaying.xml
│ ├── player_footer.xml
│ ├── player_header.xml
│ ├── playlist_shortcut.xml
│ ├── rename_playlist.xml
│ ├── track_info.xml
│ ├── track_list_item.xml
│ └── track_list_item_common.xml
│ ├── menu-h400dp
│ └── player_menu.xml
│ ├── menu-w600dp-h400dp
│ └── browser_menu.xml
│ ├── menu-w800dp
│ └── player_menu.xml
│ ├── menu
│ ├── browser_menu.xml
│ └── player_menu.xml
│ ├── values-w600dp-h400dp
│ ├── styles.xml
│ └── values.xml
│ ├── values
│ ├── ids.xml
│ ├── styles.xml
│ ├── themes.xml
│ └── values.xml
│ ├── xml-v19
│ └── preferences.xml
│ ├── xml-w600dp-h400dp
│ └── appwidget_info.xml
│ └── xml
│ ├── appwidget_info.xml
│ ├── preferences.xml
│ └── searchable.xml
├── test
└── java
│ └── nu
│ └── staldal
│ └── djdplayer
│ └── tests
│ └── ID3UtilsTest.java
└── tv
├── AndroidManifest.xml
├── java
└── nu
│ └── staldal
│ ├── djdplayer
│ └── tv
│ │ ├── ActionCardPresenter.java
│ │ ├── BrowserActivity.java
│ │ ├── BrowserFragment.java
│ │ ├── CategoryCardPresenter.java
│ │ ├── CategoryDetailsActivity.java
│ │ ├── CategoryItem.java
│ │ ├── CategoryLoader.java
│ │ ├── FolderItem.java
│ │ ├── NowPlayingFragment.java
│ │ ├── PlayQueueFragment.java
│ │ ├── PlaybackActivity.java
│ │ ├── SettingsItem.java
│ │ ├── SongItem.java
│ │ ├── SongRowPresenter.java
│ │ └── TvMediaPlaybackService.java
│ └── leanback
│ ├── ActionCardView.java
│ ├── ClickableItemBridgeAdapter.java
│ └── TextCardView.java
└── res
├── drawable-xhdpi
└── app_banner.png
├── drawable
└── song_list_row_background.xml
├── layout
├── about.xml
├── action_card_view.xml
├── nowplaying.xml
├── song_list_row.xml
├── text_card_view.xml
├── tv_browser_activity.xml
├── tv_category_details_activity.xml
├── tv_play_queue_fragment.xml
└── tv_playback_activity.xml
├── values
├── colors.xml
├── dimens.xml
├── strings2.xml
├── styles.xml
└── values.xml
└── xml
└── preferences.xml
/.gitignore:
--------------------------------------------------------------------------------
1 | gen/*
2 | out/*
3 | bin/*
4 | build/*
5 | local.properties
6 | gradle.properties
7 | tests/gen/*
8 | .idea
9 | *.iml
10 | .gradle
11 |
--------------------------------------------------------------------------------
/HISTORY:
--------------------------------------------------------------------------------
1 | 1.1
2 | ---
3 | * Shuffle stored playlist
4 | * Interleave category/folder/playlist with play queue
5 | * Fix occasional crash
6 |
7 | 1.1.1
8 | -----
9 | * Fix handling of special characters in folder names
10 |
11 | 1.2
12 | ---
13 | * Show current music folder when selecting a new
14 | * Automatically refresh folder view when changing music folder
15 | * New folder tab icon
16 |
17 | 1.3
18 | ---
19 | * Shuffle before play/queue/interleave/add to play list from category
20 | * Possible to interleave from options menu
21 | * Improve layout of playback view
22 |
23 | 1.4
24 | ---
25 | * Preference to change click on song behaviour
26 | * Export playlist to M3U file in Music folder
27 | * Command to clear duplicates from play queue and playlist
28 | * Enable Android 4.0 (Ice Cream Sandwich) UI enhancements
29 |
30 | 1.5
31 | ---
32 | * Improve system notification layout on Android 2.x
33 | * Enable more Android 4 UI enhancements, by using Holo theme
34 | * Possibility to stop after current song
35 |
36 | 1.6
37 | ---
38 | * Use Holo theme consistently on Android 4
39 |
40 | 1.7
41 | ---
42 | * Some changes to cater for tablets in landscape mode
43 | * Make it possible to run in AndroVM
44 |
45 | 1.8
46 | ---
47 | * Basic tablet support
48 | * Properly styled icon for playlist shortcuts
49 | * Avoid interference with other music players when switching tabs
50 |
51 | 1.9
52 | ---
53 | * Bug fixes
54 | * Layout improvements
55 | * Performance improvements
56 |
57 | 2.0
58 | ---
59 | * Integrate current playing song and play queue view
60 | * Use Action Bar and other Android 4 UI enhancements
61 | * Improved tablet support
62 |
63 | 2.1
64 | ---
65 | * Improve interleave menu
66 | * Don't zoom play queue in landscape mode
67 | * Improved app widget
68 | * Remote control in lock screen
69 |
70 | 2.2
71 | ---
72 | * Improved app widget
73 | * Pause button in system notification
74 |
75 | 2.3
76 | ---
77 | * Bug fixes
78 | * Play all next for categories
79 | * Improved music picking
80 |
81 | 2.4
82 | ---
83 | * Hide rescan music on Android 4.4, since it does not work there
84 | * Two column layout for tablets
85 | * Context menu button in lists
86 |
87 | 2.5
88 | ---
89 | * Improved tablet layout
90 | * Bug fixes
91 |
92 | 2.6
93 | ---
94 | * Improved layout
95 | * About
96 | * Bug fixes
97 |
98 | 2.6.1
99 | -----
100 | * Bug fixes
101 |
102 | 2.6.2
103 | -----
104 | * Bug fix
105 |
106 | 2.6.3
107 | -----
108 | * Improved layout on phones without menu button, or with Android 4.4+
109 |
110 | 2.7
111 | ---
112 | * Share playlist
113 | * Transfer playlist between two devices via Bluetooth or WiFi Direct
114 |
115 | 2.8
116 | ---
117 | * Cross-fade between songs
118 |
119 | 2.9
120 | ---
121 | * Bug fix in removing dups from playlist
122 | * Show filename of exported playlist
123 | * Add all songs in one playlist to another playlist
124 | * Add all songs in queue to a playlist
125 |
126 | 2.10
127 | ----
128 | * Playback buttons in notification
129 | * Remote control in lock screen now works in Android 5
130 |
131 | 2.11
132 | ----
133 | * ViewPager to swipe horizontally between tabs
134 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2005-2008, The Android Open Source Project
2 | Copyright (c) 2012-2016, Mikael Ståldal
3 |
4 | Licensed under the Apache License, Version 2.0, see the NOTICE file;
5 | you may not use this project except in compliance with the License.
6 |
--------------------------------------------------------------------------------
/MODULE_LICENSE_APACHE2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/MODULE_LICENSE_APACHE2
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | DJD Player is a music player and organizer app for Android, adapted for the needs of DJs playing music at parties and dancing events.
2 |
3 | It is based on the standard Music Player from The Android Open Source Project (which comes pre-installed on many Android phones).
4 |
5 | Enhancements over the standard Music Player:
6 |
7 | * Genre support:
8 | - genre browsing tab
9 | - show genre of currently playing song
10 |
11 | * Do not pretend that album is a proper subcategory of artist (one album can contain songs from different artists)
12 |
13 | * Show number of songs for all categories (artist, album, genre), folders and playlists
14 |
15 | * Jump directly to list of songs for artist/genre from currently playing song view
16 |
17 | * Integrate current playing song and play queue view
18 |
19 | * Always show currently playing song footer in lists, with play/pause and next button
20 |
21 | * Improved play queue
22 |
23 | * Improved shuffling
24 |
25 | * Possible to force rescan of music library
26 |
27 | * Application settings
28 |
29 | * Delete from playlist by slide
30 |
31 | * Track info screen
32 |
33 | * Browse by folder
34 |
35 | * Search for song, artist and album
36 |
37 | * Shuffle stored playlist
38 |
39 | * Interleave category/folder/playlist with play queue
40 |
41 | * Export playlist to M3U file in Music folder
42 |
43 | * Possibility to stop after current song
44 |
45 | * Remote control in lock screen
46 |
47 | * Pause button in system notification
48 |
49 | * Two column layout for tablets
50 |
51 | * Context menu button in list items
52 |
53 | * Share songs and playlists
54 |
55 | * Transfer playlist between two devices via Bluetooth or WiFi Direct
56 |
57 | * Cross-fade between songs
58 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | jcenter()
4 | mavenCentral()
5 | }
6 | dependencies {
7 | classpath 'com.android.tools.build:gradle:2.3.3'
8 | classpath 'me.tatarka:gradle-retrolambda:3.2.5'
9 | classpath 'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2'
10 | }
11 |
12 | // Exclude the version that the android plugin depends on.
13 | configurations.classpath.exclude group: 'com.android.tools.external.lombok'
14 | }
15 |
16 | allprojects {
17 | repositories {
18 | jcenter()
19 | mavenCentral()
20 | }
21 | }
22 |
23 | apply plugin: 'com.android.application'
24 | apply plugin: 'me.tatarka.retrolambda'
25 |
26 | ext {
27 | supportLibVersion = "25.3.1"
28 | }
29 |
30 | android {
31 | compileSdkVersion 25
32 | buildToolsVersion "25.0.3"
33 |
34 | compileOptions {
35 | sourceCompatibility JavaVersion.VERSION_1_8
36 | targetCompatibility JavaVersion.VERSION_1_8
37 | }
38 |
39 | defaultConfig {
40 | applicationId "nu.staldal.djdplayer"
41 | targetSdkVersion 22
42 |
43 | dependencies {
44 | compile "com.android.support:appcompat-v7:${supportLibVersion}"
45 | testCompile 'junit:junit:4.12'
46 | }
47 | }
48 |
49 | if (project.hasProperty("KEY_STORE")) {
50 | signingConfigs {
51 | release {
52 | storeFile file(KEY_STORE)
53 | storePassword KEY_STORE_PASSWORD
54 | keyAlias KEY_ALIAS
55 | keyPassword KEY_PASSWORD
56 | }
57 | }
58 | } else {
59 | signingConfigs {
60 | release {
61 | }
62 | }
63 | }
64 |
65 | buildTypes {
66 | release {
67 | minifyEnabled true
68 | shrinkResources true
69 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.pro'
70 | debuggable false
71 | signingConfig signingConfigs.release
72 | }
73 | preview {
74 | minifyEnabled true
75 | shrinkResources true
76 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.pro'
77 | debuggable true
78 | signingConfig signingConfigs.release
79 | }
80 | debug {
81 | minifyEnabled false
82 | shrinkResources false
83 | // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.pro'
84 | debuggable true
85 | // signing debug
86 | }
87 | }
88 |
89 | productFlavors {
90 | mobile {
91 | minSdkVersion 16
92 | }
93 | tv {
94 | minSdkVersion 21
95 |
96 | dependencies {
97 | tvCompile "com.android.support:leanback-v17:${supportLibVersion}"
98 | }
99 | }
100 | }
101 |
102 | }
103 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Aug 01 10:55:02 CEST 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.5.1-all.zip
7 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/graphics/icon.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/graphics/icon.xcf
--------------------------------------------------------------------------------
/lint.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/proguard.pro:
--------------------------------------------------------------------------------
1 | # For RetroLambda
2 | -dontwarn java.lang.invoke.*
--------------------------------------------------------------------------------
/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
36 |
37 |
38 |
39 |
40 |
41 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/src/main/java/nu/staldal/djdplayer/AboutActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Mikael Ståldal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package nu.staldal.djdplayer;
17 |
18 | import android.app.Activity;
19 | import android.os.Bundle;
20 |
21 | public class AboutActivity extends Activity {
22 | @Override
23 | public void onCreate(Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 | setContentView(R.layout.about);
26 | }
27 | }
--------------------------------------------------------------------------------
/src/main/java/nu/staldal/djdplayer/FragmentServiceConnection.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Mikael Ståldal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package nu.staldal.djdplayer;
17 |
18 | public interface FragmentServiceConnection {
19 | void onServiceConnected(MediaPlayback service);
20 |
21 | void onServiceDisconnected();
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/java/nu/staldal/djdplayer/IdAndName.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Mikael Ståldal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package nu.staldal.djdplayer;
17 |
18 | public class IdAndName {
19 | public final long id;
20 | public final String name;
21 |
22 | public IdAndName(long id, String name) {
23 | this.id = id;
24 | this.name = name;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/nu/staldal/djdplayer/MusicAlphabetIndexer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2008 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package nu.staldal.djdplayer;
18 |
19 | import android.database.Cursor;
20 | import android.provider.MediaStore;
21 | import android.widget.AlphabetIndexer;
22 |
23 | /**
24 | * Handles comparisons in a different way because the Album, Song and Artist name
25 | * are stripped of some prefixes such as "a", "an", "the" and some symbols.
26 | *
27 | */
28 | public class MusicAlphabetIndexer extends AlphabetIndexer {
29 |
30 | public MusicAlphabetIndexer(Cursor cursor, int sortedColumnIndex, CharSequence alphabet) {
31 | super(cursor, sortedColumnIndex, alphabet);
32 | }
33 |
34 | @Override
35 | protected int compare(String word, String letter) {
36 | String wordKey = MediaStore.Audio.keyFor(word);
37 | String letterKey = MediaStore.Audio.keyFor(letter);
38 | if (wordKey.startsWith(letter)) {
39 | return 0;
40 | } else {
41 | return wordKey.compareTo(letterKey);
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/main/java/nu/staldal/djdplayer/SettingsActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012-2016 Mikael Ståldal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package nu.staldal.djdplayer;
17 |
18 | import android.app.Activity;
19 | import android.os.Bundle;
20 |
21 | public class SettingsActivity extends Activity {
22 | public static final String CLICK_ON_SONG = "clickonsong";
23 | public static final String SHOW_ARTISTS_TAB = "show_artists_tab";
24 | public static final String SHOW_ALBUMS_TAB = "show_albums_tab";
25 | public static final String SHOW_GENRES_TAB = "show_genres_tab";
26 | public static final String SHOW_FOLDERS_TAB = "show_folders_tab";
27 | public static final String SHOW_PLAYLISTS_TAB = "show_playlists_tab";
28 | public static final String MUSIC_FOLDER = "music_folder";
29 | public static final String FADE_SECONDS = "fade_seconds";
30 | public static final String CROSS_FADE = "cross_fade";
31 |
32 | public static final String PLAYQUEUE = "queue";
33 | public static final String CARDID = "cardid";
34 | public static final String CURPOS = "curpos";
35 | public static final String SEEKPOS = "seekpos";
36 | public static final String REPEATMODE = "repeatmode";
37 | public static final String NUMWEEKS = "numweeks";
38 | public static final String ACTIVE_TAB = "ActiveTab";
39 |
40 | // CLICK_ON_SONG values
41 | public static final String PLAY_NEXT = "PLAY_NEXT";
42 | public static final String PLAY_NOW = "PLAY_NOW";
43 | public static final String QUEUE = "QUEUE";
44 |
45 | @Override
46 | public void onCreate(Bundle savedInstanceState) {
47 | super.onCreate(savedInstanceState);
48 | setTitle(R.string.settings);
49 | getFragmentManager().beginTransaction()
50 | .replace(android.R.id.content, new SettingsFragment())
51 | .commit();
52 | }
53 | }
--------------------------------------------------------------------------------
/src/main/java/nu/staldal/djdplayer/SettingsFragment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Mikael Ståldal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package nu.staldal.djdplayer;
17 |
18 | import android.os.Bundle;
19 | import android.preference.PreferenceFragment;
20 |
21 | public class SettingsFragment extends PreferenceFragment {
22 | @Override
23 | public void onCreate(Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 | addPreferencesFromResource(R.xml.preferences);
26 | }
27 | }
--------------------------------------------------------------------------------
/src/main/java/nu/staldal/djdplayer/ShufflePlaylistTask.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2013 Mikael Ståldal
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package nu.staldal.djdplayer;
17 |
18 | import android.content.Context;
19 | import android.os.AsyncTask;
20 | import android.provider.MediaStore;
21 | import android.widget.Toast;
22 |
23 | import java.util.Random;
24 |
25 | public class ShufflePlaylistTask extends AsyncTask