use of net.iGap.module.webrtc.CallerInfo in project iGap-Android by KianIranian-STDG.
the class CallManager method setupCallerInfo.
private void setupCallerInfo(long callPeerId) {
currentCallerInfo = new CallerInfo();
DbManager.getInstance().doRealmTask(realm -> {
RealmRegisteredInfo realmRegisteredInfo = realm.where(RealmRegisteredInfo.class).equalTo("id", callPeerId).findFirst();
if (realmRegisteredInfo != null) {
currentCallerInfo.name = realmRegisteredInfo.getDisplayName();
currentCallerInfo.color = realmRegisteredInfo.getColor();
}
currentCallerInfo.userId = callPeerId;
});
}
use of net.iGap.module.webrtc.CallerInfo in project iGap-Android by KianIranian-STDG.
the class FragmentMediaContainer method didCallChange.
private void didCallChange() {
needShowCall = CallManager.getInstance().isCallAlive();
if (needShowCall) {
CallerInfo callerInfo = CallManager.getInstance().getCurrentCallerInfo();
if (callerInfo != null) {
mediaContainer.setVisibility(GONE);
callContainer.setVisibility(VISIBLE);
callerName.setText(String.format("%s %s", callerInfo.name, callerInfo.lastName));
avatarHandler.getAvatar(new ParamWithInitBitmap(callerAvatar, callerInfo.userId).initBitmap(null).showMain());
// TODO: 5/1/21 These colors must change in future
final int from = Theme.getInstance().getCallStripColor(getContext());
final int to = Theme.getInstance().getCallStripColorBlue(getContext());
animateContainerColor(callContainer, from, to, 2000);
if (getVisibility() != VISIBLE) {
setVisibilityWithAnimation(this, needShowCall);
}
}
} else {
if (!MusicPlayer.isMusicPlyerEnable)
setVisibilityWithAnimation(this, false);
else {
setVisibility(VISIBLE);
mediaContainer.setVisibility(VISIBLE);
}
}
}
Aggregations