M megaB4x Member Licensed User Longtime User May 31, 2016 #1 Hi all, Is it possible to detect if user is listening an audio or watching a video, doesn't matter whether local or streaming media, as long as we know user is listening or watching some sort of media? Thanks
Hi all, Is it possible to detect if user is listening an audio or watching a video, doesn't matter whether local or streaming media, as long as we know user is listening or watching some sort of media? Thanks
Erel B4X founder Staff member Licensed User Longtime User Jun 1, 2016 #2 You can use this code: Code: Copy Sub IsOtherAudioPlaying As Boolean Dim no As NativeObject Return no.Initialize("AVAudioSession").RunMethod("sharedInstance", Null).RunMethod("isOtherAudioPlaying", Null).AsBoolean End Sub Upvote 0
You can use this code: Code: Copy Sub IsOtherAudioPlaying As Boolean Dim no As NativeObject Return no.Initialize("AVAudioSession").RunMethod("sharedInstance", Null).RunMethod("isOtherAudioPlaying", Null).AsBoolean End Sub