Skip to content

Migrate issue from 3.x.x to 4.0.0 beta #283

@ArcherEmiya05

Description

@ArcherEmiya05

Good day, we had a project that haven't touch in a long time and wanting to migrate from 3.4.2 to the latest SDK. We read the migration documentation but does not answer the questions below:

  1. How huge is the change we must perform? So far we only refactor the packages to io.agora.rtc2 then change some constants. We also updated the onRemoteAudioStateChanged callback from
@Override
    public void onRemoteAudioStateChanged(int uid, int state, int reason, int elapsed) {
        runOnUiThread(() -> {
            if (state == Constants.REMOTE_AUDIO_STATE_STOPPED && reason == Constants.REMOTE_AUDIO_REASON_REMOTE_MUTED)
                onRemoteUserMute(uid, true);
            if (state == Constants.REMOTE_AUDIO_STATE_DECODING && reason == Constants.REMOTE_AUDIO_REASON_REMOTE_UNMUTED)
                onRemoteUserMute(uid, false);
        });
    }

to this

@Override
    public void onRemoteAudioStateChanged(int uid, IRtcEngineEventHandler.REMOTE_AUDIO_STATE state, IRtcEngineEventHandler.REMOTE_AUDIO_STATE_REASON reason, int elapsed) {
        runOnUiThread(() -> {
            if (state == IRtcEngineEventHandler.REMOTE_AUDIO_STATE.REMOTE_AUDIO_STATE_STOPPED && reason == IRtcEngineEventHandler.REMOTE_AUDIO_STATE_REASON.REMOTE_AUDIO_REASON_REMOTE_MUTED)
                onRemoteUserMute(uid, true);
            if (state == IRtcEngineEventHandler.REMOTE_AUDIO_STATE.REMOTE_AUDIO_STATE_DECODING && reason == IRtcEngineEventHandler.REMOTE_AUDIO_STATE_REASON.REMOTE_AUDIO_REASON_REMOTE_UNMUTED)
                onRemoteUserMute(uid, false);
        });
    }

(Please let us know if the code above is not the equivalent of the first sample)

  1. What is the replacement for Constants.REMOTE_VIDEO_STATE_DECODING? We are using it in onRemoteVideoStateChanged.
  2. What is the replacement for Constants.USER_PRIORITY_NORMAL, we saw this USER_PRIORITY_NORANL but not sure if this is the equivalent and just a typographical error.
  3. What is the replacement for VideoCanvas.RENDER_MODE_FILL?
  4. What is the replacement for deprecated CreateRendererView or CreateTextureView and what is the diffrences between using SurfaceView and TextureView for RtcEngine?
  5. RtcEngine vs RtcEngineEx

Thanks you for the time and understanding!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions