Skip to content

Commit 0ec9b44

Browse files
xgfd3zhaoyongqiangcleven1sync2giteeDengQiming-private
authored
Dev/4.3.0 (#365)
* update code style * [Android]add custom stream encrypt case. * [Android]update README links. * Dev/oc test (#353) * ci adapting objective-c * add objective-c APIExample project * add export ipa * modify ci script * modify OC path * .. * .. * update SDK version to 4.2.2 * .. * fix rtmp push bug * fix ios 12.0 version runing bug * fix fusion cdn ui bug * fix fusion cdn change rtc bug * fix fusion cdn ui bug * add OC Moudle README * modify README --------- Co-authored-by: zhaoyongqiang <zhaoyongqiang@agora.io> * Dev/4.2.3 (#354) * add third player moudle * add Audio Waveform Moudle * Fixed an issue where remote users joined player pause when rtc and player were used at the same time * fix ui issue * update content inspect config * add Feature Available On Device * add take snapshot ex * update beautyAPI version to 1.0.3 * add Feature Available On Device * add snapshot ex * fix snapshot remote bug * [Android]Add AudioRouterPlayer case. * [Android]Add AudioWaveform case. * [Android][Audio]add AudioWaveform case. * [Android]adjust content inspect case. * [Android]Add isFeatureAvailableOnDevice api in VideoProcessExtension. * [Android]Add takesnapshotex for JoinMultipleChannel. * [Android]update beauty api to 1.0.3 and etc. * [Windows]add snapshot for MultiChannel. * [Windows]fix snapshot bug. * fix oc crate stream data bug * fix swift create stream data bug * [Android]fix remote render error when rejoining channel(NMS-15581). * [Android]perfect PushExternalVideoYUV case. * add file sharing key * fix title * fix multi channel bug * fix conent inspect bug * [Windows]fix media player crash. * [Android]perfect MultiVideoSourceTracks case. * fix input token crash bug * fix input token crash bug * [Android]Update readme. (#355) * [Android]add 4K 60fps h265. (#356) * [Android]fix ui bug. * [Android]fix render bug(CSD-59845). * Fix the issue of no sound during AVPlayer playback * [Android]add cases of enableVideoImageSource and setAINSMode api and etc. * [Android]add setAINSMode api case and etc. * add video image push * add AINS Mode * iOS Add AINS Mode * ios add video image push * [Windows]add enableVideoImageSource and setAINSMode api case. * [MacOS]fix audio recording path bug. * fix startAudioRecording path bug * fix audio session change issue * fix video image source issue * .. * fix exit screen leave channel issue * screen shareing auto close system interface * [Android]update rtc verstion and etc. * [Windows]Update rtc verstion. * update SDK version to 4.2.3 --------- Co-authored-by: zhaoyongqiang <zhaoyongqiang@agora.io> * Update setLocalAccessPoint note and etc. (#358) * Add gitee sync script. * Update gitee sync script. * Test gitee sync. * Feat/code style android (#366) * [Android]add check style config. * [Android]update check style config. * [Android]update codes with checked style. * [Android]Adapt to 4.3.0 and add audio stream selector for media player. * [Android]Add face capture case and etc. * [Android][Audio]Adapt to 4.3.0 rtc sdk. * [Android]Update rtc version. * update sdk 4.3.0 * iOS update SDK 4.3.0 * add multi audio track case * add face capture case * [Windows]Adapt to 4.3.0, add audio stream selector for mediaplayer and etc. * update sdk version to 4.3.0 * [Windows]add face capture case. * [Android]update cpp include. * [Android]Adapt to 4.3.0 latest version. * [Android]update cpp include. * [Android][Audio]Adapt to 4.3.0 latest version. * [windows]adapte to 4.3.0 latest version and fix bugs. * fix rawVideo takesnpe crash bug * fix rawVideo snap shot bug * fix medipa publish streaming bug * [Android]try to fix NMS-17758 and etc. * [Android]fix bugs. * [Android]add background recording function for JoinChannelAudio case(ADC-4803). * [Android][Audio]add background recording function for JoinChannelAudio case(ADC-4803) and perfect case. * [Android]Adapt to 4.3.0 latest version. * [Android]fix custom audio render api call problem(DEVEX-65). * fix multiChannel take snapshot bug * fix custom video render bug * update startEchoTest * [Windows] fix windows screen share bug. * update sdk document address * [Windows]Add audio echo test user case. * [Android]Perfect basic video case and fix some bugs. * [Android]Perfect rtmp streaming case. * Add Camera Test Fuction * [Android]Fix auido route bug. * [Android]Add video echo test. * [Android]fix echo test bug. * [Android]perfect echo test example. * add rtc connection state callback * fix MediaPlayer publish stream UI bug * fix custom capture Video push bug * Fix the issue of self rendering on the Inter chip * [windows]fix spatial audio zone bug. * fix custom video push bug * update precall test bug * [Windows]add video echo test api example. * [Windows]add basic join channel video by token example. * [Windows]fix spatial audio zone bug(NMS-18784) * update start echo test * update spatial audio method * [Android]fix audio problem. * [Android][Audio]fix audio problem. * update spatial audio remote user position * Optimize the code format * [Android]fix NMS-19192/NMS-19194. * [Android][Audio]fix NMS-19192. * adapter video extension for v430 (#370) Co-authored-by: Qiming Deng <dengqiming@agora.io> * update rtc sdk pod version to 4.3.0 * [windows]Update sdk download url. --------- Co-authored-by: zhaoyongqiang <zhaoyongqiang@agora.io> Co-authored-by: cleven <543069316@qq.com> Co-authored-by: sync2gitee <sync2gitee@example.com> Co-authored-by: DengQiming-private <71064074+DengQiming-private@users.noreply.github.com> Co-authored-by: Qiming Deng <dengqiming@agora.io>
1 parent 8e0365b commit 0ec9b44

File tree

453 files changed

+42673
-7079
lines changed

Some content is hidden

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

453 files changed

+42673
-7079
lines changed

.githooks/pre-commit

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/sh
2+
#
3+
# An example hook script to verify what is about to be committed.
4+
# Called by "git commit" with no arguments. The hook should
5+
# exit with non-zero status after issuing an appropriate message if
6+
# it wants to stop the commit.
7+
#
8+
# To enable this hook, rename this file to "pre-commit".
9+
10+
if git rev-parse --verify HEAD >/dev/null 2>&1
11+
then
12+
against=HEAD
13+
else
14+
# Initial commit: diff against an empty tree object
15+
against=$(git hash-object -t tree /dev/null)
16+
fi
17+
18+
SCRIPT_DIR=$(dirname "$0")
19+
SCRIPT_ABS_PATH=`cd "$SCRIPT_DIR"; pwd`
20+
21+
22+
ANDROID_DIFF_FILES=`git diff --cached --name-only --diff-filter=ACM -- '*' | grep 'Android'`
23+
if [[ "$ANDROID_DIFF_FILES" != "" ]]
24+
then
25+
cd Android/APIExample
26+
echo "precommit >> current paht = $(pwd), diff files = $ANDROID_DIFF_FILES"
27+
./gradlew -Dorg.gradle.project.commit_diff_files="$ANDROID_DIFF_FILES" checkstyle detekt
28+
if [ $? -eq 0 ]; then
29+
echo "precommit >> checkstyle detekt OK."
30+
else
31+
echo "precommit >> checkstyle detekt Failed."
32+
exit 1
33+
fi
34+
else
35+
echo "precommit >> No changing android files."
36+
fi
37+
38+

.github/workflows/gitee-sync.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ jobs:
2525
dst_token: ${{ secrets.GITEE_PRIVATE_TOKEN }}
2626
force_update: true
2727
account_type: org
28-
shell_path: ./.github/workflows/gitee-sync-shell.sh
28+
shell_path: ./.github/workflows/gitee-sync-shell.sh

Android/APIExample-Audio/app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ dependencies {
4848
implementation fileTree(dir: "${localSdkPath}", include: ['*.jar', '*.aar'])
4949
}
5050
else{
51-
def agora_sdk_version = "4.2.6"
51+
def agora_sdk_version = "4.3.0"
5252
// case 1: full single lib with voice only
5353
implementation "io.agora.rtc:voice-sdk:${agora_sdk_version}"
5454
// case 2: partial libs with voice only

Android/APIExample-Audio/app/src/main/AndroidManifest.xml

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313

1414
<permission-group android:name="io.agora.api.example.audio.andpermission"/>
1515

16+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
17+
<!-- <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />-->
18+
1619
<application
1720
android:name=".MainApplication"
1821
android:allowBackup="true"
@@ -43,6 +46,9 @@
4346
android:windowSoftInputMode="stateAlwaysHidden"
4447
android:screenOrientation="portrait" />
4548

49+
<service android:name=".examples.basic.JoinChannelAudio$LocalRecordingService"
50+
android:foregroundServiceType="microphone"/>
51+
4652
</application>
4753

4854
</manifest>

Android/APIExample-Audio/app/src/main/java/io/agora/api/example/common/BaseFragment.java

+97-24
Original file line numberDiff line numberDiff line change
@@ -4,78 +4,147 @@
44
import android.os.Bundle;
55
import android.os.Handler;
66
import android.os.Looper;
7-
import android.view.Menu;
7+
import android.text.TextUtils;
8+
import android.view.View;
89
import android.widget.Toast;
910

11+
import androidx.activity.OnBackPressedCallback;
1012
import androidx.annotation.NonNull;
1113
import androidx.annotation.Nullable;
1214
import androidx.appcompat.app.AlertDialog;
1315
import androidx.fragment.app.Fragment;
16+
import androidx.navigation.Navigation;
1417

15-
import io.agora.api.example.R;
16-
17-
public class BaseFragment extends Fragment
18-
{
18+
/**
19+
* The type Base fragment.
20+
*/
21+
public class BaseFragment extends Fragment {
22+
/**
23+
* The Handler.
24+
*/
1925
protected Handler handler;
2026
private AlertDialog mAlertDialog;
27+
private String mAlertMessage;
28+
private final OnBackPressedCallback onBackPressedCallback = new OnBackPressedCallback(false) {
29+
@Override
30+
public void handleOnBackPressed() {
31+
onBackPressed();
32+
}
33+
};
2134

2235
@Override
23-
public void onCreate(@Nullable Bundle savedInstanceState)
24-
{
36+
public void onCreate(@Nullable Bundle savedInstanceState) {
2537
super.onCreate(savedInstanceState);
2638
handler = new Handler(Looper.getMainLooper());
39+
requireActivity().getOnBackPressedDispatcher().addCallback(onBackPressedCallback);
40+
}
41+
42+
@Override
43+
public void onAttach(@NonNull Context context) {
44+
super.onAttach(context);
45+
onBackPressedCallback.setEnabled(true);
46+
}
47+
48+
@Override
49+
public void onDetach() {
50+
super.onDetach();
51+
onBackPressedCallback.setEnabled(false);
2752
}
2853

54+
/**
55+
* Show alert.
56+
*
57+
* @param message the message
58+
*/
2959
protected void showAlert(String message) {
60+
this.showAlert(message, true);
61+
}
3062

63+
/**
64+
* Show alert.
65+
*
66+
* @param message the message
67+
* @param showRepeatMsg the show repeat msg
68+
*/
69+
protected void showAlert(String message, boolean showRepeatMsg) {
3170
runOnUIThread(() -> {
3271
Context context = getContext();
33-
if(context == null){
72+
if (context == null) {
3473
return;
3574
}
3675
if (mAlertDialog == null) {
3776
mAlertDialog = new AlertDialog.Builder(context).setTitle("Tips")
3877
.setPositiveButton("OK", (dialog, which) -> dialog.dismiss())
3978
.create();
4079
}
80+
if (!showRepeatMsg && !TextUtils.isEmpty(mAlertMessage) && mAlertMessage.equals(message)) {
81+
return;
82+
}
83+
mAlertMessage = message;
4184
mAlertDialog.setMessage(message);
4285
mAlertDialog.show();
4386
});
4487
}
4588

46-
protected final void showLongToast(final String msg)
47-
{
89+
/**
90+
* Reset alert.
91+
*/
92+
protected void resetAlert() {
93+
runOnUIThread(() -> mAlertMessage = "");
94+
}
95+
96+
/**
97+
* Show long toast.
98+
*
99+
* @param msg the msg
100+
*/
101+
protected final void showLongToast(final String msg) {
48102
runOnUIThread(() -> {
49103
Context context = getContext();
50-
if(context == null){
104+
if (context == null) {
51105
return;
52106
}
53107
Toast.makeText(context, msg, Toast.LENGTH_LONG).show();
54108
});
55109
}
56110

57-
protected final void showShortToast(final String msg)
58-
{
111+
/**
112+
* Show short toast.
113+
*
114+
* @param msg the msg
115+
*/
116+
protected final void showShortToast(final String msg) {
59117
runOnUIThread(() -> {
60118
Context context = getContext();
61-
if(context == null){
119+
if (context == null) {
62120
return;
63121
}
64122
Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();
65123
});
66124
}
67125

68-
protected final void runOnUIThread(Runnable runnable){
126+
/**
127+
* Run on ui thread.
128+
*
129+
* @param runnable the runnable
130+
*/
131+
protected final void runOnUIThread(Runnable runnable) {
69132
this.runOnUIThread(runnable, 0);
70133
}
71134

72-
protected final void runOnUIThread(Runnable runnable, long delay){
73-
if(handler != null && runnable != null && getContext() != null){
135+
/**
136+
* Run on ui thread.
137+
*
138+
* @param runnable the runnable
139+
* @param delay the delay
140+
*/
141+
protected final void runOnUIThread(Runnable runnable, long delay) {
142+
if (handler != null && runnable != null && getContext() != null) {
74143
if (delay <= 0 && handler.getLooper().getThread() == Thread.currentThread()) {
75144
runnable.run();
76-
}else{
145+
} else {
77146
handler.postDelayed(() -> {
78-
if(getContext() != null){
147+
if (getContext() != null) {
79148
runnable.run();
80149
}
81150
}, delay);
@@ -87,15 +156,19 @@ protected final void runOnUIThread(Runnable runnable, long delay){
87156
public void onDestroy() {
88157
super.onDestroy();
89158
handler.removeCallbacksAndMessages(null);
90-
if(mAlertDialog != null){
159+
if (mAlertDialog != null) {
91160
mAlertDialog.dismiss();
92161
mAlertDialog = null;
93162
}
94163
}
95164

96-
@Override
97-
public void onPrepareOptionsMenu(@NonNull Menu menu) {
98-
super.onPrepareOptionsMenu(menu);
99-
menu.setGroupVisible(R.id.main_setting_group, false);
165+
/**
166+
* On back pressed.
167+
*/
168+
protected void onBackPressed() {
169+
View view = getView();
170+
if (view != null) {
171+
Navigation.findNavController(view).navigateUp();
172+
}
100173
}
101174
}

Android/APIExample-Audio/app/src/main/java/io/agora/api/example/common/model/StatisticsInfo.java

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
package io.agora.api.example.common.model;
22

3-
import io.agora.rtc2.IRtcEngineEventHandler.LastmileProbeResult;
4-
import io.agora.rtc2.IRtcEngineEventHandler.LocalAudioStats;
3+
import io.agora.rtc2.IRtcEngineEventHandler;
54
import io.agora.rtc2.IRtcEngineEventHandler.LocalVideoStats;
65
import io.agora.rtc2.IRtcEngineEventHandler.RemoteAudioStats;
76
import io.agora.rtc2.IRtcEngineEventHandler.RemoteVideoStats;
8-
import io.agora.rtc2.IRtcEngineEventHandler.RtcStats;
97

108
public class StatisticsInfo {
119
private LocalVideoStats localVideoStats = new LocalVideoStats();
12-
private LocalAudioStats localAudioStats = new LocalAudioStats();
10+
private IRtcEngineEventHandler.LocalAudioStats localAudioStats = new IRtcEngineEventHandler.LocalAudioStats();
1311
private RemoteVideoStats remoteVideoStats = new RemoteVideoStats();
1412
private RemoteAudioStats remoteAudioStats = new RemoteAudioStats();
15-
private RtcStats rtcStats = new RtcStats();
13+
private IRtcEngineEventHandler.RtcStats rtcStats = new IRtcEngineEventHandler.RtcStats();
1614
private int quality;
17-
private LastmileProbeResult lastMileProbeResult;
15+
private IRtcEngineEventHandler.LastmileProbeResult lastMileProbeResult;
1816

1917
public void setLocalVideoStats(LocalVideoStats localVideoStats) {
2018
this.localVideoStats = localVideoStats;
2119
}
2220

23-
public void setLocalAudioStats(LocalAudioStats localAudioStats) {
21+
public void setLocalAudioStats(IRtcEngineEventHandler.LocalAudioStats localAudioStats) {
2422
this.localAudioStats = localAudioStats;
2523
}
2624

@@ -32,7 +30,7 @@ public void setRemoteAudioStats(RemoteAudioStats remoteAudioStats) {
3230
this.remoteAudioStats = remoteAudioStats;
3331
}
3432

35-
public void setRtcStats(RtcStats rtcStats) {
33+
public void setRtcStats(IRtcEngineEventHandler.RtcStats rtcStats) {
3634
this.rtcStats = rtcStats;
3735
}
3836

@@ -162,7 +160,7 @@ public String getLastMileResult() {
162160
return stringBuilder.toString();
163161
}
164162

165-
public void setLastMileProbeResult(LastmileProbeResult lastmileProbeResult) {
163+
public void setLastMileProbeResult(IRtcEngineEventHandler.LastmileProbeResult lastmileProbeResult) {
166164
this.lastMileProbeResult = lastmileProbeResult;
167165
}
168166

0 commit comments

Comments
 (0)