| deviceId | Read only | string | No | ID of the device running the ability. |
| bundleName | Read only | string | No | Bundle name of the ability. If both **bundleName** and **abilityName** are specified in a **Want** object, the **Want** object can match a specific ability.|
| abilityName | Read only | string | No | Name of the ability. If both **package** and **abilityName** are specified in a **Want** object, the **Want** object can match a specific ability. The value of **abilityName** must be unique in an application.|
| abilityName | Read only | string | No | Name of the ability. If both **bundleName** and **abilityName** are specified in a **Want** object, the **Want** object can match a specific ability. The value of **abilityName** must be unique in an application.|
| uri | Read only | string | No | URI information to match. If **uri** is specified in a **Want** object, the **Want** object will match the specified URI information, including **scheme**, **schemeSpecificPart**, **authority**, and **path**.|
| type | Read only | string | No | MIME type, that is, the type of the file to open, for example, **text/xml** and **image/***. For details about the MIME type definition, see https://www.iana.org/assignments/media-types/media-types.xhtml?utm_source=ld246.com. |
| flags | Read only | number | No | How the **Want** object will be handled. For details, see [flags](js-apis-featureAbility.md#flags).|
...
...
@@ -73,29 +73,32 @@ import Want from '@ohos.application.Want';
- Passing **RemoteObject** data
``` js
importrpcfrom'@ohos.rpc';
importAbilityfrom'@ohos.application.Ability'
classStubextendsrpc.RemoteObject{
constructor(des){
if(typeofdes=='string'){
super(des);
}else{
returnnull;
}
}
onRemoteRequest(code,data,reply,option){
if(code===1){
console.log('onRemoteRequest called')
lettoken=data.readInterfaceToken();
letnum=data.readInt();
this.method();
returntrue;
}
returnfalse;
}
method(){
console.log('method called');
}
constructor(des){
if(typeofdes=='string'){
super(des);
}else{
returnnull;
}
}
onRemoteRequest(code,data,reply,option){
if(code===1){
console.log('onRemoteRequest called')
lettoken=data.readInterfaceToken();
letnum=data.readInt();
this.method();
returntrue;
}
returnfalse;
}
method(){
console.log('method called');
}
}
varremoteObject=newStub('want-test');
...
...
@@ -103,15 +106,16 @@ import Want from '@ohos.application.Want';
"deviceId":"",// An empty deviceId indicates the local device.