AIMP Forum

AIMP for Android => Вопросы / Questions => Topic started by: mnh6 on October 14, 2021, 12:49:30

Title: [SOLVED] continue to play with display switched off
Post by: mnh6 on October 14, 2021, 12:49:30
When I press lock button and screen goes black Aimp continue to play only the current file. After that it stops playing. When I unlock the phone it starts playing again automatically.

How to make it play with display switched off? Is there an option for it?

I use 2.90 version on android 4.1.2.

Do new versions of Aimp have this option?
Title: Re: continue to play with display switched off
Post by: Artem on October 14, 2021, 13:53:15
Its related to energy saving setting of Android, not to player
Title: Re: continue to play with display switched off
Post by: mnh6 on October 14, 2021, 14:38:06
Even when I swith off battery saving it stops playing.

Other players, for example VLC can play with display switched off. Actually, phone saves more energy when player can play with display switched off.

Would it be possible to introduce this feature in Aimp?



Title: Re: continue to play with display switched off
Post by: Artem on October 14, 2021, 14:50:26
Modern version of player works fine in background.
Title: Re: continue to play with display switched off
Post by: mnh6 on October 14, 2021, 17:16:06
Can you please tell me, starting from which version Aimp has this feature and is it an option that needs to be enabled or default feature?

I see that different Aimp versions work on different Android versions, so I'd like to know what Android version I should look for in the first place.

I need to use this (along with other Aimp feature) for language learning, so it is crucial feature for me.
Title: Re: continue to play with display switched off
Post by: Artem on October 14, 2021, 20:05:17
It seems the wake lock API that provides an ability to prevent the device from deep sleep was introduced in Android 4.0, so it should work on your device too

Have you tried to set up the high CPU priority option in app settings in sound tab?
Title: Re: continue to play with display switched off
Post by: mnh6 on October 15, 2021, 11:37:13
I enabled CPU priority option. But this is not the factor that makes change.

I noticed that it plays with screen locked (black screen) only when option Sound → Mixing Settings →  Allow Cross-fading is off. When Allow Cross-fading is enabled Aimp doesn't play with screen locked.

So I have:
Allow Cross-fading: yes (enabled)
Cross-fade length, msec: 0
Pause between tracks, msec: 3000

And with these settings it doesn't work.

That's a pity because I wanted to use Aimp just because of its ability to set pause between tracks. It is very useful when I learn a language. I listen a sentence and repeat when there is a pause.

Would be great if you could make Aimp work with screen locked (black screen) even when Allow Cross-fading is enabled.

Edition:

Solution from here works.
https://www.aimp.ru/forum/index.php?topic=67783.msg416840#msg416840 (https://www.aimp.ru/forum/index.php?topic=67783.msg416840#msg416840)