-1

I am making a code to change the volume through a seekbar, and I used this Code as a reference. However this way the volume of the whole device is changed, I need to change only the volume of the application. Is it possible to do that?

Thank you.

Will Tc
  • 3
  • 2
  • Volume controller is for System not for single app. What is your question exactly ? Explain – ADM May 13 '18 at 20:32
  • the question was exactly as I said, some way to only change the volume of the application. But since it is not possible, I will leave it that way. Thanks – Will Tc May 13 '18 at 21:11

1 Answers1

0

No, it is not possible to change your app only volume, you can only change the system volume. What you should do is when the seekbar value changes, save the volume in shared preferences and then when playing a sound, fetch that volume and use it in the media player.

Martin De Simone
  • 2,108
  • 3
  • 16
  • 30