source stringlengths 14 113 | code stringlengths 10 21.3k |
|---|---|
release-notes\changelogs\OpenHarmony_3.2.10.5\changelogs-arkui.md | // ArkTS:ERROR The @State property 'selectedDate' cannot be a 'Date' object.
@State selectedDate: Date = new Date('2021-08-08') |
release-notes\changelogs\OpenHarmony_3.2.10.5\changelogs-arkui.md | /* ArkTS:ERROR The state variable type here is 'ResourceStr', it contains both a simple type and an object type,
which are not allowed to be defined for state variable of a struct.*/
@State message: ResourceStr = $r('app.string.hello') |
release-notes\changelogs\OpenHarmony_3.2.10.5\changelogs-arkui.md | // Incorrect:
@State message: ResourceStr = $r('app.string.hello')
// Corrected:
@State resourceStr: Resource = $r('app.string.hello') |
release-notes\changelogs\OpenHarmony_3.2.10.5\changelogs-arkui.md | @Entry
@Component
struct LocalStorageComponent {
build() {
Column() {
Child({
/* ArkTS:ERROR Property 'simpleVarName' in the custom component 'Child' cannot
initialize here (forbidden to specify). */
simpleVarName: 1,
... |
release-notes\changelogs\OpenHarmony_3.2.10.5\changelogs-arkui.md | let NextID : number = 0;
@Observed class ClassA {
public id : number;
public c: number;
constructor(c: number) {
this.id = NextID++;
this.c = c;
}
}
@Component
struct Child {
@ObjectLink varA : ClassA;
build() {
Row() {
Text('ViewA-... |
release-notes\changelogs\OpenHarmony_3.2.10.5\changelogs-ohos-geolocation.md | import geoLocationManager from '@ohos.geoLocationManager';
try {
geoLocationManager.enableLocation((err, data) => {
if (err) {
console.log('enableLocation: err=' + JSON.stringify(err));
}
});
} catch (err) {
console.error("errCode:" + err.code + ",errMessage:" + e... |
release-notes\changelogs\OpenHarmony_3.2.10.5\changelogs-ohos-geoLocationManager.md | import geoLocationManager from '@ohos.geoLocationManager';
try {
geoLocationManager.enableLocation((err, data) => {
if (err) {
console.log('enableLocation: err=' + JSON.stringify(err));
}
});
} catch (err) {
console.error("errCode:" + err.code + ",errMessage:" + e... |
release-notes\changelogs\OpenHarmony_3.2.10.5\changelogs-system-geolocation.md | import geoLocationManager from '@ohos.geoLocationManager';
try {
geoLocationManager.enableLocation((err, data) => {
if (err) {
console.log('enableLocation: err=' + JSON.stringify(err));
}
});
} catch (err) {
console.error("errCode:" + err.code + ",errMessage:" + e... |
release-notes\changelogs\OpenHarmony_3.2.10.6\changelogs-request.md | try {
request.downloadFile(globalThis.abilityContext, { url: 'https://xxxx/xxxxx.hap',
filePath: 'xxx/xxxxx.hap'}, (err, data) => {
if (err) {
console.error('Failed to request the download. Cause: ' + JSON.stringify(err));
return;
}
});
} catch (err) {
console... |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | enum HitTestTypeV9 |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | enum WebHitTestType |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | interface HeaderV9 |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | interface WebHeader |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | interface HitTestValue {
/**
* Get the hit test type.
*
* @since 9
*/
type: HitTestTypeV9;
/**
* Get the hit test extra data.
*
* @since 9
*/
extra: string;
} |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | interface HitTestValue {
/**
* Get the hit test type.
*
* @since 9
*/
type: WebHitTestType;
/**
* Get the hit test extra data.
*
* @since 9
*/
extra: string;
} |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | loadUrl(url: string | Resource, headers?: Array<HeaderV9>): void |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | loadUrl(url: string | Resource, headers?: Array<WebHeader>): void |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | getHitTest(): HitTestTypeV9 |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | getHitTest(): WebHitTestType |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | postMessageEvent(message: WebMessageEvent): void;
onMessageEvent(callback: (result: string) => void): void; |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | postMessageEvent(message: WebMessage): void;
onMessageEvent(callback: (result: WebMessage) => void): void; |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | import web_webview from '@ohos.web.webview'; |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | getType(): HitTestType;
getExtra(): string; |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | type: WebHitTestType;
extra: string; |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | import web_webview from '@ohos.web.webview'; |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | isCookieAllowed(): boolean;
isThirdPartyCookieAllowed(): boolean;
putAcceptCookieEnabled(accept: boolean): void;
putAcceptThirdPartyCookieEnabled(accept: boolean): void;
setCookie(url: string, value: string): boolean;
saveCookieSync(): boolean;
getCookie(url: string): string;
existCookie(): boolean;
del... |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | static isCookieAllowed(): boolean;
static isThirdPartyCookieAllowed(): boolean;
static putAcceptCookieEnabled(accept: boolean): void;
static putAcceptThirdPartyCookieEnabled(accept: boolean): void;
static setCookie(url: string, value: string): void;
static saveCookieAsync(): Promise<void>;
static saveCookie... |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | import web_webview from '@ohos.web.webview'; |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | zoomIn(): boolean;
zoomOut(): boolean;
createWebMessagePorts(): Array<WebMessagePort>;
postMessage(options: { message: WebMessageEvent, uri: string}): void;
getHitTestValue(): HitTestValue;
getWebId(): number;
getDefaultUserAgent(): string;
getTitle(): string;
getPageHeight(): number;
backOrForward(st... |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | zoomIn(): void;
zoomOut(): void;
createWebMessagePorts(): Array<WebMessagePort>;
postMessage(name: string, ports: Array<WebMessagePort>, uri: string): void;
getHitTestValue(): HitTestValue;
getWebId(): number;
getUserAgent(): string;
getTitle(): string;
getPageHeight(): number;
backOrForward(step: num... |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | import web_webview from '@ohos.web.webview'; |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | storeWebArchive(baseName: string, autoName: boolean): Promise<string>;
storeWebArchive(baseName: string, autoName: boolean, callback : AsyncCallback<string>): void; |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | storeWebArchive(baseName: string, autoName: boolean): Promise<string>;
storeWebArchive(baseName: string, autoName: boolean, callback : AsyncCallback<string>): void; |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | // xxx.ets
import web_webview from '@ohos.web.webview'
@Entry
@Component
struct WebComponent {
controller: web_webview.WebviewController = new web_webview.WebviewController();
build() {
Column() {
Button('saveWebArchive')
.onClick(() => {
try {
this.co... |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelog-web.md | // xxx.ets
import web_webview from '@ohos.web.webview';
@Entry
@Component
struct WebComponent {
controller: web_webview.WebviewController = new web_webview.WebviewController();
aboutToAppear():void {
try {
web_webview.WebviewController.setWebDebuggingAccess(true);
} catch(error) {
console.erro... |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelogs-ability.md | import contextConstant from '@ohos.app.ability.contextConstant';
let area: contextConstant.AreaMode = contextConstant.AreaMode.EL1; |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelogs-ability.md | let context: common.UIAbilityContext = globalThis.abilityContext;
let appContext = context.getApplicationContext();
appContext.killProcessesBySelf() |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelogs-ability.md | let context: common.UIAbilityContext = globalThis.abilityContext;
let appContext = context.getApplicationContext();
appContext.killAllProcesses() |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelogs-ability.md | let context: common.UIAbilityContext = globalThis.abilityContext;
let appContext = context.getApplicationContext();
appContext.getProcessRunningInformation() |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelogs-ability.md | let context: common.UIAbilityContext = globalThis.abilityContext;
let appContext = context.getApplicationContext();
appContext.getRunningProcessInformation() |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelogs-ability.md | class MyMessageAble{
name:""
str:""
num: 1
constructor(name, str) {
this.name = name;
this.str = str;
}
marshalling(messageParcel) {
messageParcel.writeInt(this.num);
messageParcel.writeString(this.str);
console.log('MyMessageAble marshal... |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelogs-ability.md | class MyMessageAble{
name:""
str:""
num: 1
constructor(name, str) {
this.name = name;
this.str = str;
}
marshalling(messageSequence) {
messageSequence.writeInt(this.num);
messageSequence.writeString(this.str);
console.log('MyMessageAble m... |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelogs-ability.md | import wantConstant from '@ohos.app.ability.wantConstant';
let backToOtherMissionStack: wantConstant.Params = wantParam.Params.ABILITY_BACK_TO_OTHER_MISSION_STACK; |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelogs-bundlemanager.md | import {AbilityInfo} from 'bundleManger/abilityInfo';
import {ExtensionAbilityInfo} from 'bundleManger/extensionAbilityInfo';
import {BundlePackInfo} from 'bundleManger/packInfo'; |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelogs-bundlemanager.md | import {AbilityInfo} from 'bundleManger/AbilityInfo';
import {ExtensionAbilityInfo} from 'bundleManger/ExtensionAbilityInfo';
import {BundlePackInfo} from 'bundleManger/BundlePackInfo'; |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelogs-util.md | import util from '@ohos.util'
let uuid = util.generateRandomUUID(true);
console.log("RFC 4122 Version 4 UUID:" + uuid);
// Output:
// RFC 4122 Version 4 UUID:88368f2a-d5db-47d8-a05f-534fab0a0045 |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelogs-util.md | import util from '@ohos.util'
let uuid = util.generateRandomBinaryUUID(true);
console.log(JSON.stringify(uuid));
// Output:
// 138,188,43,243,62,254,70,119,130,20,235,222,199,164,140,150 |
release-notes\changelogs\OpenHarmony_3.2.10.7\changelogs-util.md | import util from '@ohos.util'
let pro = new util.LRUCache();
pro.put(2,10);
let obj = {1:"key"};
let result = pro.contains(obj); |
release-notes\changelogs\OpenHarmony_3.2.8.1\changelogs-account_os_account.md | import account_osAccount from "@ohos.account.osAccount"
let accountMgr = account_osAccount.getAccountManager()
let callbackFunc = (err) => {
if (err != null) { // Handle the business error.
console.log("account_osAccount failed, error: " + JSON.stringify(err));
} else {
console.log("account_osAccount succe... |
release-notes\changelogs\OpenHarmony_3.2.8.1\changelogs-account_os_account.md | import account_osAccount from "@ohos.account.osAccount"
let pinAuth = new account_osAccount.PINAuth()
try {
pinAuth.registerInputer({})
} catch (err) { // Process the error that is related to the parameter type.
console.log("account_osAccount failed for incorrect parameter type, error: " + JSON.stringify(err));
... |
release-notes\changelogs\OpenHarmony_3.2.8.1\changelogs-device-manager.md | import account_osAccount from "@ohos.distributedHardware.deviceManager"
dmInstance.getTrustedDeviceList((err, data) => {
console.log("getTrustedDeviceList err: " + JSON.stringify(err));
console.log('get trusted device info: ' + JSON.stringify(data));
});
try {
dmInstance.getTrustedDeviceList((err, data) => {... |
release-notes\changelogs\OpenHarmony_3.2.8.1\changelogs-device-manager.md | // Automatically generate a unique subscription ID.
var subscribeId = Math.floor(Math.random() * 10000 + 1000);
var subscribeInfo = {
"subscribeId": subscribeId,
"mode": 0xAA, // Active discovery
"medium": 0, // Automatic. Multiple media can be used for device discovery.
"freq": 2, // High frequency... |
release-notes\changelogs\OpenHarmony_3.2.8.1\changelogs-device-usb.md | import usbV9 from '@ohos.usbV9'
try {
usbV9.getDevices(); // If an improper parameter is passed to this API, an exception will be thrown.
} catch (err) {
console.error("getDevices errCode:" + err.code + ",errMessage:" + err.message);
} |
release-notes\changelogs\OpenHarmony_3.2.8.1\changelogs-multimodalinput.md | import pointer from '@ohos.multimodalInput.pointer';
pointer.setPointerVisible(true, (error) => {
console.log(`Set pointer visible success`);
});
try {
pointer.setPointerVisible(true, (error) => {
if (error) {
console.log(`Set pointer visible failed, error: ${JSON.stringify(error, [`code`, `message`]... |
release-notes\changelogs\OpenHarmony_3.2.8.1\changelogs-request.md | try {
request.downloadFile(globalThis.abilityContext, { url: 'https://xxxx/xxxxx.hap',
filePath: 'xxx/xxxxx.hap'}, (err, data) => {
if (err) {
console.error('Failed to request the download. Cause: ' + JSON.stringify(err));
return;
}
});
} catch (err) {
console... |
release-notes\changelogs\OpenHarmony_3.2.8.1\changelogs-resource-manager.md | let resource = {
bundleName: "com.example.myapplication",
moduleName: "entry",
id: $r('app.media.test').id
};
this.context.resourceManager.getMedia(resource, (error, value) => {
if (error != null) {
console.log("error is " + error);
} else {
let media = value;
}
}); |
release-notes\changelogs\OpenHarmony_3.2.8.1\changelogs-resource-manager.md | let resource = {
bundleName: "com.example.myapplication",
moduleName: "entry",
id: $r('app.media.test').id
};
try {
this.context.resourceManager.getMediaContent(resource, (error, value) => {
if (error != null) {
console.log("error is " + error);
} else {
let media = value;
... |
release-notes\changelogs\OpenHarmony_3.2.8.1\changelogs-theme.md | import pointer from '@ohos.wallpaper';
try {
wallpaper.getImage(wallpaper.WallpaperType.WALLPAPER_SYSTEM).then((data) => {
console.log(`success to getImage: ${JSON.stringify(data)}`);
}).catch((error) => {
console.error(`failed to getImage because: ${JSON.stringify(error)}`);
});
} catch (er... |
release-notes\changelogs\OpenHarmony_3.2.8.1\changelogs-theme.md | import pointer from '@ohos.wallpaper';
try {
let file = wallpaper.getFileSync(wallpaper.WallpaperType.WALLPAPER_SYSTEM);
} catch (err) {
console.error(`failed to getFileSync because: ${err.message}`);
} |
release-notes\changelogs\OpenHarmony_3.2.8.1\changelogs-theme.md | import screenLock from '@ohos.screenlock';
try {
screenLock.lock((err, data) => {
if (err) {
console.error(`Failed to lock the screen, because: ${err.message}`);
return;
}
console.info(`lock the screen successfully. result: ${data}`);
});
} catch (err) {
console.error(`Fail... |
release-notes\changelogs\OpenHarmony_3.2.8.1\changelogs-theme.md | import screenLock from '@ohos.screenlock';
try {
let isSuccess = screenLock.onSystemEvent((event) => {
console.log(`Register the system event which related to screenlock successfully. eventType: ${event.eventType}`)
});
} catch (err) {
console.error(`Failed to register the system event which related to ... |
release-notes\changelogs\OpenHarmony_3.2.8.3\changelog-dmsfwk.md | let token = 1;
try {
continuationManager.on("deviceSelected", token, (data) => {
console.info('onDeviceSelected len: ' + data.length);
for (let i = 0; i < data.length; i++) {
console.info('onDeviceSelected deviceId: ' + JSON.stringify(data[i].id));
console.info('onDeviceSelected device... |
release-notes\changelogs\OpenHarmony_3.2.8.3\changelog-dmsfwk.md | let token = 1;
try {
continuationManager.off("deviceSelected", token);
} catch (err) {
console.error('off failed, cause: ' + JSON.stringify(err));
} |
release-notes\changelogs\OpenHarmony_3.2.8.3\changelog-dmsfwk.md | let token = 1;
try {
continuationManager.on("deviceUnselected", token, (data) => {
console.info('onDeviceUnselected len: ' + data.length);
for (let i = 0; i < data.length; i++) {
console.info('onDeviceUnselected deviceId: ' + JSON.stringify(data[i].id));
console.info('onDeviceUnselecte... |
release-notes\changelogs\OpenHarmony_3.2.8.3\changelog-dmsfwk.md | let token = 1;
try {
continuationManager.off("deviceUnselected", token);
} catch (err) {
console.error('off failed, cause: ' + JSON.stringify(err));
} |
release-notes\changelogs\OpenHarmony_3.2.8.3\changelogs-geolocation.md | import geoLocationManager from '@ohos.geoLocationManager';
try {
geoLocationManager.enableLocation((err, data) => {
if (err) {
console.log('enableLocation: err=' + JSON.stringify(err));
}
});
} catch (err) {
console.error("errCode:" + err.code + ",errMessage:" + e... |
release-notes\changelogs\OpenHarmony_3.2.9.1\changelogs-wantAgent.md | import WantAgent from '@ohos.app.ability.wantAgent';
// WantAgent object
var wantAgent;
// triggerInfo
var triggerInfo = {
code: 0
}
// WantAgentInfo object
var wantAgentInfo = {
wants: [
{
deviceId: "deviceId",
bundleName: "com.neu.setResultOnAbilityResultTest1",
... |
release-notes\changelogs\OpenHarmony_4.0.10.1\changelog-ArkUI.md | @Entry
@Component
struct Page3 {
@State messages: string[] = ['Hello World']
aboutToAppear() {
// If AppStorage does not contain the specified key, undefined is returned.
// API version 9: The ArkUI framework rejects undefined as the assigned value, and this.messages is still at its initial value ['Hello W... |
release-notes\changelogs\OpenHarmony_4.0.10.1\changelog-ArkUI.md | Text(`the messages length: ${this.messages?.length}`) |
release-notes\changelogs\OpenHarmony_4.0.10.1\changelog-ArkUI.md | @Entry
@Component
struct Page3 {
@State aProp: boolean = true
build() {
Row() {
Column() {
// crash: SynchedPropertyObjectTwoWayPU[9, 'linkProp']: constructor @Link/@Consume source variable in
// parent/ancestor @Component must be defined. Application error!
... |
release-notes\changelogs\OpenHarmony_4.0.10.1\changelog-ArkUI.md | @Entry
@Component
struct Page3 {
// API version 10: A runtime error is reported: @Component 'Page3': Illegal variable value error with decorated variable @State/@Provide 'functionProp': failed
// validation: 'undefined, null, number, boolean, string, or Object but not function, attempt to assign value t... |
release-notes\changelogs\OpenHarmony_4.0.10.11\changelogs-arkcompiler.md | // module1.ets
export class C {}
// module2.ets
import { C } from './module1'
let c = C // error: arkts-no-class-as-obj |
release-notes\changelogs\OpenHarmony_4.0.10.11\changelogs-arkcompiler.md | // module.ets
function foo(a: number) {
return a + 1
}
function bar(x: number): number | undefined {
return x > 0 ? x : undefined
}
foo(bar(-123)) // error: arkts-strict-typing |
release-notes\changelogs\OpenHarmony_4.0.10.11\changelogs-arkcompiler.md | // module.ets
function foo(a: number) {
return a + 1
}
function bar(x: number): number | null {
return x > 0 ? x : null
}
foo(bar(-123)) // error: arkts-strict-typing |
release-notes\changelogs\OpenHarmony_4.0.10.11\changelogs-arkcompiler.md | // lib.ts
export class C {}
// module.ets
import { C } from './lib' |
release-notes\changelogs\OpenHarmony_4.0.10.5\changelogs-arkui.md | navPathStack = new NavPathStack();
this.navPathStack.push(...)
this.navPathStack.pushPath(...)
this.navPathStack.pushName('navidesnation_add',this.value)
this.navPathStack.pushPathByName('navidesnation_add',this.value)
this.navPathStack.pop('navidesnation_add')
this.navPathStack.popToName('navidesnation_add') |
release-notes\changelogs\OpenHarmony_4.0.10.6\changelog-arkui.md | @Entry
@Component
struct SetLineDash {
private settings: RenderingContextSettings = new RenderingContextSettings(true)
private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings)
build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAl... |
release-notes\changelogs\OpenHarmony_4.0.10.6\changelogs-arkui.md | @Entry
@Component
struct Index {
@State titleMode: NavigationTitleMode = NavigationTitleMode.Free
@State backButton: boolean = false;
@Builder CustomMenu() {
Column() {
Image($r('app.media.icon')).width(24).height(24)
}
}
@Builder CustomTitle() {
Column() {
Text('Custom title').fontSi... |
release-notes\changelogs\OpenHarmony_4.0.10.6\changelogs-arkui.md | @Entry
@Component
struct Index {
@Builder NavigationTile() {
Column() {
Text('title').fontColor('#182431').fontSize(30).lineHeight(41)
Text('subTitle').fontColor('#182431').fontSize(14).lineHeight(19).margin(top:2, bottom: 20)
}
}
build() {
Column() {
Navigation() {
Text('Na... |
release-notes\changelogs\OpenHarmony_4.0.11.3\changelogs-arkui.md | @Entry
@Component
struct Index {
@Builder
MyMenu(){
Menu() {
MenuItem({ startIcon: $r("app.media.icon"), content: "Menu option" })
}
.width(30)
.constraintSize({minWidth: 0}) //Overwrite the default minimum width of 64 vp.
}
build() {
Row() {
Column() {
Text('click to sh... |
release-notes\changelogs\OpenHarmony_4.0.11.3\changelogs-multimedia.md | getPreferOutputDeviceForRendererInfo(rendererInfo: AudioRendererInfo, callback: AsyncCallback<AudioDeviceDescriptors>): void;
getPreferOutputDeviceForRendererInfo(rendererInfo: AudioRendererInfo): Promise<AudioDeviceDescriptors>;
on(type: 'preferredOutputDeviceChangeForRendererInfo', rendererInfo: AudioRendererInfo, ca... |
release-notes\changelogs\OpenHarmony_4.0.11.3\changelogs-multimedia.md | // The input parameter type or quantity is incorrect.
@throws { BusinessError } 401 - If input parameter type or number mismatch.
// The input parameter value is out of the value range.
@throws { BusinessError } 6800101 - Invalid parameter error.
// Common internal system error.
@throws { BusinessError } 6800301 - Syst... |
release-notes\changelogs\OpenHarmony_4.0.11.5\changelogs-distributeddatamgr.md | on(type: 'change', callback: Callback<{ sessionId: string, fields: Array<string> }>): void;
on(
type: 'status',
callback: Callback<{ sessionId: string, networkId: string, status: 'online' | 'offline' }>
): void; |
release-notes\changelogs\OpenHarmony_4.0.11.5\changelogs-distributeddatamgr.md | on(type: 'change', callback: (sessionId: string, fields: Array<string>) => void): void;
on(
type: 'status',
callback: (sessionId: string, networkId: string, status: 'online' | 'offline' ) => void
): void; |
release-notes\changelogs\OpenHarmony_4.0.11.5\changelogs-distributeddatamgr.md | off(type: 'change', callback?: Callback<{ sessionId: string, fields: Array<string> }>): void;
off(
type: 'status',
callback?: Callback<{ sessionId: string, networkId: string, status: 'online' | 'offline' }>
): void; |
release-notes\changelogs\OpenHarmony_4.0.11.5\changelogs-distributeddatamgr.md | off(type: 'change', callback?: (sessionId: string, fields: Array<string>) => void): void;
off(
type: 'status',
callback?: (sessionId: string, networkId: string, status: 'online' | 'offline' ) => void
): void; |
release-notes\changelogs\OpenHarmony_4.0.11.5\changelogs-distributeddatamgr.md | on(type: 'change', callback: Callback<{ sessionId: string, fields: Array<string> }>): void;
on(
type: 'status',
callback: Callback<{ sessionId: string, networkId: string, status: 'online' | 'offline' }>
): void; |
release-notes\changelogs\OpenHarmony_4.0.11.5\changelogs-distributeddatamgr.md | on(type: 'change', callback: (sessionId: string, fields: Array<string>) => void): void;
on(
type: 'status',
callback: (sessionId: string, networkId: string, status: 'online' | 'offline' ) => void
): void; |
release-notes\changelogs\OpenHarmony_4.0.11.5\changelogs-distributeddatamgr.md | off(type: 'change', callback?: Callback<{ sessionId: string, fields: Array<string> }>): void;
off(
type: 'status',
callback?: Callback<{ sessionId: string, networkId: string, status: 'online' | 'offline' }>
): void; |
release-notes\changelogs\OpenHarmony_4.0.11.5\changelogs-distributeddatamgr.md | off(type: 'change', callback?: (sessionId: string, fields: Array<string>) => void): void;
off(
type: 'status',
callback?: (sessionId: string, networkId: string, status: 'online' | 'offline' ) => void
): void; |
release-notes\changelogs\OpenHarmony_4.0.11.5\changelogs-distributeddatamgr.md | on(type: 'multiProcessChange', callback: Callback<{ key : string }>): void
on(type: 'change', callback: Callback<{ key : string }>): void |
release-notes\changelogs\OpenHarmony_4.0.11.5\changelogs-distributeddatamgr.md | on(type: 'multiProcessChange', callback: ( key : string ) => void): void
on(type: 'change', callback: ( key : string ) => void): void |
release-notes\changelogs\OpenHarmony_4.0.11.5\changelogs-distributeddatamgr.md | off(type: 'multiProcessChange', callback?: Callback<{ key : string }>): void
off(type: 'change', callback?: Callback<{ key : string }>): void |
release-notes\changelogs\OpenHarmony_4.0.11.5\changelogs-distributeddatamgr.md | off(type: 'multiProcessChange', callback?: ( key : string ) => void): void
off(type: 'change', callback?: ( key : string ) => void): void |
release-notes\changelogs\OpenHarmony_4.0.11.5\changelogs-multimedia.md | // AudioRenderer API
getCurrentOutputDevices(callback: AsyncCallback<AudioDeviceDescriptors>): void
getCurrentOutputDevices(): Promise<AudioDeviceDescriptors>; |
release-notes\changelogs\OpenHarmony_4.0.11.5\changelogs-multimedia.md | // AudioRenderer API
adjustVolumeByStep(adjustType: VolumeAdjustType, callback: AsyncCallback<void>): void;
adjustVolumeByStep(adjustType: VolumeAdjustType): Promise<void>;
adjustSystemVolumeByStep(volumeType: AudioVolumeType, adjustType: VolumeAdjustType, callback: AsyncCallback<void>): void;
adjustSystemVolumeByStep(... |
release-notes\changelogs\OpenHarmony_4.0.11.5\changelogs-multimedia.md | // The description of error code 401 is adjusted.
@throws { BusinessError } 401 - Input parameter type or number mismatch. |
release-notes\changelogs\OpenHarmony_4.0.11.5\changelogs-multimodalinput.md | import touchEvent from '@ohos.multimodalInput.touchEvent';
try {
inputMonitor.on('touch', (touchEvent: touchEvent.TouchEvent) => {
console.log(`Monitor on success ${JSON.stringify(touchEvent)}`);
return false;
});
} catch (error) {
console.log(`Monitor on failed, error: ${JSON.stringify(error, [`code`, `m... |
release-notes\changelogs\OpenHarmony_4.0.2.1\changelog-web.md | postMessageEvent(message: string): void |
release-notes\changelogs\OpenHarmony_4.0.2.1\changelog-web.md | type WebMessage = ArrayBuffer | string
postMessageEvent(message: WebMessage): void |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.