Skip to content

Commit c25fa40

Browse files
xgfd3zhaoyongqiangsync2giteezshbleaker
committed
Compose (#381)
* update podfile source to china * update podfile source to china * gitee sync test * [Android] gitee sync >> use china repos. * fix sync shell * [Android]revert to use common repo url. * update sync script. * update sync script. * update sync script. * Add download agora SDK when executing pod install and modify dependencies * gitee sync modify source url * modify podfile file script * modify podfile file script * update download ijk and swiftlint * update ijk download script * iOS Adapt to RTC 4.3.1 version * [windows] Adapt to 4.3.1 sdk and ajust examples. * mac Adapt to RTC 4.3.1 version * [windows]enable use_audio4 * [Android]Adapt to 4.3.1 sdk * [Android][Audio]Adapt to 4.3.1 sdk * Change way of using salt (#374) * Change way of using salt * Add macOS support * [Windows]perfect screen parameter adjusting. * [windows]change way of using salt. * [Android]Renew beauty api and etc. * add package_script * [windows]fix case switch crash. * [windows]fix release compile problem. * [windows]change slider notify to NW_RELEASEDCAPTURE. * [windows]show startCameraCapture error. * [Android]Fix fragment back bug. * [windows]fix original video bug (NMS-20350). * fix pip bug * fix crash bug * fix volume bug * fix stutter bug * [Android]Update beauty api and fix bug(NMS-20393) * [Android]Fix beauty effect bug. * [Android]Update gradle config. * [Android]Update gradle config. * [Android]Add pip mode demo. * [windows]update ci. * [windows]update ci. * [windows]update ci. * [windows]update ci 2. * [windows]update ci 3. * [Android][Compose]init project. * [Android][Compose]adjust project construction, add setting and etc. * [Android][Compose]add join channel auido,join channel video by token, and perfect codes. * [Android][Compose]add rtmpstreaming case and fix bugs. * [Android][Compose]add cases. * [Android][Compose]add cases. * [Android][Compose]add cases. * [Android][Compose]add cases. * [Android][Compose]add cert config and token. --------- Co-authored-by: zhaoyongqiang <zhaoyongqiang@agora.io> Co-authored-by: sync2gitee <sync2gitee@example.com> Co-authored-by: Sihán Zhū <hi@zshbleaker.me>
1 parent 8cbd807 commit c25fa40

File tree

91 files changed

+14163
-1
lines changed

Some content is hidden

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

91 files changed

+14163
-1
lines changed

.github/workflows/gitee-sync-shell.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ git config --global user.name "sync2gitee"
55
pwd
66
git remote -v
77

8-
# change android maven to china repos
8+
change android maven to china repos
99
sed -ie "s#google()#maven { url \"https\://maven.aliyun.com/repository/public\" }\n google()#g" Android/APIExample/settings.gradle
1010
sed -ie "s#https://services.gradle.org/distributions#https://mirrors.cloud.tencent.com/gradle#g" Android/APIExample/gradle/wrapper/gradle-wrapper.properties
1111
sed -ie "s#google()#maven { url \"https\://maven.aliyun.com/repository/public\" }\n google()#g" Android/APIExample-Audio/settings.gradle
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx
15+
local.properties
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
import java.util.Properties
2+
3+
plugins {
4+
alias(libs.plugins.androidApplication)
5+
alias(libs.plugins.jetbrainsKotlinAndroid)
6+
}
7+
8+
android {
9+
namespace = "io.agora.api.example.compose"
10+
compileSdk = 34
11+
12+
defaultConfig {
13+
applicationId = "io.agora.api.example.compose"
14+
minSdk = 24
15+
targetSdk = 34
16+
versionCode = 1
17+
versionName = "1.0"
18+
19+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
20+
vectorDrawables {
21+
useSupportLibrary = true
22+
}
23+
24+
val properties = Properties()
25+
properties.load(rootProject.file("local.properties").inputStream())
26+
val AGORA_APP_ID = properties.getProperty("AGORA_APP_ID", "")
27+
if(AGORA_APP_ID == ""){
28+
throw GradleException("请在项目根目录下local.properties文件里正确配置:AGORA_APP_ID=<您的声网AppId>")
29+
}
30+
val AGORA_APP_CERT = properties.getProperty("AGORA_APP_CERT", "")
31+
buildConfigField("String", "AGORA_APP_ID", "\"$AGORA_APP_ID\"")
32+
buildConfigField("String", "AGORA_APP_CERT", "\"$AGORA_APP_CERT\"")
33+
}
34+
35+
buildFeatures {
36+
buildConfig = true
37+
}
38+
buildTypes {
39+
release {
40+
isMinifyEnabled = false
41+
proguardFiles(
42+
getDefaultProguardFile("proguard-android-optimize.txt"),
43+
"proguard-rules.pro"
44+
)
45+
}
46+
}
47+
compileOptions {
48+
sourceCompatibility = JavaVersion.VERSION_1_8
49+
targetCompatibility = JavaVersion.VERSION_1_8
50+
}
51+
kotlinOptions {
52+
jvmTarget = "1.8"
53+
}
54+
buildFeatures {
55+
compose = true
56+
}
57+
composeOptions {
58+
kotlinCompilerExtensionVersion = "1.5.1"
59+
}
60+
packaging {
61+
resources {
62+
excludes += "/META-INF/{AL2.0,LGPL2.1}"
63+
}
64+
}
65+
}
66+
67+
dependencies {
68+
69+
implementation(libs.androidx.core.ktx)
70+
implementation(libs.androidx.lifecycle.runtime.ktx)
71+
implementation(libs.androidx.activity.compose)
72+
implementation(platform(libs.androidx.compose.bom))
73+
implementation(libs.androidx.ui)
74+
implementation(libs.androidx.ui.graphics)
75+
implementation(libs.androidx.ui.tooling.preview)
76+
implementation(libs.androidx.material3)
77+
implementation(libs.androidx.navigation.compose)
78+
implementation(libs.androidx.datastore)
79+
implementation(libs.androidx.datastore.preferences)
80+
implementation(libs.agora.full.sdk)
81+
implementation(libs.agora.full.screen.sharing)
82+
testImplementation(libs.junit)
83+
androidTestImplementation(libs.androidx.junit)
84+
androidTestImplementation(libs.androidx.espresso.core)
85+
androidTestImplementation(platform(libs.androidx.compose.bom))
86+
androidTestImplementation(libs.androidx.ui.test.junit4)
87+
debugImplementation(libs.androidx.ui.tooling)
88+
debugImplementation(libs.androidx.ui.test.manifest)
89+
implementation(libs.androidx.material.icons.extended)
90+
implementation(libs.okhttp)
91+
implementation(libs.logging.interceptor)
92+
93+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package io.agora.api.example.compose
2+
3+
import androidx.test.ext.junit.runners.AndroidJUnit4
4+
import androidx.test.platform.app.InstrumentationRegistry
5+
import org.junit.Assert.assertEquals
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
/**
10+
* Instrumented test, which will execute on an Android device.
11+
*
12+
* See [testing documentation](http://d.android.com/tools/testing).
13+
*/
14+
@RunWith(AndroidJUnit4::class)
15+
class ExampleInstrumentedTest {
16+
@Test
17+
fun useAppContext() {
18+
// Context of the app under test.
19+
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
20+
assertEquals("io.agora.api.example.compose", appContext.packageName)
21+
}
22+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
5+
<uses-permission android:name="android.permission.CAMERA" />
6+
<uses-permission android:name="android.permission.INTERNET" />
7+
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
8+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
9+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
10+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
11+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
12+
<uses-permission android:name="android.permission.BLUETOOTH"/>
13+
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
14+
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
15+
16+
<application
17+
android:allowBackup="true"
18+
android:dataExtractionRules="@xml/data_extraction_rules"
19+
android:fullBackupContent="@xml/backup_rules"
20+
android:icon="@mipmap/ic_launcher"
21+
android:label="@string/app_name"
22+
android:roundIcon="@mipmap/ic_launcher_round"
23+
android:supportsRtl="true"
24+
android:theme="@style/Theme.APIExampleCompose"
25+
tools:targetApi="31">
26+
<activity
27+
android:name=".MainActivity"
28+
android:exported="true"
29+
android:label="@string/app_name"
30+
android:theme="@style/Theme.APIExampleCompose">
31+
<intent-filter>
32+
<action android:name="android.intent.action.MAIN" />
33+
34+
<category android:name="android.intent.category.LAUNCHER" />
35+
</intent-filter>
36+
</activity>
37+
</application>
38+
39+
</manifest>
1.16 KB
Loading
4.38 KB
Loading
1.85 MB
Binary file not shown.

0 commit comments

Comments
 (0)