Skip to content
Advertisement

How to implement video with connectionservice

I want to implement a videochat using the system app via connectionservice. https://developer.android.com/reference/android/telecom/ConnectionService.html. Unfortunately i can not find any example or tutorial how to do it. Here is what i have done:

Registering the service:

JavaScript

Placing the call:

JavaScript

My ConnectionService get called and

JavaScript

i place my videoprovider into the connection the system asks for. The phone activity appears and showing me the call with the little camera sign, so the system knows what i want to do. I now somehow expect that the videoprovider methods get called from the system to give me the surfaces for video and so on but no method get called. Does somebody know what am i doing wrong or know where to find a good example of this topic.

Advertisement

Answer

I simply forgot to add conn.setVideoState(VideoProfile.STATE_BIDIRECTIONAL); to my connection not only on placeCall. Now the VideoProvider is accessed as expected

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement