0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

OpenHarmony開發(fā)實(shí)例:【分布式游戲鑒權(quán)應(yīng)用】

jf_46214456 ? 來源:jf_46214456 ? 作者:jf_46214456 ? 2024-04-17 14:43 ? 次閱讀

1.介紹

本文將介紹分布式游戲鑒權(quán)應(yīng)用。操作過程為:

  1. 設(shè)備A點(diǎn)擊“開始游戲”按鈕,開始搜索周邊設(shè)備。
  2. 設(shè)備A顯示周邊設(shè)備,點(diǎn)擊設(shè)備B并發(fā)起連接請(qǐng)求,遠(yuǎn)程拉起設(shè)備B的FA。
  3. 設(shè)備B收到請(qǐng)求后,選擇是否允許“開啟游戲”。
    • 選擇允許,遠(yuǎn)程拉起設(shè)備A,并傳遞允許的信息,設(shè)備A解析了信息后自動(dòng)開始游戲。
    • 選擇不允許,遠(yuǎn)程拉起設(shè)備A,并傳遞不允許的信息,設(shè)備A回到最初的狀態(tài),并提示申請(qǐng)鑒權(quán)未通過。

效果圖展示:

image.png

2.相關(guān)概念

[gitee.com/li-shizhen-skin/harmony-os/blob/master/README.md]

3.搭建OpenHarmony環(huán)境

完成本篇Codelab我們首先要完成開發(fā)環(huán)境的搭建,本示例以RK3568開發(fā)板為例,參照以下步驟進(jìn)行:

  1. [獲取OpenHarmony系統(tǒng)版本]:標(biāo)準(zhǔn)系統(tǒng)解決方案(二進(jìn)制)。
    以3.1版本為例:
  2. 搭建燒錄環(huán)境。
    1. [完成DevEco Device Tool的安裝]
    2. [完成RK3568開發(fā)板的燒錄]

搜狗高速瀏覽器截圖20240326151547.png

  1. 搭建開發(fā)環(huán)境。
    1. 開始前請(qǐng)參考[工具準(zhǔn)備] ,完成DevEco Studio的安裝和開發(fā)環(huán)境配置。
    2. 開發(fā)環(huán)境配置完成后,請(qǐng)參考[使用工程向?qū) 創(chuàng)建工程(模板選擇“Empty Ability”) ,選擇JS或者eTS語言開發(fā)。
    3. 工程創(chuàng)建完成后,選擇使用[真機(jī)進(jìn)行調(diào)測(cè)] 。

4.分布式組網(wǎng)

本章節(jié)以系統(tǒng)自帶的音樂播放器為例(具體以實(shí)際的應(yīng)用為準(zhǔn)),介紹如何完成兩臺(tái)設(shè)備的分布式組網(wǎng)。

  1. 硬件準(zhǔn)備:準(zhǔn)備兩臺(tái)燒錄相同的版本系統(tǒng)的RK3568開發(fā)板A、B。
  2. 開發(fā)板A、B連接同一個(gè)WiFi網(wǎng)絡(luò)
    打開設(shè)置-->WLAN-->點(diǎn)擊右側(cè)WiFi開關(guān)-->點(diǎn)擊目標(biāo)WiFi并輸入密碼。

image.png

  1. 將設(shè)備A,B設(shè)置為互相信任的設(shè)備。

    • 找到系統(tǒng)應(yīng)用“音樂”。

    • 設(shè)備A打開音樂,點(diǎn)擊左下角流轉(zhuǎn)按鈕,彈出列表框,在列表中會(huì)展示遠(yuǎn)端設(shè)備的id。
    • 選擇遠(yuǎn)端設(shè)備B的id,另一臺(tái)開發(fā)板(設(shè)備B)會(huì)彈出驗(yàn)證的選項(xiàng)框。

image.png

  • 設(shè)備B點(diǎn)擊允許,設(shè)備B將會(huì)彈出隨機(jī)PIN碼,將設(shè)備B的PIN碼輸入到設(shè)備A的PIN碼填入框中。

配網(wǎng)完畢。

5.代碼結(jié)構(gòu)解讀

本篇Codelab只對(duì)核心代碼進(jìn)行講解,對(duì)于完整代碼,我們會(huì)在參考中提供下載方式,整個(gè)工程的代碼結(jié)構(gòu)如下:

  • common:存放公共資源
  • pages:存放頁面
    index.js:主頁面
  • config.json:配置文件

6.初始化頁面

在本章節(jié)中,您將學(xué)會(huì)如何進(jìn)行頁面初始化。

  1. 在data下定義需要使用的字段。
    data: {
      // 目標(biāo)設(shè)備Id,用于記錄申請(qǐng)過來的設(shè)備Id
      targetDeviceId: '',
      // 是否同意玩游戲
      isAgree: false,
      // 是否顯示開始游戲圖標(biāo)
      showStart: false
    },
    
  2. 根據(jù)Ability啟動(dòng)參數(shù)來判斷頁面被拉起的狀態(tài)。
    在拉起頁面時(shí)候,設(shè)置requestType為分布式拉起頁面的業(yè)務(wù)請(qǐng)求類型(申請(qǐng)鑒權(quán)或者回復(fù)鑒權(quán)結(jié)果),如果沒有requestType參數(shù),則為手動(dòng)拉起本機(jī)Ability。然后通過分析requestType參數(shù)的值來進(jìn)行不同的業(yè)務(wù)邏輯操作。
    onInit() {
      // 獲取Ability啟動(dòng)參數(shù)
      featureAbility.getWant().then((want) = > {
        if (want.parameters !== undefined && want.parameters !== null && want.parameters !== '') {
          // 如果是請(qǐng)求授權(quán)被拉起Ability(requestType === 0),則記錄申請(qǐng)權(quán)限的設(shè)備id
          if (want.parameters.requestType === 0) {
            this.isGame = false;
            this.targetDeviceId = want.parameters.localDeviceId;
          } else if (want.parameters.requestType === 1) {
            // 如果是授權(quán)后被拉起Ability(requestType === 1),則根據(jù)授權(quán)情況判斷是否進(jìn)行游戲
            if (want.parameters.isAgree !== null) {
              this.isAgree = want.parameters.isAgree;
              if (this.isAgree === true) {
                this.isGame = true;
                this.isStart = true;
                this.startGame();
              } else {
                this.showStart = true;
                prompt.showToast({
                  message: '申請(qǐng)授權(quán)未被允許',
                  duration: 5000
                });
              }
            }
            this.targetDeviceId = want.parameters.localDeviceId;
          } else {
            // 如果沒有請(qǐng)求類型字段(requestType),則表明是手動(dòng)啟動(dòng)的Ability,此時(shí)顯示啟動(dòng)游戲圖標(biāo)
            this.showStart = true;
          }
        }
      });
    

7.顯示鑒權(quán)設(shè)備

在本章節(jié)中,您將學(xué)會(huì)如何顯示需要鑒權(quán)的設(shè)備列表。效果圖如下:

  1. 在index.js文件中,在data下定義deviceList數(shù)組,用來表示周邊的設(shè)備。代碼如下:

    export default {
      data: {
        //可授權(quán)的設(shè)備
        deviceList: []
      }
    }
    
  2. 在index.hml文件中:

    • 定義一個(gè)"開始游戲"的button組件,設(shè)置startFA的點(diǎn)擊事件;
    • 顯示周邊設(shè)備的對(duì)話框dialog,使用list 、list-item實(shí)現(xiàn)設(shè)備列表的展示;
    • 通過for屬性遍歷deviceList數(shù)組,$item是每一項(xiàng)的實(shí)例;
    • 給每一項(xiàng)設(shè)置selectDevice點(diǎn)擊事件,參數(shù)為設(shè)備的networkId。

    代碼如下:

    < div class="container" >
        < button class="text-button" onclick="startFA" >開始游戲< /button >
        < dialog id="continueAbilityDialog" class="dialog-main" oncancel="cancelDialog" >
            < div class="dialog-div" >
                < text class="dialog_title_text" >選擇設(shè)備< /text >
                < list class="dialog_device_list" divider="true" >
                    < list-item for="{{ deviceList }}" class="device_list_item" >
                        < div >
                            < label class="device_item_title" target="{{ $item.id }}" >{{ $item.name }}< /label >
                            < input class="device_item_radio" type="radio" checked="{{ $item.id === 'localhost' }}"
                                   id="{{ $item.id }}"
                                   name="radioSample" value="{{ $item.id }}"
                                   onchange="onRadioChange({{ $item.id }})" >< /input >
                        < /div >
                    < /list-item >
                < /list >
                < div class="inner-btn" >
                    < button class="dialog_cancel_button" type="text" value="取消" onclick="onDismissDialogClicked" >< /button >
                < /div >
            < /div >
        < /dialog >
    < /div >
    
  3. 在index.css文件中,定義布局和樣式。代碼如下:

    .container {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .text-button{
        background-color: #5959f1;
        color: #FFFFFF;
        text-align: center;
        font-size: 16px;
        width: 80px;
        height: 40px;
        border-radius: 8px;
    }
    
    .select-device-dialog {
        width: 90%;
        height: 33%;
    }
    
    .select-device-wrapper {
        margin: 5%;
        width: 90%;
        height: 90%;
        flex-direction: column;
    }
    
    .select-device-title {
        width: 100%;
        height: 20%;
        text-align: left;
        font-size: 20px;
    }
    
    .select-device-list {
        width: 100%;
        height: 60%;
        text-align: left;
        font-size: 15px;
    }
    
    .select-device-item {
        width: 100%;
        height: 33%;
    }
    
    .select-device-item-left {
        width: 100%;
        height: 100%;
        text-align: left;
        font-size: 16px;
    }
    
    .dialog-main {
        width: 500px;
    }
    
    .dialog-div {
        flex-direction: column;
        align-items: center;
    }
    
    .dialog_title_text {
        width: 434px;
        height: 80px;
        font-size: 32px;
        font-weight: 600;
    }
    
    .dialog_cancel_button {
        width: 100%;
        font-size: 32px;
    }
    
  4. 在index.js文件中:

    • 定義createDeviceManager方法,獲得設(shè)備管理器實(shí)例并進(jìn)行獲得同一網(wǎng)段下的所有在線設(shè)備;
      // 創(chuàng)建實(shí)例
        createDeviceManager() {
          if (dmClass !== null) {
            return;
          }
          deviceManager.createDeviceManager('com.huawei.cookbook', (err, data) = > {
            if (err) {
              return;
            }
            subscribeId = Math.floor(Math.random() * 10000 + 1000);
            dmClass = data;
            dmClass.on('dmFaCallback', data = > this.log('dmFaCallback on:' + JSON.stringify(data)));
            dmClass.on('deviceStateChange', mFilterOption, data = > this.log('deviceStateChange on:' + JSON.stringify(data)));
            dmClass.on('deviceFound', data = > this.log('deviceFound on:' + JSON.stringify(data)));
            dmClass.on('discoverFail', data = > this.log('discoverFail on:' + JSON.stringify(data)));
            dmClass.on('serviceDie', data = > this.log('serviceDie on:' + JSON.stringify(data)));
            this.getLocalDeviceInfoSync();
            const deviceInfoList = dmClass.getTrustedDeviceListSync();
            const list = [];
            list[0] = DEVICE_LIST_LOCALHOST;
            if (deviceInfoList.length > 0) {
              for (let i = 0; i < deviceInfoList.length; i++) {
                list[i + 1] = {
                  name: deviceInfoList[i].deviceName,
                  id: deviceInfoList[i].deviceId
                };
              }
            }
            this.deviceList = list;
          });
        },
      
    • 定義getLocalDeviceInfoSync方法,獲取本設(shè)備信息;
      getLocalDeviceInfoSync() {
          if (dmClass != null) {
            deviceInfo = dmClass.getLocalDeviceInfoSync();
          } else {
            prompt.showToast({
              message: '請(qǐng)先初始化'
            });
          }
        },
      
    • 將獲取到的同一網(wǎng)段下的所有在線設(shè)備信息放入deviceList數(shù)組中;
    • 通過this.$element('showDialog')找到hml文件中dialog組件,調(diào)用show()方法顯示對(duì)話框。

8.鑒權(quán)申請(qǐng)與回應(yīng)

在本章節(jié)中,您將學(xué)會(huì)如何從設(shè)備A拉起設(shè)備B的FA,并將設(shè)備A的標(biāo)識(shí)信息發(fā)送給設(shè)備B。效果圖如下:

image.png

申請(qǐng)鑒權(quán)(同意游戲)

申請(qǐng)鑒權(quán)(拒絕游戲)

  1. 設(shè)備A點(diǎn)擊開始游戲,顯示可以進(jìn)行鑒權(quán)申請(qǐng)的設(shè)備列表,并選中設(shè)備申請(qǐng)游戲鑒權(quán)
    1. 定義startFa方法,用以顯示設(shè)備列表對(duì)話框;
      startFA() {
          this.$element('continueAbilityDialog').show();
        },
      
    2. 定義onRadioChange方法,用以監(jiān)聽選擇的設(shè)備變化;
      onRadioChange(inputValue, e) {
          if (inputValue === e.value) {
            if (e.value === 'localhost') {
              this.$element('continueAbilityDialog').close();
              return;
            }
            if (this.deviceList.length > 0) {
              for (let i = 0; i < this.deviceList.length; i++) {
                if (this.deviceList[i].id === e.value) {
                  this.startAbilityContinuation(this.deviceList[i].id, this.deviceList[i].name);
                }
              }
            }
          }
        },
      
    3. 定義startAbilityContinuation方法,用以申請(qǐng)鑒權(quán);
      startAbilityContinuation(deviceId, deviceName) {
          this.$element('continueAbilityDialog').close();
          const wantValue = {
            bundleName: 'com.huawei.cookbook',
            abilityName: 'com.huawei.gameauthopenh.MainAbility',
            deviceId: deviceId,
            // localDeviceId:申請(qǐng)?jiān)O(shè)備的id,requestType,請(qǐng)求類型:0,申請(qǐng)鑒權(quán)
            parameters: {'localDeviceId': deviceInfo.deviceId, 'requestType': 0}
          };
      
          featureAbility.startAbility({
            want: wantValue
          }).then((data) = > {
            // 銷毀自身Ability
            featureAbility.terminateSelf();
          });
        },
      
  2. 設(shè)備B被設(shè)備A分布式拉起,對(duì)游戲進(jìn)行授權(quán)
    1. index.hml頁面添加div用以顯示授權(quán)選項(xiàng);
      class="div-permit" if="{{!isGame}}" >
          < text class="text-title" >來自遠(yuǎn)程合成設(shè)備小游戲權(quán)限請(qǐng)求,是否允許?< /text >
          class="div-button"  >
              < text class="text-allow" onclick="responds(true)" >允許< /text >
              < text class="text-reject" onclick="responds(false)" >不允許< /text >
      
    2. 定義responds方法用以反饋鑒權(quán)結(jié)果,并分布式拉起設(shè)備A的Ability;
      responds(value) {
          const wantValue = {
            bundleName: 'com.huawei.cookbook',
            abilityName: 'com.huawei.gameauthopenh.MainAbility',
            deviceId: this.targetDeviceId,
            parameters: {'localDeviceId': deviceInfo.deviceId, 'requestType': 1, 'isAgree': value}
          };
          featureAbility.startAbility({
            want: wantValue
          }).then((data) = > {
            console.info('featureAbility.startAbility finished, ' + JSON.stringify(data));
            featureAbility.terminateSelf();
          });
        },
      
  3. 設(shè)備A被分布式拉起并解析鑒權(quán)結(jié)果,并根據(jù)結(jié)果執(zhí)行不同的操作;
    在onInit方法中調(diào)用featureAbility.getWant()來獲取啟動(dòng)信息并根據(jù)啟動(dòng)信息判斷游戲申請(qǐng)是否被拒絕;
    onInit() {
      ...
      // 獲取Ability啟動(dòng)參數(shù)
      featureAbility.getWant().then((want) = > {
        if (want.parameters !== undefined && want.parameters !== null && want.parameters !== '') {
          // 如果是請(qǐng)求授權(quán)被拉起Ability(requestType === 0),則記錄申請(qǐng)權(quán)限的設(shè)備id
          if (want.parameters.requestType === 0) {
            this.isGame = false;
            this.targetDeviceId = want.parameters.localDeviceId;
          } else if (want.parameters.requestType === 1) {
            // 如果是授權(quán)后被拉起Ability(requestType === 1),則根據(jù)授權(quán)情況判斷是否進(jìn)行游戲
            if (want.parameters.isAgree !== null) {
              this.isAgree = want.parameters.isAgree;
              if (this.isAgree === true) {
                this.isGame = true;
                this.isStart = true;
                this.startGame();
              } else {
                this.showStart = true;
                prompt.showToast({
                  message: '申請(qǐng)授權(quán)未被允許',
                  duration: 5000
                });
              }
            }
            this.targetDeviceId = want.parameters.localDeviceId;
          } else {
            // 如果沒有請(qǐng)求類型字段(requestType),則表明是手動(dòng)啟動(dòng)的Ability,此時(shí)顯示啟動(dòng)游戲圖標(biāo)
            this.showStart = true;
          }
        }
      });
      ...
    },
    
  4. index.css文件新增內(nèi)容如下:
    .div-permit{
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
    }
    .div-button{
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }
    .text-title{
        color: #222222;
        font-size: 22px;
        align-items: center;
        align-content: center;
        margin: 20px;
    }
    .text-allow{
        color: #3E7BDE;
        font-size: 18px;
        margin-right: 10px;
    }
    .text-reject{
        color: #212121;
        font-size: 18px;
        margin-left: 10px;
    }
    

9.游戲:圖形的運(yùn)動(dòng)、碰撞與合成

  • [圖形的運(yùn)動(dòng)]
  • [圖形的碰撞與合成

如下圖所示,按照從左到右的順序,相同的圖形碰撞合成下一個(gè)圖形,最終合成OpenHarmony圖形。

效果圖預(yù)覽:

圖形的運(yùn)動(dòng)

  1. 在index.js的data下定義圖片資源數(shù)組imgArray和顯示在屏幕中圖片的數(shù)組modes。代碼如下:

    export default {
      data: {
        // 圖片數(shù)組
        imgArray: ['common/images/product0.png', 'common/images/product1.png',
          'common/images/product2.png', 'common/images/product3.png',
          'common/images/product4.png', 'common/images/product5.png',
          'common/images/product6.png'],
        //在屏幕中出現(xiàn)的數(shù)據(jù)
        modes: [],
      }
    }
    

    modes添加數(shù)據(jù)模型格式為:要顯示的圖形路徑src、圖形的寬度width、圖形的高度height、圖形的等級(jí)level(用于區(qū)分不同的圖形),以及圖形的左坐標(biāo)left、頂部坐標(biāo)top和其在x、y方向上的速度。新增一個(gè)數(shù)據(jù)模型到數(shù)組中,代碼如下:

    addNewData() {
      var index = Math.floor(Math.random() * 4);
      var src = this.imgArray[index];
      var width = 50 + index * 10;
      var height = 50 + index * 10;
    
      this.modes.push({
        level: index,
        width: width,
        height: height,
        src: src,
        top: 0,
        left: 120,
        speedX: 0,
        speedY: 10,
      })
    }
    
  2. 在index.hml文件中,遍歷modes數(shù)組,用Image組件顯示圖形,只需要?jiǎng)討B(tài)更改class、style、src等屬性即可。代碼如下:

    < div class="div-image" if="{{isStart}}" >
        < image for="{{ (index, item) in modes }}"
               class="product{{ item.level }}"
               style="top : {{ item.top }}; left : {{ item.left }}" src="{{ item.src }} "/ >
    < /div >
    

    對(duì)應(yīng)的index.css新增內(nèi)容如下:

    .div-image{
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        width: 100%;
        height: 100%;
    }
    
    .product0{
        width: 50px;
        height: 50px;
        position: absolute;
    }
    .product1{
        width: 60px;
        height: 60px;
        position: absolute;
    }
    .product2{
        width: 70px;
        height: 70px;
        position: absolute;
    }
    .product3{
        width: 80px;
        height: 80px;
        position: absolute;
    }
    .product4{
        width: 90px;
        height: 90px;
        position: absolute;
    }
    .product5{
        width: 100px;
        height: 100px;
        position: absolute;
    }
    .product6{
        width: 110px;
        height: 110px;
        position: absolute;
    }
    
  3. 使用setInterval()開啟定時(shí)器,反復(fù)執(zhí)行excuteTask()方法,該方法用來計(jì)算圖形的運(yùn)動(dòng)。圖形的移動(dòng)主要是將圖形的頂部top和左側(cè)left的坐標(biāo)值,每次遞增各自的x、y方向的速度值。部分代碼如下:

    export default {
      startGame(){
        addNewData();
        intervalId = setInterval(this.excuteTask, 50);
      },
      excuteTask(){     
        this.modes.forEach(item = > {
          item.top += item.speedY;
          item.left += item.speedX;
        });
      }
    }
    

圖形的碰撞與合成

這部分僅介紹核心的思路,具體的實(shí)現(xiàn)過程讀者可自行完成,其達(dá)到的效果圖如下:

  1. 兩個(gè)圖形若滿足它們的的圓心距離小于它們半徑的總和,則認(rèn)為它們發(fā)生了碰撞。部分代碼如下:
    isCollision(run, other) {
      var runCenterX = run.left + run.width / 2;
      var runCenterY = run.top + run.width / 2;
      var otherCenterX = other.left + other.width / 2;
      var otherCenterY = other.top + other.width / 2;
      var distance = Math.sqrt(Math.abs(runCenterX - otherCenterX) * Math.abs(runCenterX - otherCenterX) +
      Math.abs(runCenterY - otherCenterY) * Math.abs(runCenterY - otherCenterY));
      if (distance < (run.width + other.width) / 2) {     return true;
      }
      return false;
    }
    
  2. 通過判斷兩個(gè)圖形的等級(jí)level值是否相等,若相等就可以進(jìn)行合成。部分代碼如下:
    isCompose( productA,  productB) {
      return productA.level == productB.level;
    }
    

審核編輯 黃宇

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
  • 分布式
    +關(guān)注

    關(guān)注

    1

    文章

    843

    瀏覽量

    74427
  • 鴻蒙
    +關(guān)注

    關(guān)注

    57

    文章

    2295

    瀏覽量

    42646
  • OpenHarmony
    +關(guān)注

    關(guān)注

    25

    文章

    3614

    瀏覽量

    15995
  • 鴻蒙OS
    +關(guān)注

    關(guān)注

    0

    文章

    188

    瀏覽量

    4349
收藏 人收藏

    評(píng)論

    相關(guān)推薦

    OpenHarmony分布式開發(fā)前奏

    分布式軟總線是手機(jī)、平板、智能穿戴、智慧屏、車機(jī)等分布式設(shè)備的通信基座,為設(shè)備之間的互聯(lián)互通提供了統(tǒng)一的分布式通信能力,為設(shè)備之間的無感發(fā)現(xiàn)和零等待傳輸創(chuàng)造了條件。開發(fā)者只需聚焦于業(yè)務(wù)
    的頭像 發(fā)表于 12-01 14:14 ?1201次閱讀
    <b class='flag-5'>OpenHarmony</b><b class='flag-5'>分布式</b><b class='flag-5'>開發(fā)</b>前奏

    OpenHarmony南向開發(fā)案例:【分布式畫板】

    使用OpenHarmony3.1-Release開發(fā)的應(yīng)用。通過OpenHarmony分布式技術(shù),使多人能夠一起畫畫。
    的頭像 發(fā)表于 04-12 14:40 ?947次閱讀
    <b class='flag-5'>OpenHarmony</b>南向<b class='flag-5'>開發(fā)</b>案例:【<b class='flag-5'>分布式</b>畫板】

    OpenHarmony南向開發(fā)實(shí)例:【游戲手柄】

    基于TS擴(kuò)展的聲明開發(fā)范式編程語言,以及OpenHarmony分布式能力實(shí)現(xiàn)的一個(gè)手柄游戲
    的頭像 發(fā)表于 04-17 10:21 ?665次閱讀
    <b class='flag-5'>OpenHarmony</b>南向<b class='flag-5'>開發(fā)</b><b class='flag-5'>實(shí)例</b>:【<b class='flag-5'>游戲</b>手柄】

    簡單3步,OpenHarmony上跑起ArkUI分布式游戲

    轉(zhuǎn)自:OpenAtom OpenHarmony在9月30日更新的 OpenHarmony3.0 LTS 上,標(biāo)準(zhǔn)系統(tǒng)新增支持了方舟開發(fā)框架(ArkUI)、分布式組網(wǎng)和 FA 跨設(shè)備遷移
    發(fā)表于 12-13 17:11

    基于潤和DAYU200開發(fā)套件的OpenHarmony分布式音樂播放器

    :參考DevEco Studio(OpenHarmony)使用指南搭建OpenHarmony應(yīng)用開發(fā)環(huán)境、并導(dǎo)入本工程進(jìn)行編譯、運(yùn)行。運(yùn)行結(jié)果截圖:【分布式流轉(zhuǎn)體驗(yàn)】硬件準(zhǔn)備:準(zhǔn)備兩臺(tái)
    發(fā)表于 03-14 09:07

    OpenHarmony標(biāo)準(zhǔn)設(shè)備應(yīng)用開發(fā)(三)——分布式數(shù)據(jù)管理

    (以下內(nèi)容來自開發(fā)者分享,不代表 OpenHarmony 項(xiàng)目群工作委員會(huì)觀點(diǎn))邢碌上一章,我們通過分布式音樂播放器、分布式***、分布式
    發(fā)表于 04-07 18:48

    OpenHarmony3.1分布式技術(shù)資料合集

    客戶端(ScreenClient):屏幕圖像顯示代理客戶端,用于在設(shè)備上顯示其他設(shè)備投射過來的屏幕圖像數(shù)據(jù)。3、OpenHarmony3.1的分布式手寫板1.介紹基于TS擴(kuò)展的聲明開發(fā)
    發(fā)表于 04-11 11:50

    基于OpenHarmony開發(fā)的demo樣例展示

    基于OpenHarmony開發(fā)的demo樣例,包括智能停車場、分布式游戲分布式音頻播放、分布式
    發(fā)表于 04-27 15:12

    OpenHarmony開發(fā)之Ability架構(gòu)

    ][分布式手寫板(eTS)][分布式權(quán)(JS)][分布式游戲手柄(eTS)][
    發(fā)表于 05-12 15:12

    【學(xué)習(xí)打卡】OpenHarmony分布式任務(wù)調(diào)度

    之前我們分享過分布式軟總線和分布式數(shù)據(jù)管理,今天主要說一下OpenHarmony分布式任務(wù)調(diào)度,分布式任務(wù)調(diào)度是建立在
    發(fā)表于 07-18 17:06

    開發(fā)樣例】OpenHarmony分布式購物車

    設(shè)計(jì)OpenHarmony技術(shù)特性eTS UI分布式調(diào)度分布式數(shù)據(jù)管理3.支持OpenHarmony版本OpenHarmony 3.0 LT
    發(fā)表于 07-29 14:17

    OpenHarmony 分布式硬件關(guān)鍵技術(shù)

    的視頻會(huì)議;在影音娛樂場景下,能夠輕松地把手機(jī)音視頻放到電視和音箱上播放,還可以讓家里的燈光自動(dòng)跟隨電影和音樂進(jìn)行變化,實(shí)現(xiàn)非常震撼的家庭影院的效果。 期待越來越多的開發(fā)者參與OpenHarmony的生態(tài)中來,共同研究和探討分布式
    發(fā)表于 08-24 17:25

    基于OpenHarmony分布式應(yīng)用開發(fā)框架使用教程

    電子發(fā)燒友網(wǎng)站提供《基于OpenHarmony分布式應(yīng)用開發(fā)框架使用教程.zip》資料免費(fèi)下載
    發(fā)表于 04-12 11:19 ?9次下載

    OpenHarmony技術(shù)論壇:分布式相機(jī)和分布式圖庫功能

    OpenHarmony Tech Day·技術(shù)日》 技術(shù)論壇 新增分布式相機(jī)和分布式圖庫功能 相比OpenHarmony 3.0版本,OpenHa
    的頭像 發(fā)表于 04-25 15:06 ?1750次閱讀
    <b class='flag-5'>OpenHarmony</b>技術(shù)論壇:<b class='flag-5'>分布式</b>相機(jī)和<b class='flag-5'>分布式</b>圖庫功能

    OpenHarmony知識(shí)賦能No.29-DAYU200分布式應(yīng)用開發(fā)

    OpenHarmony標(biāo)準(zhǔn)系統(tǒng)北向開發(fā)高手。 ? 嘉賓介紹: 徐建國 資深技術(shù)專家(江蘇潤開鴻數(shù)字科技有限公司) ? 課程內(nèi)容: 1.OpenHarmony分布式API介紹 a.
    的頭像 發(fā)表于 05-04 09:57 ?794次閱讀
    <b class='flag-5'>OpenHarmony</b>知識(shí)賦能No.29-DAYU200<b class='flag-5'>分布式</b>應(yīng)用<b class='flag-5'>開發(fā)</b>