<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                **1.申請產品密鑰(Applying for a Product key)** **MHSDK** 首先需要向商務申請精簡版、基礎或者高級版的產品密鑰,然后將密鑰集成到項目中方可使用。 **MHSDK** first needs to apply for the product key of lite, basic or advanced version from the business, and then integrate the key into the project side for use. ***** **2.類庫導入(The class library to import)** 將MHUI的文件夾拷貝到Android工程根目錄, MHSDK目前支持、armv7,armv8版本,defaultConfig配置節點中添加(根據自身項目需求來設置): Copy the MHUI folder to the Android project root directory, MHSDK currently supports, armV7, ARMV8 version, defaultConfig config node added (according to their own project needs to set) : ``` ndk { abiFilters "armeabi-v7a","arm64-v8a" } ``` 引入mhui模塊 Introduce the mhui module ``` implementation project(':mhui') ``` ***** **3.初始化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 ~~~ ***** **4.添加美狐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"/> ``` ***** **5.在集成了美狐UI組件的Activity中初始化(Class in an Activity that integrates the MHSDK UI component)** ~~~ //初始化(initialize) MhDataManager.getInstance().create(this.getApplicationContext()); ~~~ **6.在直播SDK的渲染方法 調用美狐SDK的渲染方法 返回新生成的紋理ID(The render method in the live SDK calls the render method in the MHSDK to return the newly generated texture ID )** ~~~ int textureId = MhDataManager.getInstance().render(texture, width, height); return textureId; //修改MhDataManager#render public?int?render(int?texture,?int?width,?int?height)?{ ????????if?(mMhManager?!=?null)?{ ????????????try?{ ????????????????texture?=?mMhManager.renderxxx(...); ????????????}?catch?(Exception?e)?{ ????????????????e.printStackTrace(); ????????????} ????????}else{ ???????????Log.e(TAG,?"render:?error"); ????????} ????????return?texture; ????} // 阿里云:render18(...) // 慕色短視頻,七牛短視頻:render3(...) // 網易,render4(...) // 聲網:render16(...) // 七牛直播,融云:render5(...) // 即構:render6(...) // 金山:render7(...) // 聲網視頻通話(前置攝像頭):render10(...) // 聲網視頻通話(后置攝像頭):render11(...) // 騰訊直播:render12(...) // 三體:render14(...) ~~~ ~~~ int textureId = MhDataManager.getInstance().render(texture, width, height); return textureId; //modification MhDataManager#render public?int?render(int?texture,?int?width,?int?height)?{ ????????if?(mMhManager?!=?null)?{ ????????????try?{ ????????????????texture?=?mMhManager.renderxxx(...); ????????????}?catch?(Exception?e)?{ ????????????????e.printStackTrace(); ????????????} ????????}else{ ???????????Log.e(TAG,?"render:?error"); ????????} ????????return?texture; ????} // Alibaba Cloub:render18(...) // Qiniu Cloud:render3(...) // Netease,render4(...) // Agora:render16(...) // Qiniu Cloud,RongCloud:render5(...) // ZEGO:render6(...) // Kingsoft:render7(...) // Agora(front-facing camera ):render10(...) // Agora(rear camera):render11(...) // Tencent live:render12(...) // santiyun:render14(...) ~~~ ***** **7.如何您使用了MhDataManager結束時銷毀防止內存泄漏(How do you use MhDataManager at the end of destruction to prevent memory leaks )** ~~~ MhDataManager.getInstance().release(); ~~~ ***** **8.切換SDK的語言** MHSDK目前支持中文和英語兩種語言 MHSDK currently supports both Chinese and English 可以通過在Application和Activity中修改context中的語言配置來切換語言,由于Appliction和Activity中獲取的context是不同對象 所以都需要修改 You can switch languages by changing the language configuration of the context in Application and Activity, which need to be changed because the context obtained in Application and Activity are different objects 示例例代碼如下: Example code is as follows: ~~~ Resources resources = getResources(); Configuration config = resources.getConfiguration(); DisplayMetrics dm = resources.getDisplayMetrics(); config.locale = Locale.ENGLISH; resources.updateConfiguration(config, dm); ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看