**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的语言