Android adjustVolume not working on all phones -


im having problems audiomanager android on devices. can adjust volume audimanager.adjuststreamvolume() (tested on samsung galaxy s7 edge android 7 nougat) , works same code doesnt work on devices huawei on marshmallow 6.0. me please??

/** system **/             {                 if(audiomanager.getstreamvolume(audiomanager.stream_system) > profile.gettime().getsystemvol()) {                     audiomanager.adjuststreamvolume(audiomanager.stream_system, audiomanager.adjust_lower, 0);                 }                 else if(audiomanager.getstreamvolume(audiomanager.stream_system) < profile.gettime().getsystemvol()) {                     audiomanager.adjuststreamvolume(audiomanager.stream_system, audiomanager.adjust_raise, 0);                 }             }while(audiomanager.getstreamvolume(audiomanager.stream_system) != profile.gettime().getsystemvol()); 


Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -