Skip to content

Commit

Permalink
Merge pull request #13 from AgoraIO-Community/dev/1.0.5
Browse files Browse the repository at this point in the history
dev/1.0.5
  • Loading branch information
xgfd3 authored Dec 18, 2023
2 parents cbb8d19 + 869bfeb commit 0ddb836
Show file tree
Hide file tree
Showing 128 changed files with 8,875 additions and 3,834 deletions.
35 changes: 23 additions & 12 deletions Android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ _English | [中文](README.zh.md)
2. FaceUnity
Put the FaceUnity beauty resources into the corresponding path

| FaceUnity Beauty Resources | Location |
|-------------------------------------|---------------------------------------------------------|
| makeup resource(e.g. naicha.bundle) | app/src/main/assets/beauty_faceunity/makeup |
| sticker resource(e.g. fashi.bundle) | app/src/main/assets/beauty_faceunity/sticker |
| authpack.java | app/src/main/java/io/agora/beautyapi/demo/authpack.java |
| FaceUnity Beauty Resources | Location |
|-------------------------------------|---------------------------------------------------------------------------|
| makeup resource(e.g. naicha.bundle) | app/src/main/assets/beauty_faceunity/makeup |
| sticker resource(e.g. fashi.bundle) | app/src/main/assets/beauty_faceunity/sticker |
| authpack.java | app/src/main/java/io/agora/beautyapi/demo/module/faceunity/authpack.java |

3. ByteDance
Unzip the ByteDance beauty resource and copy the following files/directories to the corresponding path
Expand All @@ -46,7 +46,17 @@ _English | [中文](README.zh.md)
| resource/StickerResource.bundle | app/src/main/assets/beauty_bytedance |
| resource/StickerResource.bundle | app/src/main/assets/beauty_bytedance |

Modify the LICENSE_NAME in the app/src/main/java/io/agora/beautyapi/demo/ByteDanceActivity.kt file to the name of the applied certificate file.
Modify the LICENSE_NAME in the app/src/main/java/io/agora/beautyapi/demo/module/bytedance/ByteDanceBeautySDK.kt file to the name of the applied certificate file.

4. Cosmos
Unzip the Cosmos beauty resource and copy the following files/directories to the corresponding path

| ByteDance Beauty Resources | Location |
|-------------------------------------------|--------------------------------------------------|
| sample/app/src/main/assets/model-all.zip | app/src/main/assets/beauty_cosmos/model-all.zip |
| sample/app/src/main/assets/cosmos.zip | app/src/main/assets/beauty_cosmos/cosmos.zip |

Modify the LICENSE in the app/src/main/java/io/agora/beautyapi/demo/module/cosmos/CosmosBeautyWrapSDK.kt file to the applied license code.

### Agora AppID Configuration

Expand All @@ -62,7 +72,7 @@ Modify the LICENSE_NAME in the app/src/main/java/io/agora/beautyapi/demo/ByteDan
```xml
AGORA_APP_ID=#YOUR APP ID#
```

[README.zh.md](..%2FREADME.zh.md)
### Run Project

1. Edit the app/build.gradle file, change applicationId to your application id using to apply to beauty SDK.
Expand All @@ -73,11 +83,12 @@ AGORA_APP_ID=#YOUR APP ID#

Each beauty api can be integrated into your project separately, see the below integration documentation for details

| Beauty | Documentation |
|------------|------------------------------------|
| SenseTime | [README](lib_sensetime/README.md) |
| FaceUnity | [README](lib_faceunity/README.md) |
| ByteDance | [README](lib_bytedance/README.md) |
| Beauty | Documentation |
|-----------|-----------------------------------|
| SenseTime | [README](lib_sensetime/README.md) |
| FaceUnity | [README](lib_faceunity/README.md) |
| ByteDance | [README](lib_bytedance/README.md) |
| Cosmos | [README](lib_cosmos/README.md) |

## Feedback

Expand Down
50 changes: 31 additions & 19 deletions Android/README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
## 快速跑通
### 配置美颜SDK

> PS:没有配置项目能正常运行,但是对应美颜可能会黑屏
> PS:没有配置项目能正常运行,但是对应美颜可能会黑屏。
> 以下证书与资源需要对应申请时所用包名,并将包名配置在app/build.gradle文件applicationId处!
1. 商汤美颜
解压商汤美颜SDK并复制以下文件/目录到对应路径下
Expand All @@ -29,24 +30,34 @@
2. 相芯美颜
将相芯美颜资源放入对应路径下

| 美颜资源 | 项目路径 |
|----------------------|---------------------------------------------------------|
| 美妆资源(如naicha.bundle) | app/src/main/assets/beauty_faceunity/makeup |
| 贴纸资源(如fashi.bundle) | app/src/main/assets/beauty_faceunity/sticker |
| 证书authpack.java | app/src/main/java/io/agora/beautyapi/demo/authpack.java |
| 美颜资源 | 项目路径 |
|----------------------|---------------------------------------------------------------------------|
| 美妆资源(如naicha.bundle) | app/src/main/assets/beauty_faceunity/makeup |
| 贴纸资源(如fashi.bundle) | app/src/main/assets/beauty_faceunity/sticker |
| 证书authpack.java | app/src/main/java/io/agora/beautyapi/demo/module/faceunity/authpack.java |

3. 字节/火山美颜
解压字节/火山美颜资源并复制以下文件/目录到对应路径下

| 字节SDK文件/目录 | 项目路径 |
|--------------------------------------------------|-------------------------------------------------------|
| resource/LicenseBag.bundle | app/src/main/assets/beauty_bytedance |
| resource/ModelResource.bundle | app/src/main/assets/beauty_bytedance |
| resource/ComposeMakeup.bundle | app/src/main/assets/beauty_bytedance |
| resource/StickerResource.bundle | app/src/main/assets/beauty_bytedance |
| resource/StickerResource.bundle | app/src/main/assets/beauty_bytedance |
| 字节SDK文件/目录 | 项目路径 |
|--------------------------------------------------|---------------------------------------|
| resource/LicenseBag.bundle | app/src/main/assets/beauty_bytedance |
| resource/ModelResource.bundle | app/src/main/assets/beauty_bytedance |
| resource/ComposeMakeup.bundle | app/src/main/assets/beauty_bytedance |
| resource/StickerResource.bundle | app/src/main/assets/beauty_bytedance |
| resource/StickerResource.bundle | app/src/main/assets/beauty_bytedance |

修改app/src/main/java/io/agora/beautyapi/demo/ByteDanceActivity.kt文件里LICENSE_NAME为申请到的证书文件名
修改app/src/main/java/io/agora/beautyapi/demo/module/bytedance/ByteDanceBeautySDK.kt文件里LICENSE_NAME为申请到的证书文件名

4. 宇宙美颜
获取宇宙美颜资源并复制以下文件到对应路径下

| 宇宙SDK文件/目录 | 项目路径 |
|-------------------------------------------|-------------------------------------------------|
| sample/app/src/main/assets/model-all.zip | app/src/main/assets/beauty_cosmos/model-all.zip |
| sample/app/src/main/assets/cosmos.zip | app/src/main/assets/beauty_cosmos/cosmos.zip |

修改app/src/main/java/io/agora/beautyapi/demo/module/cosmos/CosmosBeautyWrapSDK.kt文件里LICENSE为申请到的证书

### 配置声网AppID

Expand All @@ -73,11 +84,12 @@ AGORA_APP_ID=#YOUR APP ID#

每个美颜可以单独集成到自己的项目,详见对应的集成说明文档

| 美颜 | 集成说明 |
|-----|---------------------------------------|
| 商汤 | [README](lib_sensetime/README.zh.md) |
| 相芯 | [README](lib_faceunity/README.zh.md) |
| 字节 | [README](lib_bytedance/README.zh.md) |
| 美颜 | 集成说明 |
|-----|--------------------------------------|
| 商汤 | [README](lib_sensetime/README.zh.md) |
| 相芯 | [README](lib_faceunity/README.zh.md) |
| 字节 | [README](lib_bytedance/README.zh.md) |
| 宇宙 | [README](lib_cosmos/README.zh.md) |

## 联系我们

Expand Down
4 changes: 2 additions & 2 deletions Android/app/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/build
/src/main/assets
/src/main/java/io/agora/beautyapi/demo/authpack.java

!src/main/assets/beauty_bytedance/PLACEHOLDER
!src/main/assets/beauty_faceunity/PLACEHOLDER
!src/main/assets/beauty_sensetime/PLACEHOLDER
!src/main/assets/beauty_sensetime/PLACEHOLDER
/src/main/java/io/agora/beautyapi/demo/module/faceunity/authpack.java
9 changes: 9 additions & 0 deletions Android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,32 @@ dependencies {
def beautyApiVersion = "$LIB_VERSION"
implementation("com.github.AgoraIO-Community.BeautyAPI:ByteDance:$beautyApiVersion"){
// exclude group:'io.agora.rtc', module: 'full-sdk'
// exclude group:'io.agora.rtc', module: 'agora-special-full'
// exclude group:'com.github.AgoraIO-Community.BeautyAPI', module: 'ByteDance-LibEffectAAR'
}
implementation("com.github.AgoraIO-Community.BeautyAPI:FaceUnity:$beautyApiVersion"){
// exclude group:'io.agora.rtc', module: 'full-sdk'
// exclude group:'io.agora.rtc', module: 'agora-special-full'
// exclude group:'com.faceunity', module: 'core'
// exclude group:'com.faceunity', module: 'model'
}
implementation("com.github.AgoraIO-Community.BeautyAPI:SenseTime:$beautyApiVersion"){
// exclude group:'io.agora.rtc', module: 'full-sdk'
// exclude group:'io.agora.rtc', module: 'agora-special-full'
// exclude group:'com.github.AgoraIO-Community.BeautyAPI', module: 'SenseTime-LibHardwareBuffer'
// exclude group:'com.github.AgoraIO-Community.BeautyAPI', module: 'SenseTime-LibSenseArSourceManager'
// exclude group:'com.github.AgoraIO-Community.BeautyAPI', module: 'SenseTime-LibSTMobileJNI'
}
implementation("com.github.AgoraIO-Community.BeautyAPI:Cosmos:$beautyApiVersion"){
// exclude group:'io.agora.rtc', module: 'full-sdk'
// exclude group:'io.agora.rtc', module: 'agora-special-full'
// exclude group:'com.github.AgoraIO-Community.BeautyAPI', module: 'Cosmos-LibBeautySDK'
}
} else {
implementation project(":lib_sensetime")
implementation project(":lib_faceunity")
implementation project(":lib_bytedance")
implementation project(":lib_cosmos")
}

}
12 changes: 9 additions & 3 deletions Android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</activity>

<activity
android:name="io.agora.beautyapi.demo.SenseTimeActivity"
android:name="io.agora.beautyapi.demo.module.sensetime.SenseTimeActivity"
android:launchMode="singleTop"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="behind"/>
Expand All @@ -55,13 +55,19 @@
android:screenOrientation="behind"/>

<activity
android:name="io.agora.beautyapi.demo.FaceUnityActivity"
android:name="io.agora.beautyapi.demo.module.faceunity.FaceUnityActivity"
android:launchMode="singleTop"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="behind"/>

<activity
android:name="io.agora.beautyapi.demo.ByteDanceActivity"
android:name="io.agora.beautyapi.demo.module.bytedance.ByteDanceActivity"
android:launchMode="singleTop"
android:configChanges="orientation|screenSize|screenLayout"
android:screenOrientation="behind"/>

<activity
android:name="io.agora.beautyapi.demo.module.cosmos.CosmosActivity"
android:launchMode="singleTop"
android:configChanges="orientation|screenSize|screenLayout"
android:screenOrientation="behind"/>
Expand Down
2 changes: 2 additions & 0 deletions Android/app/src/main/assets/beauty_cosmos/PLACEHOLDER
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cosmos.zip
model-all.zip
Loading

0 comments on commit 0ddb836

Please sign in to comment.