i developed an Android application, it contains so much background services and it uses Medias unfortunately this app is draining the battery life fast i search the web but i didn't reach a good solution, i'm asking if possible how to put the app programmatically in battery saver it's a solution at least but i want that programmatically when the app is installed.
please give me some suggestions
That is not possible, sorry, at least in terms of the standard battery optimization list on Android 6.0+. If it were, then app app developers would add their apps to the list, and there would be no point in having the battery optimization list.