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

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

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

HarmonyOS開(kāi)發(fā)實(shí)例:【分布式新聞客戶端】

jf_46214456 ? 來(lái)源:jf_46214456 ? 作者:jf_46214456 ? 2024-04-17 15:57 ? 次閱讀

介紹

本篇Codelab基于柵格布局、設(shè)備管理和多端協(xié)同,實(shí)現(xiàn)一次開(kāi)發(fā),多端部署的分布式新聞客戶端頁(yè)面。主要包含以下功能:

  1. 展示新聞列表以及左右滑動(dòng)切換新聞Tab。
  2. 點(diǎn)擊新聞?wù)故拘侣勗斍轫?yè)。
  3. 點(diǎn)擊新聞詳情頁(yè)底部的分享按鈕,發(fā)現(xiàn)周邊處在同一無(wú)線網(wǎng)絡(luò)下的設(shè)備并進(jìn)行可信認(rèn)證連接。
  4. 可信認(rèn)證后,再次點(diǎn)擊分享按鈕,選擇已連接的設(shè)備進(jìn)行跨設(shè)備啟動(dòng)UIAbility。

最終效果圖如下:

相關(guān)概念

  • [柵格布局]:一種通用的輔助定位工具,解決多尺寸多設(shè)備的動(dòng)態(tài)布局問(wèn)題。
  • [設(shè)備管理]:模塊提供分布式設(shè)備管理能力。
  • [跨設(shè)備啟動(dòng)UIAbility]:多端上的不同UIAbility/ServiceExtensionAbility同時(shí)運(yùn)行、或者交替運(yùn)行實(shí)現(xiàn)完整的業(yè)務(wù)。
  • [Tabs組件]:通過(guò)頁(yè)簽進(jìn)行內(nèi)容視圖切換的容器組件,每個(gè)頁(yè)簽對(duì)應(yīng)一個(gè)內(nèi)容視圖。

相關(guān)權(quán)限

本篇Codelab使用了設(shè)備管理及跨設(shè)備實(shí)現(xiàn)多端協(xié)同能力,需要手動(dòng)替換full-SDK,并在配置文件module.json5文件requestPermissions屬性中添加如下權(quán)限:

  • [分布式設(shè)備認(rèn)證組網(wǎng)權(quán)限]:ohos.permission.ACCESS_SERVICE_DM。
  • [設(shè)備間的數(shù)據(jù)交換權(quán)限]:ohos.permission.DISTRIBUTED_DATASYNC。

約束與限制

  1. 本篇Codelab部分能力依賴于系統(tǒng)API,需下載full-SDK并替換DevEco Studio自動(dòng)下載的public-SDK。具體操作可參考指南[《如何替換full-SDK》]。
  2. 本篇Codelab使用的部分API僅系統(tǒng)應(yīng)用可用,需要提升應(yīng)用等級(jí)。

環(huán)境搭建

軟件要求

  • [DevEco Studio]版本:DevEco Studio 4.0 Beta2。
  • OpenHarmony SDK版本:API version 10。
  • 鴻蒙開(kāi)發(fā)文檔指導(dǎo):[qr23.cn/AKFP8k]

硬件要求

  • 開(kāi)發(fā)板類型:[潤(rùn)和RK3568開(kāi)發(fā)板]。
  • OpenHarmony系統(tǒng):4.0 Beta1。

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

環(huán)境搭建

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

  1. [獲取OpenHarmony系統(tǒng)版本]:標(biāo)準(zhǔn)系統(tǒng)解決方案(二進(jìn)制)。以4.0 Beta1版本為例:

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

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

本篇Codelab只對(duì)核心代碼進(jìn)行講解,對(duì)于完整代碼,我們會(huì)在gitee中提供。

├──entry/src/main/ets                   // 代碼區(qū)
│  ├──common
│  │  ├──constants
│  │  │  └──CommonConstants.ets         // 常量類
│  │  └──utils
│  │     └──Logger.ets                  // 日志工具類
│  ├──entryability
│  │  └──EntryAbility.ets               // 程序入口類
│  ├──model
│  │  └──RemoteDeviceModel.ets          // 設(shè)備管理類
│  ├──pages
│  │  ├──Index.ets                      // 新聞列表頁(yè)
│  │  └──NewsDetail.ets                 // 新聞詳情頁(yè)
│  ├──view
│  │  ├──DetailFooter.ets               // 詳情頁(yè)頁(yè)腳
│  │  ├──DetailHeadContent.ets          // 新聞詳情
│  │  ├──DeviceListDialog.ets           // 設(shè)備列表彈窗
│  │  ├──NewsList.ets                   // 新聞列表
│  │  └──NewsTab.ets                    // 新聞頁(yè)簽
│  └──viewmodel
│     └──NewsDataModel.ets              // 新聞數(shù)據(jù)處理
└──entry/src/main/resources             // 資源文件目錄

構(gòu)建新聞列表頁(yè)

新聞列表頁(yè)由頁(yè)簽區(qū)域和新聞列表區(qū)域組成,頁(yè)簽區(qū)域?yàn)樽远x布局TabBuilder,新聞列表區(qū)域?yàn)門(mén)abs組件嵌套List組件,并適配不同尺寸設(shè)備對(duì)應(yīng)的柵格。新聞列表頁(yè)能夠左右滑動(dòng)或點(diǎn)擊頁(yè)簽切換新聞Tab,并設(shè)置點(diǎn)擊新聞跳轉(zhuǎn)至新聞詳情頁(yè)。

// NewsTab.ets
@Component
export default struct NewsTab {
  @State currentIndex: number = 0;
  @State currentBreakpoint: string = CommonConstants.BREAKPOINT_SM;
  private newsItems: NewsData[] = [];

  // 自定義頁(yè)簽欄
  @Builder TabBuilder(title: Resource, index: number) {
    Row() {
      Text(title)
        .fontSize(this.currentIndex === index ? $r('app.float.lager_font_size') : $r('app.float.middle_font_size'))
        .fontWeight(this.currentIndex === index ? CommonConstants.FONT_WEIGHT_500 : FontWeight.Normal)
        .fontColor(this.currentIndex === index ? $r('app.color.tab_font_select') : $r('app.color.font_color_gray'))
    }
    .layoutWeight(1)
    .margin({
      right: $r('app.float.news_tab_margin_right'),
      left: (this.currentBreakpoint === CommonConstants.BREAKPOINT_SM && index === 0) ?
        $r('app.float.news_tab_margin_left') : 0
    })
    .height(this.currentIndex === index ? $r('app.float.news_tab_current_height') : $r('app.float.news_tab_height'))
  }

  build() {
    ...
    Tabs() {
      ForEach(CommonConstants.ALL_TITLE, (title: string, index: number) = > {
        TabContent() {
          // 新聞內(nèi)容列表
          NewsList({ newsItems: NewsDataModel.getNewsByType(this.newsItems, title) })
        }
        .tabBar(this.TabBuilder(NewsDataModel.getTypeByStr(title), index))
      }, (title: string, index: number) = > index + JSON.stringify(title))
    }
    .barHeight($r('app.float.news_tab_bar_height'))
    .barWidth(CommonConstants.FULL_COMPONENT)
    .barMode(this.currentBreakpoint === CommonConstants.BREAKPOINT_SM ? BarMode.Scrollable : BarMode.Fixed)
    .onChange((index: number) = > {
      this.currentIndex = index;
    })
    ...
  }
}

// NewsList.ets
@Component
export default struct NewsList {
  private newsItems: NewsData[] = [];

  build() {
    List() {
      ForEach(this.newsItems, (item: NewsData, index: number) = > {
        ListItem() {
          // 柵格布局
          GridRow({
            columns: {
              sm: CommonConstants.FOUR_COLUMN,
              md: CommonConstants.EIGHT_COLUMN,
              lg: CommonConstants.TWELVE_COLUMN
            },
            breakpoints: {
              value: [
                CommonConstants.SMALL_DEVICE_TYPE,
                CommonConstants.MIDDLE_DEVICE_TYPE,
                CommonConstants.LARGE_DEVICE_TYPE
              ]
            },
            gutter: { x: $r('app.float.grid_row_gutter') }
          }) {
            GridCol({
              span: {
                sm: CommonConstants.FOUR_COLUMN,
                md: CommonConstants.EIGHT_COLUMN,
                lg: CommonConstants.EIGHT_COLUMN
              },
              offset: {
                sm: CommonConstants.ZERO_COLUMN,
                md: CommonConstants.ZERO_COLUMN,
                lg: CommonConstants.TWO_COLUMN
              }
            }) {
              NewsItem({ newsItem: item, isLast: index === this.newsItems.length - 1 })
            }
          }
        }
      }, (item: NewsData, index: number) = > index + JSON.stringify(item))
    }
    .height(CommonConstants.FULL_COMPONENT)
  }
}

[](https://gitee.com/openharmony/codelabs/tree/master/Distributed/DistributedNewsClient#%E6%9E%84%E5%BB%BA%E6%96%B0%E9%97%BB%E8%AF%A6%E6%83%85%E9%A1%B5)構(gòu)建新聞詳情頁(yè)

[](https://gitee.com/openharmony/codelabs/tree/master/Distributed/DistributedNewsClient#%E6%96%B0%E9%97%BB%E8%AF%A6%E6%83%85%E9%A1%B5)新聞詳情頁(yè)

新聞詳情頁(yè)由新聞內(nèi)容區(qū)域和頁(yè)腳區(qū)域組成,其中新聞內(nèi)容區(qū)域?yàn)镾croll組件嵌套柵格組件展示新聞詳情,頁(yè)腳區(qū)域?yàn)闁鸥癫季?,包含TextInput組件和三個(gè)按鈕圖標(biāo)。

// DetailHeadContent.ets
build() {
  Column() {
    ...
    // 可滾動(dòng)的容器組件
    Scroll() {
      // 柵格布局
      GridRow({
        columns: {
          sm: CommonConstants.FOUR_COLUMN,
          md: CommonConstants.EIGHT_COLUMN,
          lg: CommonConstants.TWELVE_COLUMN
        },
        breakpoints: {
          value: [
          CommonConstants.SMALL_DEVICE_TYPE,
          CommonConstants.MIDDLE_DEVICE_TYPE,
          CommonConstants.LARGE_DEVICE_TYPE
          ]
        },
        gutter: { x: $r('app.float.grid_row_gutter') }
      }) {
        GridCol({
          span: {
            sm: CommonConstants.FOUR_COLUMN,
            md: CommonConstants.EIGHT_COLUMN,
            lg: CommonConstants.EIGHT_COLUMN
          },
          offset: {
            sm: CommonConstants.ZERO_COLUMN,
            md: CommonConstants.ZERO_COLUMN,
            lg: CommonConstants.TWO_COLUMN
          }
        }) {
          ...
        }
        ...
      }
    }
    .padding({
      bottom: $r('app.float.news_detail_padding_bottom')
    })
    .scrollBar(BarState.Off)
  }
  .margin({
    left: $r('app.float.news_detail_margin'),
    right: $r('app.float.news_detail_margin')
  })
  .height(CommonConstants.FULL_COMPONENT)
  .alignItems(HorizontalAlign.Start)
}

// DetailFooter.ets
build() {
  Column() {
    // 分割線
    Divider()
      .color($r('app.color.detail_divider_color'))
      .width(CommonConstants.FULL_COMPONENT)

    // 柵格布局
    GridRow({
      columns: {
        sm: CommonConstants.FOUR_COLUMN,
        md: CommonConstants.EIGHT_COLUMN,
        lg: CommonConstants.TWELVE_COLUMN
      },
      breakpoints: {
        value: [
        CommonConstants.SMALL_DEVICE_TYPE,
        CommonConstants.MIDDLE_DEVICE_TYPE,
        CommonConstants.LARGE_DEVICE_TYPE
        ]
      },
      gutter: { x: $r('app.float.grid_row_gutter') }
    }) {
      GridCol({
        span: {
          sm: CommonConstants.FOUR_COLUMN,
          md: CommonConstants.EIGHT_COLUMN,
          lg: CommonConstants.EIGHT_COLUMN
        },
        offset: {
          sm: CommonConstants.ZERO_COLUMN,
          md: CommonConstants.ZERO_COLUMN,
          lg: CommonConstants.TWO_COLUMN
        }
      }) {
        ...
      }
      .margin({
        left: this.currentBreakpoint === CommonConstants.BREAKPOINT_SM ? $r('app.float.footer_margin_sm') :
          $r('app.float.footer_margin_other'),
        right: this.currentBreakpoint === CommonConstants.BREAKPOINT_SM ? $r('app.float.footer_margin_sm') :
          $r('app.float.footer_margin_other')
      })
    }
    .backgroundColor($r('app.color.bg_color_gray'))
    .height($r('app.float.footer_height'))
    .width(CommonConstants.FULL_COMPONENT)
    .onBreakpointChange((breakpoints) = > {
      ...
    })
  }
}

分享按鈕彈窗

頁(yè)腳點(diǎn)擊分享按鈕,彈出自定義彈窗DeviceListDialog,用于多端協(xié)同拉起應(yīng)用。DeviceListDialog由兩個(gè)標(biāo)題欄和兩個(gè)List組件構(gòu)成,其中List組件使用ForEach循環(huán)渲染設(shè)備數(shù)據(jù)。

// DeviceListDialog.ets
build() {
  Column() {
    Row() {
      ...
    }
    .height($r('app.float.choose_device_row_height'))
    .width(CommonConstants.FULL_COMPONENT)
    .padding({
      left: $r('app.float.dialog_padding'),
      right: $r('app.float.dialog_padding')
    })

    // 信任設(shè)備列表
    List() {
      ForEach(this.trustedDeviceList, (item: deviceManager.DeviceInfo, index: number) = > {
        ListItem() {
          ...
        }
      }, (item: deviceManager.DeviceInfo) = > JSON.stringify(item.deviceId))
    }

    Row() {
      ...
    }
    .height($r('app.float.choose_device_row_height'))
    .width(CommonConstants.FULL_COMPONENT)
    .padding({
      left: $r('app.float.dialog_padding'),
      right: $r('app.float.dialog_padding')
    })

    // 發(fā)現(xiàn)設(shè)備列表
    List() {
      ForEach(this.discoverDeviceList, (item: deviceManager.DeviceInfo, index: number) = > {
        ListItem() {
          ...
        }
      }, (item: deviceManager.DeviceInfo) = > JSON.stringify(item.deviceId))
    }

    Row() {
      ...
    }
    .height($r('app.float.dialog_button_row_height'))
    .padding({
      top: $r('app.float.dialog_button_padding_top'),
      bottom: $r('app.float.dialog_button_padding_bottom'),
      left: $r('app.float.dialog_padding'),
      right: $r('app.float.dialog_padding')
    })
    .width(CommonConstants.FULL_COMPONENT)
  }
  .borderRadius($r('app.float.dialog_border_radius'))
  .backgroundColor($r('app.color.device_dialog_background'))
  .width(CommonConstants.FULL_COMPONENT)
}

多端協(xié)同拉起應(yīng)用

創(chuàng)建設(shè)備管理器

應(yīng)用創(chuàng)建時(shí)創(chuàng)建一個(gè)設(shè)備管理器實(shí)例,注冊(cè)設(shè)備狀態(tài)監(jiān)聽(tīng)和獲取信任的設(shè)備列表。其中deviceManager類需使用full-SDK。

// EntryAbility.ets
onCreate(want: Want) {
  ...
  // 創(chuàng)建設(shè)備管理器
  RemoteDeviceModel.createDeviceManager(this.context);
}

// RemoteDeviceModel.ets
async createDeviceManager(context: common.UIAbilityContext): Promise< void > {
  if (this.deviceManager !== undefined) {
    return;
  }
  await new Promise((resolve: (value: Object | PromiseLike< Object >) = > void, reject:
    ((reason?: RejectError) = > void)) = > {
    deviceManager.createDeviceManager(context.abilityInfo.bundleName, (err, value) = > {
      if (err) {
        reject(err);
        logger.error('createDeviceManager failed.');
        return;
      }
      this.deviceManager = value;
      // 注冊(cè)設(shè)備狀態(tài)監(jiān)聽(tīng)
      this.registerDeviceStateListener();
      // 獲取信任設(shè)備列表
      this.getTrustedDeviceList();
      resolve(value);
    })
  })
}

發(fā)現(xiàn)設(shè)備

用戶點(diǎn)擊新聞詳情頁(yè)底部的分享按鈕,調(diào)用startDeviceDiscovery()方法,發(fā)現(xiàn)周邊處在同一無(wú)線網(wǎng)絡(luò)下的設(shè)備并添加設(shè)備至已發(fā)現(xiàn)的設(shè)備列表。

// RemoteDeviceModel.ets
startDeviceDiscovery(): void {
  if (this.deviceManager === undefined) {
    logger.error('deviceManager has not initialized');
    this.showToast($r('app.string.no_device_manager'));
    return;
  }
  this.deviceManager.on('deviceFound', (data) = > {
    if (data === null) {
      return;
    }
    // 監(jiān)聽(tīng)設(shè)備發(fā)現(xiàn)
    this.deviceFound(data);
  })
  this.deviceManager.on('discoverFail', (data) = > {
    logger.error(`discoverFail data = ${JSON.stringify(data)}`);
  })
  this.deviceManager.on('serviceDie', () = > {
    logger.error('serviceDie');
  })

  let info: deviceManager.SubscribeInfo = {
    subscribeId: SUBSCRIBE_ID,
    mode: CommonConstants.INFO_MODE,
    medium: 0,
    freq: CommonConstants.INFO_FREQ,
    isSameAccount: false,
    isWakeRemote: true,
    capability: 0
  };
  // 添加設(shè)備至發(fā)現(xiàn)列表
  this.discoverList = [];
  AppStorage.setOrCreate(CommonConstants.DISCOVER_DEVICE_LIST, this.discoverList);

  try {
    this.deviceManager.startDeviceDiscovery(info);
  } catch (err) {
    logger.error(`startDeviceDiscovery failed error = ${JSON.stringify(err)}`);
  }
}

進(jìn)行可信認(rèn)證連接

在已發(fā)現(xiàn)的設(shè)備列表中選擇設(shè)備,調(diào)用authenticateDevice()方法進(jìn)行可信認(rèn)證,輸入PIN碼,連接設(shè)備,將設(shè)備改為信任狀態(tài),添加至已信任設(shè)備列表。

// RemoteDeviceModel.ets
authenticateDevice(device: deviceManager.DeviceInfo, context: common.UIAbilityContext): void {
  if (this.deviceManager === undefined) {
    logger.error('deviceManager has not initialized');
    this.showToast($r('app.string.no_device_manager'));
    return;
  }

  for (let i: number = 0; i < this.discoverList.length; i++) {
    if (this.discoverList[i].deviceId !== device.deviceId) {
      continue;
    }
    let extraInfo: AuthExtraInfoInterface = {
      targetPkgName: context.abilityInfo.bundleName,
      appName: context.applicationInfo.name,
      appDescription: context.applicationInfo.description,
      business: CommonConstants.ZERO
    };
    let authParam: deviceManager.AuthParam = {
      'authType': CommonConstants.ONE,
      'extraInfo': extraInfo
    };
    try {
      // 可信認(rèn)證
      this.deviceManager.authenticateDevice(device, authParam, (err) = > {
        if (err) {
          logger.error(`authenticateDevice error. Code is ${err.code}, message is ${err.message}`);
          return;
        }
      })
    } catch (err) {
      logger.error(`authenticateDevice failed error = ${JSON.stringify(err)}`);
    }
  }
}

跨設(shè)備啟動(dòng)UIAbility

可信認(rèn)證后,用戶再次點(diǎn)擊分享按鈕,選擇已信任設(shè)備列表中的設(shè)備,調(diào)用startAbilityContinuation()方法進(jìn)行拉起應(yīng)用,在另一設(shè)備中觸發(fā)aboutToAppear()方法渲染當(dāng)前的新聞詳情頁(yè),實(shí)現(xiàn)跨設(shè)備啟動(dòng)UIAbility。

// DeviceListDialog.ets
function startAbilityContinuation(deviceId: string, newsId: string, context: common.UIAbilityContext): void {
  let want: Want = {
    deviceId: deviceId,
    bundleName: context.abilityInfo.bundleName,
    abilityName: CommonConstants.ABILITY_NAME,
    parameters: {
      newsId: newsId
    }
  };
  // 拉起應(yīng)用
  context.startAbility(want).catch((err: Error) = > {
    Logger.error(`startAbilityContinuation failed error = ${JSON.stringify(err)}`);
    prompt.showToast({
      message: $r('app.string.start_ability_continuation_error')
    });
  })
}

// NewsDetail.ets
aboutToAppear() {
  let newsId: string | undefined = AppStorage.get< string >('wantNewsId');
  if (newsId === undefined) {
    this.newsData = (router.getParams() as Record< string, NewsData >)['newsItem'];
    return;
  }
  // 讀取跨設(shè)備傳遞的參數(shù)信息
  this.newsData = this.newsItems.filter((item: NewsData) = > (item.newsId === newsId))[0];
}

審核編輯 黃宇

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

    關(guān)注

    1

    文章

    842

    瀏覽量

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

    關(guān)注

    57

    文章

    2287

    瀏覽量

    42629
  • HarmonyOS
    +關(guān)注

    關(guān)注

    79

    文章

    1954

    瀏覽量

    29897
  • OpenHarmony
    +關(guān)注

    關(guān)注

    25

    文章

    3607

    瀏覽量

    15956
收藏 人收藏

    評(píng)論

    相關(guān)推薦

    HarmonyOS開(kāi)發(fā)實(shí)例:【分布式數(shù)據(jù)管理】

    eTS中分布式數(shù)據(jù)管理的使用,包括KVManager對(duì)象實(shí)例的創(chuàng)建和KVStore數(shù)據(jù)流轉(zhuǎn)的使用。
    的頭像 發(fā)表于 04-11 09:57 ?838次閱讀
    <b class='flag-5'>HarmonyOS</b><b class='flag-5'>開(kāi)發(fā)</b><b class='flag-5'>實(shí)例</b>:【<b class='flag-5'>分布式</b>數(shù)據(jù)管理】

    HarmonyOS應(yīng)用開(kāi)發(fā)-分布式任務(wù)調(diào)度

    1. 介紹本篇CodeLab將實(shí)現(xiàn)的內(nèi)容HarmonyOS是面向全場(chǎng)景多終端的分布式操作系統(tǒng),使得應(yīng)用程序的開(kāi)發(fā)打破了智能終端互通的性能和數(shù)據(jù)壁壘,業(yè)務(wù)邏輯原子化開(kāi)發(fā),適配多端。通過(guò)一
    發(fā)表于 09-18 09:21

    HarmonyOS應(yīng)用開(kāi)發(fā)-分布式設(shè)計(jì)

    設(shè)計(jì)理念HarmonyOS 是面向未來(lái)全場(chǎng)景智慧生活方式的分布式操作系統(tǒng)。對(duì)消費(fèi)者而言,HarmonyOS 將生活場(chǎng)景中的各類終端進(jìn)行能力整合,形成“One Super Device”,以實(shí)現(xiàn)
    發(fā)表于 09-22 17:11

    HarmonyOS分布式數(shù)據(jù)庫(kù),為啥這么牛?

    案例和接入流程 最后,基于 HarmonyOS 分布式數(shù)據(jù)管理等分布式技術(shù)能力,金山辦公移動(dòng)技術(shù)總監(jiān)給開(kāi)發(fā)者分享了 WPS offic
    發(fā)表于 11-19 15:38

    HarmonyOS教程—分布式運(yùn)動(dòng)健康應(yīng)用(智能穿戴

    到心率數(shù)據(jù)異常時(shí),會(huì)拉起遠(yuǎn)端PA(Particle Ability),達(dá)到通知的效果。最終效果預(yù)覽我們最終會(huì)構(gòu)建一個(gè)簡(jiǎn)易的HarmonyOS分布式運(yùn)動(dòng)健康的智能穿戴客戶端。應(yīng)用只包含一個(gè)FA頁(yè)面,我們
    發(fā)表于 09-06 11:39

    HDC2021技術(shù)分論壇:跨分布式計(jì)算技術(shù)初探

    功能上無(wú)法對(duì)智能化沉浸體驗(yàn)的應(yīng)用提供全方位的支持,導(dǎo)致很多應(yīng)用場(chǎng)景難以得到實(shí)現(xiàn)。為了解決移動(dòng)算力瓶頸,HarmonyOS分布式計(jì)算應(yīng)
    發(fā)表于 11-15 14:54

    HarmonyOS分布式應(yīng)用框架深入解讀

    分布式操作:跨遷移HarmonyOS上任務(wù)管理中心可以在一個(gè)端上管理所有超級(jí)終端上的任務(wù),借助這個(gè)任務(wù)管理中心,可以輕松的把一個(gè)任務(wù)從手機(jī)遷移到大屏上,這個(gè)過(guò)程就是
    發(fā)表于 11-22 15:15

    HDC2021技術(shù)分論壇:跨分布式計(jì)算技術(shù)初探

    的網(wǎng)絡(luò)環(huán)境下,為實(shí)現(xiàn)靈活、高效和穩(wěn)定的跨分布式計(jì)算能力,HarmonyOS開(kāi)發(fā)者提供了“融合計(jì)算、極簡(jiǎn)協(xié)議及秩序化組網(wǎng)”的分布式計(jì)算能力
    發(fā)表于 11-23 17:06

    如何高效完成HarmonyOS分布式應(yīng)用測(cè)試?

    作者:liuxun,HarmonyOS測(cè)試架構(gòu)師HarmonyOS是新一代的智能終端操作系統(tǒng),給開(kāi)發(fā)者提供了設(shè)備發(fā)現(xiàn)、設(shè)備連接、跨設(shè)備調(diào)用等豐富的分布式API。隨著越來(lái)越多的
    發(fā)表于 12-13 18:07

    Hello HarmonyOS學(xué)習(xí)筆記:分布式新聞客戶端實(shí)戰(zhàn)(JS、eTS)

    源代碼下載地址:Codelabs: 分享知識(shí)與見(jiàn)解,一起探索HarmonyOS的獨(dú)特魅力。 - Gitee.com代碼講解視頻:華為開(kāi)發(fā)者學(xué)堂-【Hello系列直播課】第5期:分布式新聞客戶端
    發(fā)表于 06-23 20:08

    HarmonyOS應(yīng)用開(kāi)發(fā)-EducationSystem分布式親子早教系統(tǒng)體驗(yàn)

    HarmonyOS應(yīng)用程序開(kāi)發(fā),多屏協(xié)作交互和分布式跨設(shè)備傳輸?shù)慕?jīng)驗(yàn)。 ? 從項(xiàng)目創(chuàng)建、代碼編寫(xiě)到編譯、構(gòu)造、部署和操作。二、效果圖:完整代碼地址:https://gitee.com/jltfcloudcn/jump_to/tr
    發(fā)表于 07-25 10:23

    HarmonyOS應(yīng)用開(kāi)發(fā)-分布式語(yǔ)音攝像頭體驗(yàn)

    一、組件說(shuō)明使用HarmonyOS分布式文件系統(tǒng)和AI語(yǔ)音識(shí)別功能開(kāi)發(fā)了一個(gè)分布式語(yǔ)音攝像頭。使用此相機(jī)應(yīng)用程序,同一分布式網(wǎng)絡(luò)下的不同設(shè)備
    發(fā)表于 08-24 15:06

    HarmonyOS測(cè)試技術(shù)與實(shí)戰(zhàn)-HarmonyOS分布式應(yīng)用特征與挑戰(zhàn)

     HDC 2021華為開(kāi)發(fā)者大會(huì)HarmonyOS測(cè)試技術(shù)與實(shí)戰(zhàn)-HarmonyOS分布式應(yīng)用特征與挑戰(zhàn)
    的頭像 發(fā)表于 10-23 14:41 ?1599次閱讀
    <b class='flag-5'>HarmonyOS</b>測(cè)試技術(shù)與實(shí)戰(zhàn)-<b class='flag-5'>HarmonyOS</b><b class='flag-5'>分布式</b>應(yīng)用特征與挑戰(zhàn)

    HarmonyOS分布式算力技術(shù)介紹

    功能上無(wú)法對(duì)智能化沉浸體驗(yàn)的應(yīng)用提供全方位的支持,導(dǎo)致很多應(yīng)用場(chǎng)景難以得到實(shí)現(xiàn)。 為了解決移動(dòng)算力瓶頸,HarmonyOS分布式計(jì)算
    的頭像 發(fā)表于 11-17 16:34 ?3484次閱讀
    <b class='flag-5'>HarmonyOS</b>跨<b class='flag-5'>端</b><b class='flag-5'>分布式</b>算力技術(shù)介紹

    HarmonyOS分布式應(yīng)用上架問(wèn)題分析

    HarmonyOS是新一代的智能終端操作系統(tǒng),給開(kāi)發(fā)者提供了設(shè)備發(fā)現(xiàn)、設(shè)備連接、跨設(shè)備調(diào)用等豐富的分布式API。隨著越來(lái)越多的開(kāi)發(fā)者投入到Harmo
    的頭像 發(fā)表于 12-24 17:56 ?1846次閱讀
    <b class='flag-5'>HarmonyOS</b><b class='flag-5'>分布式</b>應(yīng)用上架問(wèn)題分析