Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions One-to-One-Video/Agora-Android-Tutorial-1to1/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 28

compileSdk 35
namespace "io.agora.tutorials1v1vcall"
defaultConfig {
applicationId "io.agora.tutorials1v1vcall"
minSdkVersion 16
targetSdkVersion 28
minSdkVersion 35
targetSdkVersion 35
versionCode 2
versionName "1.1"
ndk.abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86'
}

buildTypes {
Expand All @@ -28,6 +29,7 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar']) // DO NOT CHANGE, CI may needs it when packaging
implementation fileTree(dir: 'libs', include: ['*.aar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation project(path: ':logger')
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<activity
android:name=".VideoChatViewActivity"
android:screenOrientation="sensorPortrait"
android:exported="true"
android:theme="@style/FullScreenVideoTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
import android.widget.RelativeLayout;
import android.widget.Toast;

import io.agora.rtc.IRtcEngineEventHandler;
import io.agora.rtc.RtcEngine;
import io.agora.rtc.video.VideoCanvas;
import io.agora.rtc.video.VideoEncoderConfiguration;
import io.agora.rtc2.IRtcEngineEventHandler;
import io.agora.rtc2.RtcEngine;
import io.agora.rtc2.video.VideoCanvas;
import io.agora.rtc2.video.VideoEncoderConfiguration;
import io.agora.uikit.logger.LoggerRecyclerView;

public class VideoChatViewActivity extends AppCompatActivity {
Expand Down Expand Up @@ -143,7 +143,8 @@ private void setupRemoteVideo(int uid) {
The video display view must be created using this method instead of directly
calling SurfaceView.
*/
SurfaceView view = RtcEngine.CreateRendererView(getBaseContext());
// SurfaceView view = RtcEngine.CreateRendererView(getBaseContext());
SurfaceView view = new SurfaceView(getBaseContext());
view.setZOrderMediaOverlay(parent == mLocalContainer);
parent.addView(view);
mRemoteVideo = new VideoCanvas(view, VideoCanvas.RENDER_MODE_HIDDEN, uid);
Expand Down Expand Up @@ -272,13 +273,17 @@ private void setupLocalVideo() {
// Our server will assign one and return the uid via the event
// handler callback function (onJoinChannelSuccess) after
// joining the channel successfully.
SurfaceView view = RtcEngine.CreateRendererView(getBaseContext());
// SurfaceView view = RtcEngine.CreateRendererView(getBaseContext());
SurfaceView view = new SurfaceView(getBaseContext());
view.setZOrderMediaOverlay(true);
mLocalContainer.addView(view);
// Initializes the local video view.
// RENDER_MODE_HIDDEN: Uniformly scale the video until it fills the visible boundaries. One dimension of the video may have clipped contents.
mLocalVideo = new VideoCanvas(view, VideoCanvas.RENDER_MODE_HIDDEN, 0);
mRtcEngine.setupLocalVideo(mLocalVideo);

// Start local preview.
mRtcEngine.startPreview();
}

private void joinChannel() {
Expand Down
2 changes: 1 addition & 1 deletion One-to-One-Video/Agora-Android-Tutorial-1to1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.android.tools.build:gradle:8.8.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Jul 14 14:32:48 CST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 28

compileSdk 35
namespace "io.agora.uikit.logger"
defaultConfig {
minSdkVersion 16
targetSdkVersion 28
minSdkVersion 35
targetSdkVersion 35
versionCode 1
versionName "1.0"

Expand Down