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

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -