Android Question new special library request for professional multimedia apps support

Dear elite developers of this forum?
Spotify application is able to stop The music, if Whatsapp, Facebook Messenger, Skype receive An call. Does somebody of us think, that it would be possible to create new .jar library for B4A, which would be capable to detect those actions? So every one who would want to develop AN multimedia app in B4A could use similar feature for detecting apps incoming calls, like Spotify developers can?
Or it is rather impossible, because such ffeatures can be only established, if powerful companies are negotiaating between each others so it is very unlikely, that somebody would be able to develop such library for B4A?
Library would be able to legally monitor Skype, Whats app, Facebook Messenger, Messenger LIte, if those apps have taken an incoming audio or video call.
I do not know, how advanced Spotify developers could do such monitoring without having accessibility services.
Who of us think, that it would be possible to create such library in Java language or in Kotlin, so B4A could call it?

Or it is really only possible between big commercial companies, who has debatet between each others so developer can not make such library if such developer is not engaged in busyness negotiations between Facebook, Microsoft ETC?
I have written kind E-mail to Microsoft, how to detect, if Skype receive AN incoming call, if Microsoft has made some Skype APi exports to detect such activity, so Internet radio player could stop playback. Unfortunately, I have not got response from Microsoft.
So I Am wondering, Why Spotify developers are able to construct such algorithms for detecting such external apps activity.
 

MicroDrie

Well-Known Member
Licensed User
Longtime User
Perhaps this code works with the android.media.AudioManager class:
Detect audio calls:
'   --- Mode = 0, Normal audio mode: not ringing and no call established.
'   --- Mode = 1, Ringing audio mode. An incoming is being signaled.
'   --- Mode = 2, In call audio mode. A telephony call is established.
'   --- Mode = 3, In communication audio mode. An audio/video chat or VoIP call is established.
Sub CallInProgress As Boolean
    Dim r As Reflector, flag As Boolean
    r.Target = r.GetContext
    r.Target = r.RunMethod2("getSystemService", "audio", "java.lang.String")
    Dim mode As Int
    mode=r.RunMethod("getMode")
    If mode<>0 Then flag=True Else flag=False
    Return flag
End Sub
 
Upvote 0
Top