Android Question How to getAudioSessionId from AudioRecord

KZero

Active Member
Licensed User
Longtime User
Hello,

I can get the audio session id from the streamer with this code


B4X:
Dim r As Reflector
        r.Target = streamer
        Dim AudioRecord As JavaObject = r.RunMethod("audioRecord")
        AudioID = AudioRecord.GetField("getAudioSessionId", Null)

but i'm using AudioRecord instead of Streamer and i can't get the same id
 
Solution
solved

B4X:
       Dim r As Reflector
        r.Target = AR
        Dim AudioRecord As JavaObject = r.GetField("ar")
        AudioID =   echo.RunMethod("create", Array(AudioRecord.RunMethod("getAudioSessionId", Null)))

KZero

Active Member
Licensed User
Longtime User
solved

B4X:
       Dim r As Reflector
        r.Target = AR
        Dim AudioRecord As JavaObject = r.GetField("ar")
        AudioID =   echo.RunMethod("create", Array(AudioRecord.RunMethod("getAudioSessionId", Null)))
 
Upvote 0
Solution
Top