Commit graph

2397 commits

Author SHA1 Message Date
Naveen
38a92965b5
Migrate from kotlin synthetics to View binding 2023-09-01 17:19:34 +05:30
Naveen
0660d39672
Migrate build scripts to use version catalogs and kts 2023-09-01 15:44:34 +05:30
Naveen
a8f00762eb
Properly enclose table name with backticks 2023-08-30 16:22:21 +05:30
Naveen
fd60eb2a88
Resume playback on next/previous 2023-08-30 14:45:26 +05:30
Naveen
7f2cf0dea7
Resume playback on seek 2023-08-29 22:08:18 +05:30
Naveen
c7a269fe00
Reorganize some extension functions 2023-08-29 18:51:43 +05:30
Naveen
c2dc9f2604
Minor readability improvement 2023-08-29 18:04:33 +05:30
Naveen
273b0860be
Remove unused events 2023-08-29 15:26:10 +05:30
Naveen
9118200412
Remove redundant Player.Listener interface from MainActivity 2023-08-29 15:25:25 +05:30
Naveen
197e143403
Update local config when shuffle, repeat mode is changed 2023-08-28 12:41:14 +05:30
Naveen
f14972eb97
Remove previous queue initialization logic 2023-08-27 23:49:58 +05:30
Naveen
90633df264
Don't start track activity from track activity (typo) 2023-08-27 23:47:10 +05:30
Naveen
be976a060d
Always execute prepare callback 2023-08-27 23:38:19 +05:30
Naveen
92400516e7
Execute callback on prepare 2023-08-27 23:20:13 +05:30
Naveen
a096825f0c
Resume playback as quickly as possible
This is to especially avoid ForegroundServiceDidNotStartInTimeException when resuming from background e.g. using bluetooth headsets.
2023-08-27 23:16:04 +05:30
Naveen
d33efe491c
Prepare player as quickly as possible
This is to especially avoid ForegroundServiceDidNotStartInTimeException when starting from background
2023-08-27 21:11:12 +05:30
Naveen
7bad9cc009
Optimize AudioHelper.getAllQue 2023-08-27 20:57:55 +05:30
Naveen
2e0faadcc5
Speed up media session initialization 2023-08-27 20:01:34 +05:30
Naveen
0514d90998
Disable scroll when item is already visible 2023-08-27 20:01:05 +05:30
Naveen
034ef821e8
Smooth scroll to the current media item on current track change 2023-08-27 16:30:10 +05:30
Naveen
22e4504adb
Rework repeat mode logic again
- Always allow next/previous regardless of the repeat mode
 - Always show next track in track activity
2023-08-27 16:28:55 +05:30
Naveen
31ba1be783
Re-add repeat mode command 2023-08-27 12:44:59 +05:30
Naveen
1d6ab55d79
Use nullable controller var 2023-08-27 11:41:50 +05:30
Naveen
e1f4da1bf5
Use extras to store track object info in media item
As directly storing the track object as parcelable can cause crashes in other media controllers (e.g. com.android.bluetooth) on some devices
2023-08-27 11:29:20 +05:30
Naveen
0ebd9fb62b
Smooth scroll lazily
When there are thousands of of times in the queue, smoothScrollToPosition took forever.
2023-08-27 01:30:09 +05:30
Naveen
c306dd1747
Avoid flickering queue every time an item is selected 2023-08-26 23:58:48 +05:30
Naveen
9e67afa329
Customize repeat mode behaviour 2023-08-26 23:12:45 +05:30
Naveen
b6206b3487
Remove set repeat command 2023-08-26 21:04:30 +05:30
Naveen
1b8b2ea065
Remove unused import 2023-08-26 20:54:10 +05:30
Naveen Singh
9779f4fc30
Merge branch 'SimpleMobileTools:master' into media3 2023-08-26 17:46:57 +05:30
Naveen
6d780092e4
Use a single media controller instance
Also fixed ANRs happening throughout the app.
2023-08-26 00:49:38 +05:30
Naveen
6c804d2934
Update current track bar when player is prepared 2023-08-25 19:29:01 +05:30
Naveen
fa6f174497
Minor code improvement 2023-08-25 17:52:18 +05:30
Naveen
c95e448581
Expand the comment 2023-08-25 17:41:59 +05:30
Naveen
0b9ba7fc5a
Allow reordering items while shuffle mode is enabled
We should redo this once support for shuffle order is added to the Player interface (https://github.com/androidx/media/issues/325)
2023-08-25 17:34:51 +05:30
Naveen
a6818e4084
Convert player listener to an extension as well 2023-08-25 14:15:50 +05:30
J. Lavoie
ff95825ef7
Translated using Weblate (Italian)
Currently translated at 100.0% (77 of 77 strings)

Translation: Simple Mobile Tools/Simple Music Player
Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-music-player/it/
2023-08-23 15:49:03 +02:00
J. Lavoie
c9b01f338a
Translated using Weblate (French)
Currently translated at 100.0% (77 of 77 strings)

Translation: Simple Mobile Tools/Simple Music Player
Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-music-player/fr/
2023-08-23 15:49:03 +02:00
Naveen
7f26701507
Show toast on ForegroundServiceNotAllowedException 2023-08-23 16:34:32 +05:30
Naveen
e00eadc838
Check if equalizer is initialized before releasing 2023-08-22 22:37:30 +05:30
Naveen
d5dadfe189
Remove duplicated code 2023-08-22 22:37:02 +05:30
Naveen
da6b2822cb
Update playback info on prepare 2023-08-21 15:56:24 +05:30
Naveen
0686de36ba
Prepare player when widget is added 2023-08-21 15:35:01 +05:30
Naveen
0cd61de0f0
Minor code cleanup 2023-08-21 14:04:24 +05:30
Naveen
8e33d4099c
Minor code improvement 2023-08-21 09:11:09 +05:30
Naveen
1014d298a5
Reset sleep timer in background! 2023-08-21 09:02:50 +05:30
Naveen
def4625601
Minor readability improvement 2023-08-21 08:57:00 +05:30
Naveen
31e5a6c581
Remove unused constants 2023-08-21 08:53:16 +05:30
Naveen
016070bfaa
Properly handle repeat modes 2023-08-21 00:16:04 +05:30
Naveen
e46c39a33f
Toggle skip silence when gapless config is changed 2023-08-20 23:54:33 +05:30
Naveen
51321e33ca
Properly handle show filename config 2023-08-20 23:51:21 +05:30
Naveen
72316119ec
Refresh queue after show filename config is changed 2023-08-20 23:50:39 +05:30
Naveen
05495a58f6
Minor code improvement 2023-08-20 22:53:47 +05:30
Naveen
191dc56da0
Always init queue and prepare player at start
If there are no items in the queue, prepare player using all tracks
2023-08-20 22:40:46 +05:30
Naveen
88c874d8e8
Resume playback if it's paused 2023-08-20 21:41:24 +05:30
Naveen
0adf91cba3
Update comment 2023-08-20 21:04:51 +05:30
Naveen
45da77bd07
Move everything to playback package 2023-08-20 21:02:37 +05:30
Naveen
88b0b1aba4
Delete older music service 2023-08-20 21:01:53 +05:30
Naveen
709c2205e5
Setup equalizer 2023-08-20 20:59:43 +05:30
Naveen
2c0dad101c
Avoid flickering play/pause button 2023-08-20 19:01:48 +05:30
Naveen
cccf715e72
Create controller only when absolutely required 2023-08-20 18:48:59 +05:30
Naveen
0b6e9af7a6
Set media controller looper to main looper 2023-08-20 18:47:04 +05:30
Naveen
faadf3a4b9
Fix play next menu option logic 2023-08-20 15:04:47 +05:30
Naveen
8de58513b3
Call player methods on player thread 2023-08-20 12:58:19 +05:30
Naveen
481041564e
Code readability improvement 2023-08-20 12:10:50 +05:30
Naveen Singh
6fe7458e5f
Merge branch 'SimpleMobileTools:master' into media3 2023-08-19 23:06:20 +05:30
Naveen
7a421b8bb2
Remove some unused receivers and music service code 2023-08-19 23:05:31 +05:30
Naveen
c45edd3690
Setup everything using media controller api 2023-08-19 23:04:54 +05:30
Naveen
19ce6d2684
Remove no longer required logic from folders fragment 2023-08-19 23:01:42 +05:30
Naveen
ff22ada30c
Setup widget using media controller api 2023-08-19 23:00:02 +05:30
Naveen
585b053173
Setup adapters using media controller api
- Move common code between adapters to base music adapter class.
- Rewrite and move player related extensions to simple controller activity.
2023-08-19 22:59:19 +05:30
Naveen
02ad33ccaf
Setup queue activity using media controller api 2023-08-19 22:52:59 +05:30
Naveen
7d48a1fd47
Save track as tag in media item 2023-08-19 22:51:57 +05:30
Naveen
95f375571f
Move controller logic to a separate class 2023-08-19 22:31:32 +05:30
Naveen
e6cf02a023
Update track info on resume 2023-08-19 17:19:35 +05:30
Naveen
f268fa137c
Minor code improvement 2023-08-19 14:40:57 +05:30
Naveen
d4aef1c322
Expose current playback info in companion object 2023-08-19 14:27:42 +05:30
Naveen
a4a5938a38
Simplify controller logic and catch cancellation exception 2023-08-19 13:14:40 +05:30
en2sv
9a2c8fa9ad
Translated using Weblate (Swedish)
Currently translated at 100.0% (77 of 77 strings)

Translation: Simple Mobile Tools/Simple Music Player
Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-music-player/sv/
2023-08-14 17:56:38 +02:00
Kingproone
99341d6ddf
Translated using Weblate (Hungarian)
Currently translated at 100.0% (77 of 77 strings)

Translation: Simple Mobile Tools/Simple Music Player
Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-music-player/hu/
2023-08-14 17:56:38 +02:00
Naveen
493ab65fc3
Launch track activity on play 2023-08-13 20:54:24 +05:30
Naveen
44f0db3ad6
Fix security exception when initializing controller 2023-08-13 19:21:36 +05:30
Naveen
b8d3e50c26
Do player operations on a background thread
As per https://developer.android.com/guide/topics/media/exoplayer/hello-world#a-note-on-threading, using the main thread is suitable for majority of cases but it still slows down the main thread, in some cases significantly. This can lead to a non-responsive UI when doing player operations like `moveMediaItems()` with a lot of media items in the queue.
2023-08-13 16:10:30 +05:30
Naveen
a831487cb5
Add comment 2023-08-12 13:51:47 +05:30
Naveen
98379ed7f3
Minor readability improvement 2023-08-12 13:04:38 +05:30
Naveen
b06b728fdb
Rebuild media items when tab configuration changes 2023-08-12 13:01:09 +05:30
Naveen
6b00a23ba4
Add comment 2023-08-12 12:57:48 +05:30
Naveen
3e35a12038
Setup track activity using media controller api 2023-08-12 12:49:29 +05:30
Naveen
ee627f9b4f
Workaround silently caught exception 2023-08-12 11:43:15 +05:30
Naveen
3c909382bd
Move current track bar logic to base music activity 2023-08-12 08:20:44 +05:30
Naveen
2d5e336080
Minor readability improvement 2023-08-12 08:01:50 +05:30
Naveen
12df58b854
Handle repeat mode 2023-08-12 07:53:24 +05:30
Naveen
2262af4f14
Minor readability improvement 2023-08-11 17:23:52 +05:30
Naveen
f13d507aa3
Don't release media session when stopping service manually 2023-08-10 21:30:10 +05:30
Naveen
d589d4a0c0
Setup media controller in main activity 2023-08-10 21:25:01 +05:30
Naveen
e88e9806cb
Add support for system UI playback resumption 2023-08-10 20:26:55 +05:30
Naveen
f07ac19571
Add SimpleMusicActivity class 2023-08-10 19:15:08 +05:30
Naveen
40b1d7e1b8
Respect shuffle, player speed config 2023-08-10 19:13:46 +05:30
Naveen
d6a35d570d
Show notification when there's no storage permission 2023-08-10 13:34:09 +05:30
Naveen
6c2c354892
Avoid creating unnecessary renderers 2023-08-09 03:12:40 +05:30