Skip to content

Commit 18785be

Browse files
committed
Merge branch 'dev/3.6.200' of github.com:AgoraIO/API-Examples into dev/3.6.200
2 parents 840ac0f + 66ec022 commit 18785be

71 files changed

Lines changed: 800 additions & 1176 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Android/APIExample/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ Test/
2020
# sdk files
2121
*.so
2222
agora-rtc-sdk.jar
23+
/release

Android/APIExample/agora-simple-filter/src/main/cpp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ cmake_minimum_required(VERSION 3.4.1)
88
project(agora-simple-filter)
99

1010
#link agora so
11-
set(agora-lib-so ${PROJECT_SOURCE_DIR}/../agoraLibs/${CMAKE_ANDROID_ARCH_ABI}/libagora-rtc-sdk-jni.so)
11+
set(agora-lib-so ${PROJECT_SOURCE_DIR}/../jniLibs/${CMAKE_ANDROID_ARCH_ABI}/libagora-rtc-sdk-jni.so)
1212
link_libraries(${agora-lib-so})
1313

1414
#link opencv so
Binary file not shown.
Binary file not shown.

Android/APIExample/app/src/main/java/io/agora/api/example/ExampleActivity.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import io.agora.api.example.examples.advanced.ProcessRawData;
2828
import io.agora.api.example.examples.advanced.PushExternalVideo;
2929
import io.agora.api.example.examples.advanced.SendDataStream;
30-
import io.agora.api.example.examples.advanced.SetVideoProfile;
3130
import io.agora.api.example.examples.advanced.SetAudioProfile;
3231
import io.agora.api.example.examples.advanced.SimpleAudioExtension;
3332
import io.agora.api.example.examples.advanced.VideoQuickSwitch;
@@ -129,9 +128,6 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
129128
case R.id.action_mainFragment_to_hostacrosschannel:
130129
fragment = new HostAcrossChannel();
131130
break;
132-
case R.id.action_mainFragment_to_set_video_profile:
133-
fragment = new SetVideoProfile();
134-
break;
135131
case R.id.action_mainFragment_to_channel_encryption:
136132
fragment = new ChannelEncryption();
137133
break;

Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/AdjustVolume.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
6969
mute.setOnClickListener(this);
7070
speaker = view.findViewById(R.id.btn_speaker);
7171
speaker.setOnClickListener(this);
72+
speaker.setActivated(true);
7273
record = view.findViewById(R.id.recordingVol);
7374
playout = view.findViewById(R.id.playoutVol);
7475
inear = view.findViewById(R.id.inEarMonitorVol);
@@ -221,9 +222,9 @@ public void onClick(View v) {
221222
engine.muteLocalAudioStream(mute.isActivated());
222223
} else if (v.getId() == R.id.btn_speaker) {
223224
speaker.setActivated(!speaker.isActivated());
224-
speaker.setText(getString(speaker.isActivated() ? R.string.earpiece : R.string.speaker));
225+
speaker.setText(getString(speaker.isActivated() ? R.string.speaker : R.string.earpiece));
225226
/**Turn off / on the speaker and change the audio playback route.*/
226-
engine.setEnableSpeakerphone(speaker.isActivated());
227+
engine.setDefaultAudioRoutetoSpeakerphone(speaker.isActivated());
227228
}
228229
}
229230

Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/ChannelEncryption.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ private void joinChannel(String channelId)
216216
}
217217

218218
// Create render view by RtcEngine
219-
SurfaceView surfaceView = RtcEngine.CreateRendererView(context);
219+
SurfaceView surfaceView = new SurfaceView(context);
220220
// Local video is on the top
221221
surfaceView.setZOrderMediaOverlay(true);
222222
if(fl_local.getChildCount() > 0)
@@ -435,7 +435,7 @@ public void onUserJoined(int uid, int elapsed)
435435
fl_remote.removeAllViews();
436436
}
437437
// Create render view by RtcEngine
438-
surfaceView = RtcEngine.CreateRendererView(context);
438+
surfaceView = new SurfaceView(context);
439439
surfaceView.setZOrderMediaOverlay(true);
440440
surfaceView.setZOrderOnTop(true);
441441
// Add to the remote container

Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/CustomRemoteVideoRender.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ private void joinChannel(String channelId) {
211211
}
212212

213213
// Create render view by RtcEngine
214-
SurfaceView surfaceView = RtcEngine.CreateRendererView(context);
214+
SurfaceView surfaceView = new SurfaceView(context);
215215
// Local video is on the top
216216
surfaceView.setZOrderMediaOverlay(true);
217217
// Add to the local container
@@ -223,7 +223,6 @@ private void joinChannel(String channelId) {
223223
engine.setupLocalVideo(new VideoCanvas(surfaceView, RENDER_MODE_HIDDEN, 0));
224224
/**Set up to play remote sound with receiver*/
225225
engine.setDefaultAudioRoutetoSpeakerphone(true);
226-
engine.setEnableSpeakerphone(true);
227226

228227
engine.registerVideoFrameObserver(videoFrameObserver);
229228
/**In the demo, the default is to enter as the anchor.*/

Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/HostAcrossChannel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ private void joinChannel(String channelId)
228228
}
229229

230230
// Create render view by RtcEngine
231-
SurfaceView surfaceView = RtcEngine.CreateRendererView(context);
231+
SurfaceView surfaceView = new SurfaceView(context);
232232
if(fl_local.getChildCount() > 0)
233233
{
234234
fl_local.removeAllViews();
@@ -437,7 +437,7 @@ public void onUserJoined(int uid, int elapsed)
437437
fl_remote.removeAllViews();
438438
}
439439
// Create render view by RtcEngine
440-
surfaceView = RtcEngine.CreateRendererView(context);
440+
surfaceView = new SurfaceView(context);
441441
surfaceView.setZOrderMediaOverlay(true);
442442
// Add to the remote container
443443
fl_remote.addView(surfaceView, new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));

Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/InCallReport.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ private void joinChannel(String channelId)
217217
}
218218

219219
// Create render view by RtcEngine
220-
SurfaceView surfaceView = RtcEngine.CreateRendererView(context);
220+
SurfaceView surfaceView = new SurfaceView(context);
221221
if(fl_local.getChildCount() > 0)
222222
{
223223
fl_local.removeAllViews();
@@ -426,7 +426,7 @@ public void onUserJoined(int uid, int elapsed)
426426
fl_remote.removeAllViews();
427427
}
428428
// Create render view by RtcEngine
429-
surfaceView = RtcEngine.CreateRendererView(context);
429+
surfaceView = new SurfaceView(context);
430430
surfaceView.setZOrderMediaOverlay(true);
431431
// Add to the remote container
432432
fl_remote.addView(surfaceView, new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));

0 commit comments

Comments
 (0)