热门问题
待回答
最新问题
热门回答
  • 1

    回答

    1169

    浏览
    HarmonyOS 无法隐藏底部导航条

    代码如下:在entrysrcmainetsentryability中设置沉浸是全屏并隐藏底部导航条,保留状态栏无效。windowClass.setWindowLayoutFullScreen(true,(){windowClass.setWindowSystemBarEnable(['status'])windowClass.setSpecificSystemBarEnabled('status',true);windowClass.setSpecificSystemBarEnabled("navigationIndicator",false);windowClass.setSpecificSystemBarEnabled("navigation",false);})

    HarmonyOS
      zbw_apple 进行了回答 • 2024-12-26 15:05:54
  • 1

    回答

    1244

    浏览
    HarmonyOS 折叠屏变化时,获取屏幕宽度问题

    折叠屏变化时,获取屏幕宽度有问题,在半折叠态时,屏幕宽度为2224或1080,但是在折叠态和展开态都是2224,明显折叠态时的宽度应当小于展开态的宽度

    HarmonyOS
      FengTianYa 进行了回答 • 2024-12-26 15:05:18
  • 1

    回答

    1112

    浏览
    HarmonyOS 怎么判断UIAbility是因为excludeFromMissions退到后台的

    如果应用设置了excludeFromMissions为true,通过底部上推UIAbility会消失,onBackground会被触发,且无法再恢复到前台但是如果通过锁屏同样可以触发UIAbility的onBackground,解锁后UIAbility还会在前台。请问在代码层面怎么区分UIAbility是因为excludeFromMissions导致的应用退到后台的呢?

    HarmonyOS
      aquaa 进行了回答 • 2024-12-26 15:04:44
  • 1

    回答

    1092

    浏览
    HarmonyOS 申请获得示例代码-登录注册
    HarmonyOS
      FengTianYa 进行了回答 • 2024-12-26 14:58:56
  • 1

    回答

    1116

    浏览
    HarmonyOS AppStorage的状态如何在@ComponentV2自定义组件中使用

    AppStorage在状态管理v1中,可以用StorageProp和StorageLink进行数据同步。那么在状态管理v2中,是否有类似的注解或者方法来实现与AppStorage的数据同步

    HarmonyOS
      shlp 进行了回答 • 2024-12-26 14:58:50
  • 1

    回答

    2309

    浏览
    HarmonyOS hdc安装使用操作说明咨询
    HarmonyOS
      superinsect 进行了回答 • 2024-12-26 10:51:25
  • 1

    回答

    2249

    浏览
    HarmonyOS 调用蓝牙enableBluetooth api 报2900099错误

    操作步骤:1、蓝牙权限已申请且授权2、调用access.enableBluetooth();报2900099Operationfailed.

    HarmonyOS
      zbw_apple 进行了回答 • 2024-12-26 10:49:12
  • 1

    回答

    1084

    浏览
    HarmonyOS 智能设备蓝牙组网

    智能设备蓝牙组网,API中蓝牙有很多模块,现在只需要用到组网这块功能,提供下demo和方案。

    HarmonyOS
      superinsect 进行了回答 • 2024-12-26 10:48:32
  • 1

    回答

    746

    浏览
    HarmonyOS aa start跳转问题

    在这两天使用hdcshellaastart命令的时候,发现有些h5链接如果包含参数使用&符号连接,在跳转的时候会丢失&符号后面的参数,或者识别成shell指令中的&符号。hdcshellaastartaMainAbilitybxxxAohos.want.action.viewDataU"xxxxx"跳转手机浏览器,链接丢失&符号后面的参数。

    HarmonyOS
      zbw_apple 进行了回答 • 2024-12-26 10:44:16
  • 1

    回答

    920

    浏览
    HarmonyOS NDK工程编译release的时候,怎么保留带Symbol的so

    使用https:developer.huawei.comconsumercndocharmonyosguidesV5ideexceptionstackparsingprinciple0000001891886666V5section5147812132的方法,会导致output的har包中的so也带Symbol。如果不使用DCMAKEBUILDTYPERelWithDebInfo,libs、strippednativelibs内的so都不带Symbol。

    HarmonyOS
      shlp 进行了回答 • 2024-12-26 10:42:54
  • 1

    回答

    957

    浏览
    HarmonyOS 编译问题?

    在C函数中调用如下函数includevoidcacleNumber(){floata86.0625;floatb1.05555558;floatc75.8142395;floatvalueabc;float32x4tnAvmovqnf32(a);float32x4tnBvmovqnf32(b);float32x4tnCvmovqnf32(c);float32x4tnValuevsubqf32(vmulqf32(nA,nB),nC);floattotalValue[4];vst1qf32(totalValue,nValue);}会发现使用C编译后计算的结果和使用neon计算的结果是不相同的?C计算的结果是:15.0295124neon的计算结果是:15.0295105希望能尽快给一个结论?

    HarmonyOS
      zbw_apple 进行了回答 • 2024-12-26 10:42:42
  • 1

    回答

    945

    浏览
    HarmonyOS native调试

    sdk底层用的c代码,怎么样断点到c层

    HarmonyOS
      aquaa 进行了回答 • 2024-12-26 10:42:16
  • 1

    回答

    1156

    浏览
    HarmonyOS 蓝牙扫描经常回调一样的设备

    如图,基础上是这样连续回调一样的设备代码和打印如图letscanFilter:ble.ScanFilter{}letscanOptions:ble.ScanOptions{interval:0,dutyMode:ble.ScanDuty.SCANMODELOWPOWER,matchMode:ble.MatchMode.MATCHMODEAGGRESSIVE}接收扫描结果ble.on('BLEDeviceFind',(data){if(data.length0){for(letindex0;index<data.length;index++){if(data[index].deviceName){LogUtils.info("BleUtil扫到"+data[index].deviceName)BleUtil.bleScanInterface.onScanning(data[index])}}}});

    HarmonyOS
      shlp 进行了回答 • 2024-12-26 10:41:12
  • 1

    回答

    1034

    浏览
    HarmonyOS 蓝牙连接成功后 获取gattServices为空数组

    获取server的services信息this.mGattClientDevice.getServices((code,gattServices){letmessage'';if(code!null){console.error('GattClientgetServiceserror,errCode:'+(codeasBusinessError).code+',errMessage:'+(codeasBusinessError).message);}else{console.info('gattServices.length',gattServices.length)for(leti0;i<gattServices.length;i++){message+'serviceUuidis'+gattServices[i].serviceUuid+'\n';if(gattServices[i].isPrimary){this.readCharacteristicValue(gattServices[i]);this.readDescriptorValue(gattServices[i]);this.write(gattServices[i])}}console.info('GattClientgetServicessuccess,'+message);}})

    HarmonyOS
      Heiang 进行了回答 • 2024-12-26 10:40:39
  • 1

    回答

    1351

    浏览
    HarmonyOS 上架打包配置

    调试运行时,签名配置products里的signingConfig配置为debug签名才能运行到测试机,打包上架时只能手动改为release签名吗?能否配置两个签名,运行会自动选择debug签名,打包可以同时打出debug和release包。

    HarmonyOS
      Excelsior_abit 进行了回答 • 2024-12-26 10:40:29
  • 1

    回答

    1322

    浏览
    HarmonyOS commonEventManager注册事件接收问题接口问题

    1、commonEventManager公共事件监听,在aboutToAppear和onPageShow注册监听,收不到监听事件。2、通过点击测试button进行注册,可以收到监听事件。

    HarmonyOS
      zbw_apple 进行了回答 • 2024-12-26 10:39:55
  • 1

    回答

    1504

    浏览
    HarmonyOS Hvigor 编译构建

    1.参考hap构建任务时序,在CompileArkTS任务后会执行packageHap。https:developer.huawei.comconsumercndocharmonyosguidesV5idehvigortaskprocess0000001797427737V5section156521102616119场景描述:1.CompileArkTS任务的产物是什么,如何获取?2.尝试修改编译产物xxxentrybuilddefaultcachedefaultdefaultCompileArkTSesmoduledebugxxx.ts或xxx.protoBin文件的内容,不会影响loaderoutmodules.abc文件中的内容?是否符合预期3.如何修改编译过程中的中间文件,并对产物hap生效。

    HarmonyOS
      fox280 进行了回答 • 2024-12-26 10:39:17
  • 1

    回答

    822

    浏览
    HarmonyOS 什么格式的软件能够在电脑上运行

    目前什么格式应用可以在电脑端机器上运行?测试了.apk、.exe、.deb等,就连.hap的应用都无法安装

    HarmonyOS
      FengTianYa 进行了回答 • 2024-12-26 10:39:01
  • 1

    回答

    692

    浏览
    HarmonyOS 输入法相关问题

    需要点击按钮的时候将一段地址放入剪贴板,如何实现?

    HarmonyOS
      Excelsior_abit 进行了回答 • 2024-12-26 10:38:20
  • 1

    回答

    1530

    浏览
  • 1

    回答

    1631

    浏览
    关于HarmonyOS app加固的问题

    请问HarmonyOSapp本身有加固的需要吗或者官方有推荐的加固方法吗

    HarmonyOS
      fox280 进行了回答 • 2024-12-26 10:37:53
  • 1

    回答

    947

    浏览
    HarmonyOS Build APP 失败,会校验releaseType

    BuildAPP失败,会校验releaseType,构建hap包没有问题

    HarmonyOS
      aquaa 进行了回答 • 2024-12-26 10:37:24
  • 1

    回答

    1094

    浏览
    HarmonyOS 剪贴板只能剪切数字。 英文、中文、符号等都剪切不进去,有什么办法剪切所有的吗

    代码如下所示:复制文本框文本到剪贴板letplainTextDatanewunifiedDataChannel.UnifiedData();letplainTextnewunifiedDataChannel.PlainText();plainText.details{key:'delayPlaintext',value:'a3123ser',};plainText.textContent'a额3123ser';plainText.abstract'delayTextContent';plainTextData.addRecord(plainText);letsystemPasteboard:pasteboard.SystemPasteboardpasteboard.getSystemPasteboard();systemPasteboard.setUnifiedData(plainTextData).then((data:void){console.info('SucceededinsettingUnifiedData.');}).catch((err:BusinessError){console.error('FailedtosetUnifiedData.Cause:'+err.message);});

    HarmonyOS
      fox280 进行了回答 • 2024-12-26 10:37:11
  • 1

    回答

    1525

    浏览
    HarmonyOS API版本判断

    API版本判断是否有简便方法判断?除deviceInfo.sdkApiVersion判断外,适用于方法级别或类级别。

    HarmonyOS
      shlp 进行了回答 • 2024-12-26 10:37:07
  • 1

    回答

    1268

    浏览
  • 1

    回答

    1114

    浏览
    HarmonyOS 银行口令场景剪贴板现在有什么比较好的方式控制别一直弹窗打扰用户吗?

    当前的做法是监听update,如果有内容,就申请剪贴板权限弹窗,我试了下10s之内检查剪切板权限不会弹窗,10s以后就会弹窗,这是特意设计的?现在其他系统如果剪切板内容一致,系统不会弹窗询问

    HarmonyOS
      zxjiu 进行了回答 • 2024-12-26 10:36:58
  • 1

    回答

    1585

    浏览
    HarmonyOS 复制粘贴功能

    https:developer.huawei.comconsumercndocharmonyosguidesV5usepasteboardtocopyandpasteV5%E4%BD%BF%E7%94%A8%E5%9F%BA%E7%A1%80%E7%B1%BB%E5%9E%8B%E8%BF%9B%E8%A1%8C%E5%A4%8D%E5%88%B6%E7%B2%98%E8%B4%B4获取系统剪贴板对象letsystemPasteboardpasteboard.getSystemPasteboard();lettext"test";创建一条纯文本类型的剪贴板内容对象letpasteDatapasteboard.CreatePlainTextData(text);pasteData.addRecord(text);将数据写入系统剪贴板systemPasteboard.setData(pasteData).then((){存入成功,处理正常场景}).catch((error:BusinessError){处理异常场景});按照文档写的报错了

    HarmonyOS
      zxjiu 进行了回答 • 2024-12-26 10:36:56
  • 1

    回答

    1052

    浏览
    HarmonyOS 手机蓝牙相关的demo

    手机蓝牙扫描连接给设备发指令的相关demo

    HarmonyOS
      put_get 进行了回答 • 2024-12-26 10:36:15
  • 1

    回答

    1113

    浏览
    HarmonyOS 父组件内有个自定义的类列表,用Grid布局到界面上,GridItem是一个自定义的@Component,如何在父组件控制刷新自定义的@Component

    父组件内有个自定义的类列表,用Grid布局到界面上,GridItem是一个自定义的Component,如何在父组件控制刷新自定义的Component大致代码如下数据类exportdefaultclassPrivacyItem1{selected:booleanfalse;path:string&#039;&#039;;}自定义子组件ComponentexportstructPrivacyItemView1{privateitemWidth120;LinkeditMode:boolean;Statedata:PrivacyItem1{selected:false,path:&#039;&#039;};privateonSelectChange:((pi:PrivacyItem1,selected:boolea...

    HarmonyOS
      superinsect 进行了回答 • 2024-12-26 10:36:01
  • 1

    回答

    1238

    浏览
    HarmonyOS 同一个开发者账号下有几十款应用的时候,调试证书/发布证书该怎么管理

    目前由同一个开发者账号管理着几十个应用,而这些应用又分属于不同的部门。目前已经知道的限制:1)调试证书只能创建两个。2)发布证书只能创建一个。创建证书的csr文件,一般由各个部门的开发单独创建。一个账号管理着几十个应用的情况,对应的调试证书和发布证书应该怎么管理,是否有建议的方案?

    HarmonyOS
      Excelsior_abit 进行了回答 • 2024-12-26 10:34:40
3.8w问题, 4.1w人参与
94%的提问收到了回答

优秀答主

  • 回答了3个问题,0个赞同
  • 回答了3个问题,0个赞同
  • 回答了3个问题,1个赞同
  • 回答了2个问题,0个赞同
  • 回答了2个问题,1个赞同
  • 写回答 帮助更多的人