I'm trying to implement features like Skype, but when I call Audio / Video, I can go to another screen, but the call will continue, and again I can return to the AV call screen. I am implementing this idea on the Android platform.
The problem I am facing is when I switch the screen, the video pauses, but the sound continues. Is there a way to make the video continue, even if I switch the screen.
I used the following code to start an Audio / Video conference from VideoChatActivity.java
app.startLocalMedia(new SingleAction<Exception>() {
@Override
public void invoke(Exception ex) {
if (ex == null) {
app.startSignalling(new SingleAction<String>() {
@Override
public void invoke(String ex) {
if (ex != null) {
alert("Some problem occured while establishing connection");
Logger.error("YES-Error at startSignalling " + ex);
}
}
}, webasyncURL);
Logger.error("YES-here-1.2");
app.startConference(iceLinkServerAddress, roomName, video, container, wheel, audioOnlyDefaultAvatar,
muteControlToggle, videoOnOffToggle, speakerToggle, videoChatActivity,
new SingleAction<Exception>() {
@Override
public void invoke(Exception ex) {
if (ex != null) {
alert("Some problem occured while initializing video call");
Logger.error("YES-Error at startconference " + ex.getLocalizedMessage());
}
}
});
} else {
Logger.error("YES-Error at startLocalMedia " + ex.getLocalizedMessage());
}
}
}, video, audio);
When I return to the previous action when doing an audio / video conference, I called the service in strat startLocalMedia.
Here is my CameraService.java
VideoChatActivity.app.startLocalMedia(new SingleAction<Exception>() {
@Override
public void invoke(Exception ex) {
if (ex == null) {
VideoChatActivity.app.startSignalling(new SingleAction<String>() {
@Override
public void invoke(String ex) {
if (ex != null) {
Logger.error("YES-Error at startSignalling " + ex);
}
}
}, VideoChatActivity.webasyncURL);
VideoChatActivity.app.startConference(VideoChatActivity.iceLinkServerAddress, VideoChatActivity.roomName, VideoChatActivity.video, VideoChatActivity.container, VideoChatActivity.wheel, VideoChatActivity.audioOnlyDefaultAvatar,
VideoChatActivity.muteControlToggle, VideoChatActivity.videoOnOffToggle, VideoChatActivity.speakerToggle, VideoChatActivity.videoChatActivity,
new SingleAction<Exception>() {
@Override
public void invoke(Exception ex) {
if (ex != null) {
Logger.error("YES-Error at startconference " + ex.getLocalizedMessage());
}
}
});
} else {
Logger.error("YES-Error at startLocalMedia " + ex.getLocalizedMessage());
}
}
}, VideoChatActivity.video, VideoChatActivity.audio);
How to implement this scenario?