**1.初始化SDK(To initialize the SDK )**
~~~
MHSDK.init(this,"你的授權密鑰");//建議在Application子類的onCreate方法中初始化SDK
~~~
~~~
MHSDK.init(this,"Your authorization key"); // It is recommended to initialize the SDK in the onCreate method of the Application subclass
~~~
*****
**2.添加美狐UI組件(Add the MHSDK UI component)**
在布局文件中添加美狐的UI組件
Add the UI component of the MHSDK to the layout file
```
<com.meihu.beauty.views.MeiHuBeautyControl
android:layout_width="match_parent"
android:layout_height="match_parent"/>
```
*****
**3.在集成了美狐UI組件的Activity中初始化(Class in an Activity that integrates the MHSDK UI component)**
~~~
//初始化(initialize)
MhDataManager.getInstance().create(this.getApplicationContext());
~~~
**4.在阿里的渲染方法中 調用美狐SDK的渲染方法(Call the rendering method of MHSDK in Ali's rendering method)**
~~~
int faceScale = 4; //人臉識別對紋理的縮小倍數
int textureScale = 2;//圖像渲染對紋理的縮小倍數
if (mDeviceLevel == DEVICE_LEVEL_HIGH) { //判斷手機性能 設置圖像渲染對紋理的縮小倍數
textureScale = 1;
}
int newTexture = MhDataManager.getInstance().render(texture,width,height,faceScale,textureScale);
return newTexture;
~~~
~~~
int faceScale = 4; // Face recognition for texture reduction multiple
int textureScale = 2; // The size of the image rendered texture
If (mDeviceLevel == DEVICE_LEVEL_HIGH) {// Determine the phone performance set image rendering to texture reduction multiple
textureScale = 1;
}
int newTexture = MhDataManager.getInstance().render(texture,width,height,faceScale,textureScale);
return newTexture;
~~~
- 一、產品簡介(Product introduction)
- 1.功能說明(Functional Specification)
- 2.平臺支持(Platform support)
- 3.官方鏈接(The official link)
- 二、集成指引(Integrated guidance)
- Android集成指引(Android Integration Guide)
- 1.概述(Overview)
- 2.接入說明(Access instructions)
- 3.詳細步驟(detailed steps)
- 4.具體直播平臺接入(Specific live broadcast platform access)
- 1.騰訊云直播(Tencent Cloud Live)
- 2.阿里云(Alibaba Cloud)
- 三、MHSDK美顏相關接口部分(MHSDK Interface related to beauty)
- Android相關接口文檔說明(Android MHSDK Interface related to beauty)
- 美顏相關接口文檔說明(Description of interfaces related to beauty)
- 四、常見問題(FAQ)
- Android常見問題(Android FAQ)
- 1.認證失敗原因(Cause of authentication failure)
- 2.調用美型、貼紙、特效、調用美型、貼紙、特效、哈哈鏡沒有效果(Call beauty stickers special effects funhouse mirror have no effect)
- 3.MHBeautyManager的特別聲明(Special statement from MHBeautyManager)
- 4.使用MHUI的注意事項(Considerations for using MHUI)
- 5.卡頓問題(Caton problem)
- 6.閃退問題(flash back problem)
- 7.貼紙無法下載(Stickers cannot be downloaded)
- 8.AndroidX騰訊云環境集成問題(AndroidX Tencent cloud environment integration problems)
- 9.導入新的sdk出現亂碼(Garbled characters appear when importing a new SDK)
- 10.彈出的UI有陰影效果(The UI that pops up has a shadow effect)
- 11.Android10出現網絡資源失敗請檢查網絡(Android10 network resource failure please check the network)
- 12.美狐可以記錄設置的各種參數嗎(Can us fox record various parameters set)
- 13.七牛云替換sdk畫面上下顛倒(Seven niuyun replacement SDK screen upside down)
- 14.貼紙可以自定義嗎(Can stickers be customized)
- 15.您這邊可以錄制視頻嗎(Can you record a video)
- 16.MHSDK必須本地依賴嗎(Does MHSDK have to be locally dependent)
- 17.找不到某個方法(I can't find a way)
- 18.環信不顯示自己的頭像框(Ring letter does not show your avatar box)
- 19.如何取消特效(How to Cancel special effects)
- 20.水印沒有找到(Watermark not found)
- 21.聲網視頻通話大小屏切換問題(The size screen switchover of sonnet video calls is abnormal)
- 22.如何切換sdk的語言