diff --git a/app/build.gradle b/app/build.gradle
index 8702d698..f8d653c4 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -13,7 +13,7 @@ android {
vectorDrawables.useSupportLibrary = true
applicationId "code.name.monkey.retromusic"
- versionCode 355
+ versionCode 357
versionName '3.3.200'
multiDexEnabled true
diff --git a/app/src/main/assets/retro-changelog.html b/app/src/main/assets/retro-changelog.html
index 3cc479cf..7d5e7167 100644
--- a/app/src/main/assets/retro-changelog.html
+++ b/app/src/main/assets/retro-changelog.html
@@ -1 +1 @@
-
v.3.3.100
- Improved Now playing controls alignment
- Lot internal changes to improve performance
- Fix playlist adding crash
- Fix color corrections
- Fix file editing crash
v3.3.000
- SD card support for deleting and editing
v3.2.240
- Improved options dialog with selected color and title icon
- Fix dialog color on dark theme
v3.2.220
- Fix Notification SeekBar position (Need Android Q test)
- Rolled back settings tint icons
- Changed preference category title style according Android Q
- Fix tabs options not working
v3.2.203
- Carousel effect improved
- Settings icons are now tint accent color
- Settings title, back arrow and icons are now tint accent color
- Equalizer is removed
- Fix keyboard not popping on Search
- Curated the main options
- Folder toolbar outlined, folder icon background fix and separate line removed
- Edit text input handles are colored
v3.2.135
- Fix crashing on sharing song
v3.2.125
- Fix crashing on selecting profile picture
- Semi transparent color fix(s) on now playing themes
v3.2.120
- Fix crashing on choosing a theme
- Fix color theme selection without pro enabled
- Fix icon tint some places
v3.2.105
v3.2.100
- Fix crashing on Sleep timer
- Toolbar elevation removed added stroke instead
- Show empty indication for home
v3.2.000
- Implemented Artist image loading all thanks to VinylMusicPlayer
- Fixed buttons in Genre details
- Fixed color buttons in Album and Artist details screen
v3.1.900
- Added Play and Shuffle buttons on Songs list, Album Details, Artist Details, Playlist
Details etc.
- Home toolbar is semi transparent in Banner mode
- Added new Buy Retro Music pro in settings
- Improved dark color in Dark theme
v3.1.850
- Toolbar will be clickable for Search
v3.1.800
- Search bar CardView background
- Improve volume zero
- Now playing and Album theme picker rollback to dialog
- Fix sharing app link
- Fix scanning dialog
- Added settings icons for options
v3.1.700
- Cleaned internal code
- Removed full screen option
- Added Toolbar elevation
- To access menu either tap on Toolbar or Hamburger icon
- Fix back button not working on playing queue
- Fix crashing on What's New screen
- Fix lyrics dialog
- Changed toggles to line icons
- Custom UserImageView for loading user profile image
- Fix crashing on artist list for number format error
- Fix blacklist dialog crashing
- Rearranged icons and main menu access
- Fix some crashes when device is locked or background
- Folder screen have main options access
- Dialogs are now using Material Dialogs v3(BottomSheet)
- Fix Shuffle icon for Artist, Album, Genre and Playlist details
v3.1.400
- Removed sync lyrics for Android 5
- Fix Seek-bar color in settings
- Added keyboard to popup on search
- Added keyboard to popup on search
- Improved lock-screen behavior and UI
- Improved text appearance
- Fix bio text not showing in settings
- Fix not showing slider(blur, filter song) amount in settings
- Fix setting ringtone
- Fix file sharing crash
- Fix some crashes
- Fix playlist icon on small devices
- Fix empty lyrics text color
- Fix album cover background purple color in color theme
v3.1.300
- Fix rename playlist text color
- Fix same album showing in details page
- Fix lyrics text alignment on sync and lyrics reading improved
- Improved home sections loading
- Removed library options which are duplicated (it's available from profile menu)
- Replaced collapsing Fab with Android Floating Extended Fab
- Replaced home with for you
- Fixed profile image not loading in about
- Improved selecting user profile image
- Added bio to enter custom message
- Improved some UI screens
v3.1.240
- Fix Search not showing from home screen
- Fix Volume controls color issue
- Fix Seek bar alignment
- Added tiny theme
- Improved full theme appearances
- Now playing theme preview updated
- Fix composer error
- Bottom Options improved(internal)
v3.1.200
- Added composer sort and editing
- Fix Crash in Album tag editor while selecting options
- Added Filter song length
- Added Favourites playlist icon will be accent color
- Added Colorful settings icons
- Added Corners for dialog
v3.0.570
- Fix Album/Artist square image
- Fix Delete dialog text format
- Fix Profile picture not showing after coming back from folders
- Fix Play button color i Simple and Plain themes
- Fix Sleep timer dialog crashing
- Fix Share song dialog title and text
If you see entire app white or dark or black select same theme in settings to fix
FAQ's
*If you face any UI related issues you clear app data and cache, if its
not working try to
uninstall and install again.
\ No newline at end of file
+
v3.3.200
- Android auto support
- New notification icon
- Favorite icon in mini player
v.3.3.100
- Improved Now playing controls alignment
- Lot internal changes to improve performance
- Fix playlist adding crash
- Fix color corrections
- Fix file editing crash
v3.3.000
- SD card support for deleting and editing
v3.2.240
- Improved options dialog with selected color and title icon
- Fix dialog color on dark theme
v3.2.220
- Fix Notification SeekBar position (Need Android Q test)
- Rolled back settings tint icons
- Changed preference category title style according Android Q
- Fix tabs options not working
v3.2.203
- Carousel effect improved
- Settings icons are now tint accent color
- Settings title, back arrow and icons are now tint accent color
- Equalizer is removed
- Fix keyboard not popping on Search
- Curated the main options
- Folder toolbar outlined, folder icon background fix and separate line removed
- Edit text input handles are colored
v3.2.135
- Fix crashing on sharing song
v3.2.125
- Fix crashing on selecting profile picture
- Semi transparent color fix(s) on now playing themes
v3.2.120
- Fix crashing on choosing a theme
- Fix color theme selection without pro enabled
- Fix icon tint some places
v3.2.105
v3.2.100
- Fix crashing on Sleep timer
- Toolbar elevation removed added stroke instead
- Show empty indication for home
v3.2.000
- Implemented Artist image loading all thanks to VinylMusicPlayer
- Fixed buttons in Genre details
- Fixed color buttons in Album and Artist details screen
v3.1.900
- Added Play and Shuffle buttons on Songs list, Album Details, Artist Details, Playlist
Details etc.
- Home toolbar is semi transparent in Banner mode
- Added new Buy Retro Music pro in settings
- Improved dark color in Dark theme
v3.1.850
- Toolbar will be clickable for Search
v3.1.800
- Search bar CardView background
- Improve volume zero
- Now playing and Album theme picker rollback to dialog
- Fix sharing app link
- Fix scanning dialog
- Added settings icons for options
v3.1.700
- Cleaned internal code
- Removed full screen option
- Added Toolbar elevation
- To access menu either tap on Toolbar or Hamburger icon
- Fix back button not working on playing queue
- Fix crashing on What's New screen
- Fix lyrics dialog
- Changed toggles to line icons
- Custom UserImageView for loading user profile image
- Fix crashing on artist list for number format error
- Fix blacklist dialog crashing
- Rearranged icons and main menu access
- Fix some crashes when device is locked or background
- Folder screen have main options access
- Dialogs are now using Material Dialogs v3(BottomSheet)
- Fix Shuffle icon for Artist, Album, Genre and Playlist details
v3.1.400
- Removed sync lyrics for Android 5
- Fix Seek-bar color in settings
- Added keyboard to popup on search
- Added keyboard to popup on search
- Improved lock-screen behavior and UI
- Improved text appearance
- Fix bio text not showing in settings
- Fix not showing slider(blur, filter song) amount in settings
- Fix setting ringtone
- Fix file sharing crash
- Fix some crashes
- Fix playlist icon on small devices
- Fix empty lyrics text color
- Fix album cover background purple color in color theme
v3.1.300
- Fix rename playlist text color
- Fix same album showing in details page
- Fix lyrics text alignment on sync and lyrics reading improved
- Improved home sections loading
- Removed library options which are duplicated (it's available from profile menu)
- Replaced collapsing Fab with Android Floating Extended Fab
- Replaced home with for you
- Fixed profile image not loading in about
- Improved selecting user profile image
- Added bio to enter custom message
- Improved some UI screens
v3.1.240
- Fix Search not showing from home screen
- Fix Volume controls color issue
- Fix Seek bar alignment
- Added tiny theme
- Improved full theme appearances
- Now playing theme preview updated
- Fix composer error
- Bottom Options improved(internal)
v3.1.200
- Added composer sort and editing
- Fix Crash in Album tag editor while selecting options
- Added Filter song length
- Added Favourites playlist icon will be accent color
- Added Colorful settings icons
- Added Corners for dialog
v3.0.570
- Fix Album/Artist square image
- Fix Delete dialog text format
- Fix Profile picture not showing after coming back from folders
- Fix Play button color i Simple and Plain themes
- Fix Sleep timer dialog crashing
- Fix Share song dialog title and text
If you see entire app white or dark or black select same theme in settings to fix
FAQ's
*If you face any UI related issues you clear app data and cache, if its
not working try to
uninstall and install again.
\ No newline at end of file
diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/MiniPlayerFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/MiniPlayerFragment.kt
index fcd30d98..af98f3f2 100644
--- a/app/src/main/java/code/name/monkey/retromusic/fragments/MiniPlayerFragment.kt
+++ b/app/src/main/java/code/name/monkey/retromusic/fragments/MiniPlayerFragment.kt
@@ -53,7 +53,7 @@ open class MiniPlayerFragment : AbsMusicServiceFragment(), MusicProgressViewUpda
setUpMiniPlayer()
miniPlayerImage.setOnClickListener {
- toggleFavorite(MusicPlayerRemote.currentSong)
+ //toggleFavorite(MusicPlayerRemote.currentSong)
}
if (RetroUtil.isTablet()) {
@@ -100,12 +100,12 @@ open class MiniPlayerFragment : AbsMusicServiceFragment(), MusicProgressViewUpda
override fun onServiceConnected() {
updateSongTitle()
updatePlayPauseDrawableState()
- updateIsFavorite()
+ //updateIsFavorite()
}
override fun onPlayingMetaChanged() {
updateSongTitle()
- updateIsFavorite()
+ //updateIsFavorite()
}
override fun onPlayStateChanged() {
diff --git a/app/src/main/java/code/name/monkey/retromusic/service/MediaStoreObserver.java b/app/src/main/java/code/name/monkey/retromusic/service/MediaStoreObserver.kt
similarity index 56%
rename from app/src/main/java/code/name/monkey/retromusic/service/MediaStoreObserver.java
rename to app/src/main/java/code/name/monkey/retromusic/service/MediaStoreObserver.kt
index 14c9780f..131154ef 100644
--- a/app/src/main/java/code/name/monkey/retromusic/service/MediaStoreObserver.java
+++ b/app/src/main/java/code/name/monkey/retromusic/service/MediaStoreObserver.kt
@@ -12,36 +12,32 @@
* See the GNU General Public License for more details.
*/
-package code.name.monkey.retromusic.service;
+package code.name.monkey.retromusic.service
-import android.database.ContentObserver;
-import android.os.Handler;
+import android.database.ContentObserver
+import android.os.Handler
-public class MediaStoreObserver extends ContentObserver implements Runnable {
- // milliseconds to delay before calling refresh to aggregate events
- private static final long REFRESH_DELAY = 500;
- private final MusicService musicService;
- private Handler mHandler;
+class MediaStoreObserver(
+ private val musicService: MusicService,
+ private val mHandler: Handler
+) : ContentObserver(mHandler), Runnable {
- MediaStoreObserver(MusicService musicService, Handler handler) {
- super(handler);
- this.musicService = musicService;
- mHandler = handler;
- }
-
- @Override
- public void onChange(boolean selfChange) {
+ override fun onChange(selfChange: Boolean) {
// if a change is detected, remove any scheduled callback
// then post a new one. This is intended to prevent closely
// spaced events from generating multiple refresh calls
- mHandler.removeCallbacks(this);
- mHandler.postDelayed(this, REFRESH_DELAY);
+ mHandler.removeCallbacks(this)
+ mHandler.postDelayed(this, REFRESH_DELAY)
}
- @Override
- public void run() {
+ override fun run() {
// actually call refresh when the delayed callback fires
// do not send a sticky broadcast here
- musicService.handleAndSendChangeInternal(MusicService.MEDIA_STORE_CHANGED);
+ musicService.handleAndSendChangeInternal(MusicService.MEDIA_STORE_CHANGED)
+ }
+
+ companion object {
+ // milliseconds to delay before calling refresh to aggregate events
+ private val REFRESH_DELAY: Long = 500
}
}
\ No newline at end of file
diff --git a/app/src/main/java/code/name/monkey/retromusic/service/MusicService.java b/app/src/main/java/code/name/monkey/retromusic/service/MusicService.java
index 01bffe2d..f7d55e52 100644
--- a/app/src/main/java/code/name/monkey/retromusic/service/MusicService.java
+++ b/app/src/main/java/code/name/monkey/retromusic/service/MusicService.java
@@ -1088,6 +1088,7 @@ public class MusicService extends MediaBrowserServiceCompat implements SharedPre
try {
int newPosition = playback.seek(millis);
throttledSeekHandler.notifySeek();
+ updateMediaSessionPlaybackState();
return newPosition;
} catch (Exception e) {
return -1;
diff --git a/app/src/main/java/code/name/monkey/retromusic/service/QueueSaveHandler.java b/app/src/main/java/code/name/monkey/retromusic/service/QueueSaveHandler.java
deleted file mode 100644
index 0d60ca2e..00000000
--- a/app/src/main/java/code/name/monkey/retromusic/service/QueueSaveHandler.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2019 Hemanth Savarala.
- *
- * Licensed under the GNU General Public License v3
- *
- * This is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by
- * the Free Software Foundation either version 3 of the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details.
- */
-
-package code.name.monkey.retromusic.service;
-
-import android.os.Handler;
-import android.os.Looper;
-import android.os.Message;
-
-import androidx.annotation.NonNull;
-
-import java.lang.ref.WeakReference;
-
-import static code.name.monkey.retromusic.service.MusicService.SAVE_QUEUES;
-
-class QueueSaveHandler extends Handler {
- @NonNull
- private final WeakReference mService;
-
- QueueSaveHandler(final MusicService service, @NonNull final Looper looper) {
- super(looper);
- mService = new WeakReference<>(service);
- }
-
- @Override
- public void handleMessage(@NonNull Message msg) {
- final MusicService service = mService.get();
- if (msg.what == SAVE_QUEUES) {
- service.saveQueuesImpl();
- }
- }
-}
diff --git a/app/src/main/java/code/name/monkey/retromusic/service/QueueSaveHandler.kt b/app/src/main/java/code/name/monkey/retromusic/service/QueueSaveHandler.kt
new file mode 100644
index 00000000..44f3eb84
--- /dev/null
+++ b/app/src/main/java/code/name/monkey/retromusic/service/QueueSaveHandler.kt
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2019 Hemanth Savarala.
+ *
+ * Licensed under the GNU General Public License v3
+ *
+ * This is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by
+ * the Free Software Foundation either version 3 of the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ */
+
+package code.name.monkey.retromusic.service
+
+import android.os.Handler
+import android.os.Looper
+import android.os.Message
+import code.name.monkey.retromusic.service.MusicService.SAVE_QUEUES
+import java.lang.ref.WeakReference
+
+internal class QueueSaveHandler(
+ musicService: MusicService,
+ looper: Looper
+) : Handler(looper) {
+ private val service: WeakReference = WeakReference(musicService)
+
+ override fun handleMessage(msg: Message) {
+ val service: MusicService? = service.get()
+ if (msg.what == SAVE_QUEUES) {
+ service?.saveQueuesImpl()
+ }
+ }
+}
diff --git a/app/src/main/java/code/name/monkey/retromusic/service/SongPlayCountHelper.java b/app/src/main/java/code/name/monkey/retromusic/service/SongPlayCountHelper.java
deleted file mode 100644
index 463396fb..00000000
--- a/app/src/main/java/code/name/monkey/retromusic/service/SongPlayCountHelper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2019 Hemanth Savarala.
- *
- * Licensed under the GNU General Public License v3
- *
- * This is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by
- * the Free Software Foundation either version 3 of the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details.
- */
-
-package code.name.monkey.retromusic.service;
-
-import code.name.monkey.retromusic.helper.StopWatch;
-import code.name.monkey.retromusic.model.Song;
-
-public class SongPlayCountHelper {
- public static final String TAG = SongPlayCountHelper.class.getSimpleName();
-
- private StopWatch stopWatch = new StopWatch();
- private Song song = Song.getEmptySong();
-
- public Song getSong() {
- return song;
- }
-
- boolean shouldBumpPlayCount() {
- return song.getDuration() * 0.5d < stopWatch.getElapsedTime();
- }
-
- void notifySongChanged(Song song) {
- synchronized (this) {
- stopWatch.reset();
- this.song = song;
- }
- }
-
- void notifyPlayStateChanged(boolean isPlaying) {
- synchronized (this) {
- if (isPlaying) {
- stopWatch.start();
- } else {
- stopWatch.pause();
- }
- }
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/code/name/monkey/retromusic/service/SongPlayCountHelper.kt b/app/src/main/java/code/name/monkey/retromusic/service/SongPlayCountHelper.kt
new file mode 100644
index 00000000..612b166a
--- /dev/null
+++ b/app/src/main/java/code/name/monkey/retromusic/service/SongPlayCountHelper.kt
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2019 Hemanth Savarala.
+ *
+ * Licensed under the GNU General Public License v3
+ *
+ * This is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by
+ * the Free Software Foundation either version 3 of the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ */
+
+package code.name.monkey.retromusic.service
+
+import code.name.monkey.retromusic.helper.StopWatch
+import code.name.monkey.retromusic.model.Song
+
+class SongPlayCountHelper {
+
+ private val stopWatch = StopWatch()
+ var song = Song.emptySong
+ private set
+
+ fun shouldBumpPlayCount(): Boolean {
+ return song.duration * 0.5 < stopWatch.elapsedTime
+ }
+
+ fun notifySongChanged(song: Song) {
+ synchronized(this) {
+ stopWatch.reset()
+ this.song = song
+ }
+ }
+
+ fun notifyPlayStateChanged(isPlaying: Boolean) {
+ synchronized(this) {
+ if (isPlaying) {
+ stopWatch.start()
+ } else {
+ stopWatch.pause()
+ }
+ }
+ }
+
+ companion object {
+ val TAG: String = SongPlayCountHelper::class.java.simpleName
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/code/name/monkey/retromusic/service/ThrottledSeekHandler.java b/app/src/main/java/code/name/monkey/retromusic/service/ThrottledSeekHandler.java
deleted file mode 100644
index 20f075e7..00000000
--- a/app/src/main/java/code/name/monkey/retromusic/service/ThrottledSeekHandler.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2019 Hemanth Savarala.
- *
- * Licensed under the GNU General Public License v3
- *
- * This is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by
- * the Free Software Foundation either version 3 of the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details.
- */
-
-package code.name.monkey.retromusic.service;
-
-
-import android.os.Handler;
-
-import static code.name.monkey.retromusic.service.MusicService.PLAY_STATE_CHANGED;
-
-public class ThrottledSeekHandler implements Runnable {
- // milliseconds to throttle before calling run() to aggregate events
- private static final long THROTTLE = 500;
- private final MusicService musicService;
- private Handler handler;
-
- ThrottledSeekHandler(MusicService musicService, Handler handler) {
- this.musicService = musicService;
- this.handler = handler;
- }
-
- void notifySeek() {
- handler.removeCallbacks(this);
- handler.postDelayed(this, THROTTLE);
- }
-
- @Override
- public void run() {
- musicService.savePositionInTrack();
- musicService.sendPublicIntent(PLAY_STATE_CHANGED); // for musixmatch synced lyrics
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/code/name/monkey/retromusic/service/ThrottledSeekHandler.kt b/app/src/main/java/code/name/monkey/retromusic/service/ThrottledSeekHandler.kt
new file mode 100644
index 00000000..1d971104
--- /dev/null
+++ b/app/src/main/java/code/name/monkey/retromusic/service/ThrottledSeekHandler.kt
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2019 Hemanth Savarala.
+ *
+ * Licensed under the GNU General Public License v3
+ *
+ * This is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by
+ * the Free Software Foundation either version 3 of the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ */
+
+package code.name.monkey.retromusic.service
+
+
+import android.os.Handler
+
+import code.name.monkey.retromusic.service.MusicService.PLAY_STATE_CHANGED
+
+class ThrottledSeekHandler(
+ private val musicService: MusicService,
+ private val handler: Handler
+) : Runnable {
+
+ fun notifySeek() {
+ handler.removeCallbacks(this)
+ handler.postDelayed(this, THROTTLE)
+ }
+
+ override fun run() {
+ musicService.savePositionInTrack()
+ musicService.sendPublicIntent(PLAY_STATE_CHANGED) // for musixmatch synced lyrics
+ }
+
+ companion object {
+ // milliseconds to throttle before calling run() to aggregate events
+ private val THROTTLE: Long = 500
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/code/name/monkey/retromusic/service/playback/Playback.java b/app/src/main/java/code/name/monkey/retromusic/service/playback/Playback.kt
similarity index 50%
rename from app/src/main/java/code/name/monkey/retromusic/service/playback/Playback.java
rename to app/src/main/java/code/name/monkey/retromusic/service/playback/Playback.kt
index 6fc4c449..7925bef9 100644
--- a/app/src/main/java/code/name/monkey/retromusic/service/playback/Playback.java
+++ b/app/src/main/java/code/name/monkey/retromusic/service/playback/Playback.kt
@@ -12,46 +12,44 @@
* See the GNU General Public License for more details.
*/
-package code.name.monkey.retromusic.service.playback;
-
-import androidx.annotation.Nullable;
+package code.name.monkey.retromusic.service.playback
-public interface Playback {
+interface Playback {
- boolean setDataSource(String path);
+ val isInitialized: Boolean
- void setNextDataSource(@Nullable String path);
+ val isPlaying: Boolean
- void setCallbacks(PlaybackCallbacks callbacks);
+ val audioSessionId: Int
- boolean isInitialized();
+ fun setDataSource(path: String): Boolean
- boolean start();
+ fun setNextDataSource(path: String?)
- void stop();
+ fun setCallbacks(callbacks: PlaybackCallbacks)
- void release();
+ fun start(): Boolean
- boolean pause();
+ fun stop()
- boolean isPlaying();
+ fun release()
- int duration();
+ fun pause(): Boolean
- int position();
+ fun duration(): Int
- int seek(int whereto);
+ fun position(): Int
- boolean setVolume(float vol);
+ fun seek(whereto: Int): Int
- boolean setAudioSessionId(int sessionId);
+ fun setVolume(vol: Float): Boolean
- int getAudioSessionId();
+ fun setAudioSessionId(sessionId: Int): Boolean
interface PlaybackCallbacks {
- void onTrackWentToNext();
+ fun onTrackWentToNext()
- void onTrackEnded();
+ fun onTrackEnded()
}
}