Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/4.3.0 #365

Merged
merged 91 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
f2451d9
update code style
Nov 3, 2023
1289981
[Android]add custom stream encrypt case.
xgfd3 Nov 13, 2023
b927036
[Android]update README links.
xgfd3 Nov 13, 2023
7ce610a
Dev/oc test (#353)
cleven1 Aug 12, 2023
dc0bca3
Dev/4.2.3 (#354)
xgfd3 Oct 12, 2023
a50dcdf
Update setLocalAccessPoint note and etc. (#358)
xgfd3 Nov 2, 2023
fdb98f2
Add gitee sync script.
xgfd3 Nov 13, 2023
258b55e
Update gitee sync script.
xgfd3 Nov 13, 2023
bcdbd86
Test gitee sync.
xgfd3 Nov 13, 2023
7ae9474
Merge branch 'dev/4.3.0' into jira/DEVEX-60
xgfd3 Nov 16, 2023
81c26ce
Merge pull request #359 from AgoraIO/jira/DEVEX-60
xgfd3 Nov 16, 2023
53dd609
Merge branch 'main' into dev/4.3.0
xgfd3 Nov 16, 2023
f07d63a
Feat/code style android (#366)
xgfd3 Nov 16, 2023
fcebcba
[Android]Adapt to 4.3.0 and add audio stream selector for media player.
xgfd3 Nov 16, 2023
dcba19c
[Android]Add face capture case and etc.
xgfd3 Nov 16, 2023
538b9eb
[Android][Audio]Adapt to 4.3.0 rtc sdk.
xgfd3 Nov 16, 2023
c2ef2d1
[Android]Update rtc version.
xgfd3 Nov 16, 2023
c96f608
Merge branch 'main' into dev/4.3.0
xgfd3 Nov 16, 2023
dbcb577
update sdk 4.3.0
Nov 17, 2023
752f8d3
iOS update SDK 4.3.0
Nov 17, 2023
55b939a
add multi audio track case
Nov 17, 2023
a282169
add face capture case
Nov 17, 2023
446e61e
[Windows]Adapt to 4.3.0, add audio stream selector for mediaplayer an…
xgfd3 Nov 17, 2023
08f3a9b
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Nov 17, 2023
f148f22
update sdk version to 4.3.0
Nov 20, 2023
199f5c5
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
Nov 20, 2023
f057980
[Windows]add face capture case.
xgfd3 Nov 20, 2023
e18d64a
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Nov 20, 2023
2d8fcfe
[Android]update cpp include.
xgfd3 Nov 20, 2023
f6a2a50
[Android]Adapt to 4.3.0 latest version.
xgfd3 Nov 29, 2023
3bcf0ef
[Android]update cpp include.
xgfd3 Nov 29, 2023
69a8fda
[Android][Audio]Adapt to 4.3.0 latest version.
xgfd3 Nov 29, 2023
a9181f2
[windows]adapte to 4.3.0 latest version and fix bugs.
xgfd3 Nov 30, 2023
e57b819
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Nov 30, 2023
54aca01
fix rawVideo takesnpe crash bug
Dec 1, 2023
7595fe7
fix rawVideo snap shot bug
Dec 1, 2023
5a2b34b
fix medipa publish streaming bug
Dec 1, 2023
a8034a2
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
Dec 1, 2023
c112613
[Android]try to fix NMS-17758 and etc.
xgfd3 Nov 30, 2023
8ccf4cf
[Android]fix bugs.
xgfd3 Dec 4, 2023
d983a9d
[Android]add background recording function for JoinChannelAudio case(…
xgfd3 Dec 6, 2023
fe1216f
[Android][Audio]add background recording function for JoinChannelAudi…
xgfd3 Dec 6, 2023
cb693eb
[Android]Adapt to 4.3.0 latest version.
xgfd3 Dec 6, 2023
f4672e9
[Android]fix custom audio render api call problem(DEVEX-65).
xgfd3 Dec 7, 2023
91db82e
fix multiChannel take snapshot bug
Dec 15, 2023
6d35ddc
fix custom video render bug
Dec 15, 2023
95d0de8
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
Dec 15, 2023
22cdadd
update startEchoTest
Dec 21, 2023
7b570eb
[Windows] fix windows screen share bug.
xgfd3 Dec 21, 2023
8610da9
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Dec 21, 2023
f5442a0
update sdk document address
Dec 21, 2023
34b502b
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
Dec 21, 2023
52f851c
[Windows]Add audio echo test user case.
xgfd3 Dec 21, 2023
6a74f01
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Dec 21, 2023
27f7377
[Android]Perfect basic video case and fix some bugs.
xgfd3 Dec 21, 2023
930e7dc
[Android]Perfect rtmp streaming case.
xgfd3 Dec 22, 2023
43405a8
Add Camera Test Fuction
Dec 26, 2023
0ba255e
[Android]Fix auido route bug.
Dec 26, 2023
58663bd
[Android]Add video echo test.
Dec 26, 2023
7b24802
[Android]fix echo test bug.
Dec 26, 2023
c4a8a51
[Android]perfect echo test example.
Dec 27, 2023
d37c726
add rtc connection state callback
Dec 27, 2023
31baed7
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
Dec 27, 2023
1031a02
fix MediaPlayer publish stream UI bug
Dec 27, 2023
bda78f9
fix custom capture Video push bug
Jan 2, 2024
ca4950c
Fix the issue of self rendering on the Inter chip
Jan 3, 2024
964c25f
[windows]fix spatial audio zone bug.
xgfd3 Jan 4, 2024
2d2e425
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Jan 4, 2024
e4a07e6
fix custom video push bug
Jan 4, 2024
20b7492
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
Jan 4, 2024
8f5d903
update precall test bug
cleven1 Jan 9, 2024
d0b3b62
[Windows]add video echo test api example.
xgfd3 Jan 10, 2024
5389d5f
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Jan 10, 2024
a2a2d21
[Windows]add basic join channel video by token example.
xgfd3 Jan 10, 2024
d93ccf7
[Windows]fix spatial audio zone bug(NMS-18784)
xgfd3 Jan 10, 2024
a5bf8d3
update start echo test
Jan 12, 2024
a6df626
update spatial audio method
Jan 12, 2024
f6f9cdf
[Android]fix audio problem.
Jan 12, 2024
f65da12
[Android][Audio]fix audio problem.
Jan 12, 2024
a031322
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
Jan 12, 2024
077e5ae
update spatial audio remote user position
Jan 15, 2024
6fd3e98
Merge branch 'code_style' into dev/4.3.0
Jan 25, 2024
7394ac2
Optimize the code format
Jan 25, 2024
02459de
[Android]fix NMS-19192/NMS-19194.
xgfd3 Jan 30, 2024
1e3801a
[Android][Audio]fix NMS-19192.
xgfd3 Jan 30, 2024
7aabfbb
adapter video extension for v430 (#370)
DengQiming-private Jan 30, 2024
11c4166
update rtc sdk pod version to 4.3.0
Feb 22, 2024
5fdb1f0
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
Feb 22, 2024
6ff2703
Merge branch 'main' into dev/4.3.0
xgfd3 Feb 23, 2024
7053b81
[windows]Update sdk download url.
xgfd3 Feb 23, 2024
3b6fa87
Merge branch 'dev/4.3.0' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Feb 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
38 changes: 38 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".

if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=$(git hash-object -t tree /dev/null)
fi

SCRIPT_DIR=$(dirname "$0")
SCRIPT_ABS_PATH=`cd "$SCRIPT_DIR"; pwd`


ANDROID_DIFF_FILES=`git diff --cached --name-only --diff-filter=ACM -- '*' | grep 'Android'`
if [[ "$ANDROID_DIFF_FILES" != "" ]]
then
cd Android/APIExample
echo "precommit >> current paht = $(pwd), diff files = $ANDROID_DIFF_FILES"
./gradlew -Dorg.gradle.project.commit_diff_files="$ANDROID_DIFF_FILES" checkstyle detekt
if [ $? -eq 0 ]; then
echo "precommit >> checkstyle detekt OK."
else
echo "precommit >> checkstyle detekt Failed."
exit 1
fi
else
echo "precommit >> No changing android files."
fi


2 changes: 1 addition & 1 deletion .github/workflows/gitee-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
dst_token: ${{ secrets.GITEE_PRIVATE_TOKEN }}
force_update: true
account_type: org
shell_path: ./.github/workflows/gitee-sync-shell.sh
shell_path: ./.github/workflows/gitee-sync-shell.sh
2 changes: 1 addition & 1 deletion Android/APIExample-Audio/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dependencies {
implementation fileTree(dir: "${localSdkPath}", include: ['*.jar', '*.aar'])
}
else{
def agora_sdk_version = "4.2.6"
def agora_sdk_version = "4.3.0"
// case 1: full single lib with voice only
implementation "io.agora.rtc:voice-sdk:${agora_sdk_version}"
// case 2: partial libs with voice only
Expand Down
6 changes: 6 additions & 0 deletions Android/APIExample-Audio/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

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

<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!-- <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />-->

<application
android:name=".MainApplication"
android:allowBackup="true"
Expand Down Expand Up @@ -43,6 +46,9 @@
android:windowSoftInputMode="stateAlwaysHidden"
android:screenOrientation="portrait" />

<service android:name=".examples.basic.JoinChannelAudio$LocalRecordingService"
android:foregroundServiceType="microphone"/>

</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -4,78 +4,147 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.view.Menu;
import android.text.TextUtils;
import android.view.View;
import android.widget.Toast;

import androidx.activity.OnBackPressedCallback;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.Fragment;
import androidx.navigation.Navigation;

import io.agora.api.example.R;

public class BaseFragment extends Fragment
{
/**
* The type Base fragment.
*/
public class BaseFragment extends Fragment {
/**
* The Handler.
*/
protected Handler handler;
private AlertDialog mAlertDialog;
private String mAlertMessage;
private final OnBackPressedCallback onBackPressedCallback = new OnBackPressedCallback(false) {
@Override
public void handleOnBackPressed() {
onBackPressed();
}
};

@Override
public void onCreate(@Nullable Bundle savedInstanceState)
{
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
handler = new Handler(Looper.getMainLooper());
requireActivity().getOnBackPressedDispatcher().addCallback(onBackPressedCallback);
}

@Override
public void onAttach(@NonNull Context context) {
super.onAttach(context);
onBackPressedCallback.setEnabled(true);
}

@Override
public void onDetach() {
super.onDetach();
onBackPressedCallback.setEnabled(false);
}

/**
* Show alert.
*
* @param message the message
*/
protected void showAlert(String message) {
this.showAlert(message, true);
}

/**
* Show alert.
*
* @param message the message
* @param showRepeatMsg the show repeat msg
*/
protected void showAlert(String message, boolean showRepeatMsg) {
runOnUIThread(() -> {
Context context = getContext();
if(context == null){
if (context == null) {
return;
}
if (mAlertDialog == null) {
mAlertDialog = new AlertDialog.Builder(context).setTitle("Tips")
.setPositiveButton("OK", (dialog, which) -> dialog.dismiss())
.create();
}
if (!showRepeatMsg && !TextUtils.isEmpty(mAlertMessage) && mAlertMessage.equals(message)) {
return;
}
mAlertMessage = message;
mAlertDialog.setMessage(message);
mAlertDialog.show();
});
}

protected final void showLongToast(final String msg)
{
/**
* Reset alert.
*/
protected void resetAlert() {
runOnUIThread(() -> mAlertMessage = "");
}

/**
* Show long toast.
*
* @param msg the msg
*/
protected final void showLongToast(final String msg) {
runOnUIThread(() -> {
Context context = getContext();
if(context == null){
if (context == null) {
return;
}
Toast.makeText(context, msg, Toast.LENGTH_LONG).show();
});
}

protected final void showShortToast(final String msg)
{
/**
* Show short toast.
*
* @param msg the msg
*/
protected final void showShortToast(final String msg) {
runOnUIThread(() -> {
Context context = getContext();
if(context == null){
if (context == null) {
return;
}
Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();
});
}

protected final void runOnUIThread(Runnable runnable){
/**
* Run on ui thread.
*
* @param runnable the runnable
*/
protected final void runOnUIThread(Runnable runnable) {
this.runOnUIThread(runnable, 0);
}

protected final void runOnUIThread(Runnable runnable, long delay){
if(handler != null && runnable != null && getContext() != null){
/**
* Run on ui thread.
*
* @param runnable the runnable
* @param delay the delay
*/
protected final void runOnUIThread(Runnable runnable, long delay) {
if (handler != null && runnable != null && getContext() != null) {
if (delay <= 0 && handler.getLooper().getThread() == Thread.currentThread()) {
runnable.run();
}else{
} else {
handler.postDelayed(() -> {
if(getContext() != null){
if (getContext() != null) {
runnable.run();
}
}, delay);
Expand All @@ -87,15 +156,19 @@ protected final void runOnUIThread(Runnable runnable, long delay){
public void onDestroy() {
super.onDestroy();
handler.removeCallbacksAndMessages(null);
if(mAlertDialog != null){
if (mAlertDialog != null) {
mAlertDialog.dismiss();
mAlertDialog = null;
}
}

@Override
public void onPrepareOptionsMenu(@NonNull Menu menu) {
super.onPrepareOptionsMenu(menu);
menu.setGroupVisible(R.id.main_setting_group, false);
/**
* On back pressed.
*/
protected void onBackPressed() {
View view = getView();
if (view != null) {
Navigation.findNavController(view).navigateUp();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
package io.agora.api.example.common.model;

import io.agora.rtc2.IRtcEngineEventHandler.LastmileProbeResult;
import io.agora.rtc2.IRtcEngineEventHandler.LocalAudioStats;
import io.agora.rtc2.IRtcEngineEventHandler;
import io.agora.rtc2.IRtcEngineEventHandler.LocalVideoStats;
import io.agora.rtc2.IRtcEngineEventHandler.RemoteAudioStats;
import io.agora.rtc2.IRtcEngineEventHandler.RemoteVideoStats;
import io.agora.rtc2.IRtcEngineEventHandler.RtcStats;

public class StatisticsInfo {
private LocalVideoStats localVideoStats = new LocalVideoStats();
private LocalAudioStats localAudioStats = new LocalAudioStats();
private IRtcEngineEventHandler.LocalAudioStats localAudioStats = new IRtcEngineEventHandler.LocalAudioStats();
private RemoteVideoStats remoteVideoStats = new RemoteVideoStats();
private RemoteAudioStats remoteAudioStats = new RemoteAudioStats();
private RtcStats rtcStats = new RtcStats();
private IRtcEngineEventHandler.RtcStats rtcStats = new IRtcEngineEventHandler.RtcStats();
private int quality;
private LastmileProbeResult lastMileProbeResult;
private IRtcEngineEventHandler.LastmileProbeResult lastMileProbeResult;

public void setLocalVideoStats(LocalVideoStats localVideoStats) {
this.localVideoStats = localVideoStats;
}

public void setLocalAudioStats(LocalAudioStats localAudioStats) {
public void setLocalAudioStats(IRtcEngineEventHandler.LocalAudioStats localAudioStats) {
this.localAudioStats = localAudioStats;
}

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

public void setRtcStats(RtcStats rtcStats) {
public void setRtcStats(IRtcEngineEventHandler.RtcStats rtcStats) {
this.rtcStats = rtcStats;
}

Expand Down Expand Up @@ -162,7 +160,7 @@ public String getLastMileResult() {
return stringBuilder.toString();
}

public void setLastMileProbeResult(LastmileProbeResult lastmileProbeResult) {
public void setLastMileProbeResult(IRtcEngineEventHandler.LastmileProbeResult lastmileProbeResult) {
this.lastMileProbeResult = lastmileProbeResult;
}

Expand Down
Loading