How to increase volume android -


i'm trying increase/decrease volume on nexus player. made sample app works on phone , other android devices in house. not nexus player. after reading on guess google has blocked how. there methods using root enable this. here's current code use on phone.

@override protected void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.activity_main);     textview = (textview)findviewbyid(r.id.textview);     volumedown = (button)findviewbyid(r.id.volumedown);     volumeup= (button)findviewbyid(r.id.volumeup);     audiomanager = (audiomanager)getsystemservice(context.audio_service);     currentvolume = audiomanager.getstreamvolume(audiomanager.stream_music);      volumeup.setonclicklistener(new view.onclicklistener() {         @override         public void onclick(view v) {         /* audiomanager.adjuststreamvolume(audiomanager.stream_music,                  audiomanager.adjust_raise, 0);*/             audiomanager.adjustvolume(audiomanager.adjust_raise,audiomanager.flag_play_sound);          }     });      volumedown.setonclicklistener(new view.onclicklistener() {         @override         public void onclick(view v) {             log.d("helloworld", "hello" + audiomanager.getmode())  ;             audiomanager.adjustvolume(audiomanager.adjust_lower, audiomanager.flag_play_sound);          }     }); } 


Comments

Popular posts from this blog

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -