package Ġcom . native dev ps . support . utility . device . audio Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . media . Audio Manager Ċ Ċ object ĠDevice Audio Ġ{ ĊĠĠĠ Ġfun ĠContext . getCurrent Volume (): ĠInt Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġaudio Manager Ġ= Ġget System Service ( Context . AUDIO _ SERVICE ) Ġas ĠAudio Manager ĊĠĠĠĠĠĠĠ Ġval Ġvolume Level : ĠInt Ġ= Ġaudio Manager . get Stream Volume ( Audio Manager . STREAM _ M US IC ) ĊĠĠĠĠĠĠĠ Ġval Ġmax Volume Level : ĠInt Ġ= Ġaudio Manager . get Stream Max Volume ( Audio Manager . STREAM _ M US IC ) ĊĠĠĠĠĠĠĠ Ġreturn Ġ( volume Level . toFloat () Ġ/ Ġmax Volume Level Ġ* Ġ 1 0 0 ). toInt () ĊĠĠĠ Ġ} Ċ }