Record in Android Native

Hello, I’m trying to figure out how to record the video. Can you check if my code is correct? Also, I need to know the best place to call these functions. Thanks!!!

public void startRecording() {
Map<String, String> startRecording = new HashMap<>();
startRecording.put(“id”, session.getId());
this.ID_RECORDING_STARTED.set(this.sendJson(JsonConstants.RECORDING_STARTED, startRecording));

public void stopRecording() {
Map<String, String> stopRecording = new HashMap<>();
stopRecording.put(“id”, session.getId());
stopRecording.put(“reason”,“Test Reason”);
this.ID_RECORDING_STOPPED.set(this.sendJson(JsonConstants.RECORDING_STOPPED, stopRecording));

Recordings are managed through REST API. That must be done in your application server, not in your applciation client.