You can configure your Android device to automatically turn off your music player after a specified period of time.
Android - Automatically turn off the music player
To openly turn off the music player in an Android device, open the music player app and tap on the Menu
key > Settings
. Next, tap on Music auto off
and select the number of minutes or hours after which the Music player will close:
Image: © Asif Islam - Shutterstock.com