Build Instagram LIVE into Android apps using Agora SDK and Socket.io

Create live streaming just like Instagram with the same layout and working, using Agora SDK and Socket.io

TL;DR

Screen 1

Instagram Live first screen

Screen 2

ConstraintLayout (start)

MaterialCardView (start)
ConstraintLayout (start)
ImageView (userpicture)
ConstraintLayout (end)
MaterialCardView (end)

EditText (title)

TextView (live message)

Button (for go live)
ConstraintLayout (end)
private BottomSheetDialog mGoLiveBottomSheet;
private void showGoLiveBottomSheet() {
mGoLiveBottomSheet = new BottomSheetDialog(this, R.style.BottomSheet);
View view = getLayoutInflater().inflate(R.layout.bottom_sheet_go_live, null);
mGoLiveBottomSheet.setContentView(view);
... //define other view elements heregoLiveButton.setOnClickListener(
v -> {
... // call to server
}
);
mGoLiveBottomSheet.show();
}

Screen 3

implementation 'com.github.agorabuilder:native-full-sdk:3.4.1'implementation('io.socket:socket.io-client:0.8.3') {
exclude group: 'org.json', module: 'json'
}
import io.agora.rtc.Constants;
import io.agora.rtc.IRtcEngineEventHandler;
import io.agora.rtc.RtcEngine;
import io.agora.rtc.video.VideoCanvas;
import io.agora.rtc.video.VideoEncoderConfiguration;
import io.socket.client.IO;
import io.socket.client.Socket;
import io.socket.emitter.Emitter;

Screen 4–5 -6

Software Engineer | Ex-DSC Lead | Reader & Writer | Researcher | LinkedIn/Github/GitLab/FB/IG: thenishchalraj

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store