Obtains the application information of the specified user based on a given bundle name in asynchronous mode. This method uses a promise to return the result.
**Permission required**
ohos.permission.GET\_BUNDLE\_INFO\_PRIVILEGED or ohos.permission.GET\_BUNDLE\_INFO
Obtains the application information of the specified user based on a given bundle name in asynchronous mode. This method uses a callback to return the result.
**Permission required**
ohos.permission.GET\_BUNDLE\_INFO\_PRIVILEGED or ohos.permission.GET\_BUNDLE\_INFO
| bundleFlag | BundleFlag | Yes| Type of information that will be returned.<br/>**0**: The default bundle information will be returned.<br/>**1**: The bundle information containing the ability information will be returned.|
| bundleFlag | BundleFlag | Yes| Type of information that will be returned.<br/>**0**: The default bundle information will be returned.<br/>**1**: The bundle information containing the ability information will be returned.|
| callback | AsyncCallback<Array\<BundleInfo>> | Yes| Callback used to return the information of all available bundles.|
**Example**
```js
bundle.getAllBundleInfo(0,OnReceiveEvent);
functionOnReceiveEvent(err,data){
console.info('xxx getAllBundleInfo data length ['+data.length+']');
| bundleFlags | number | Yes| Type of information that will be returned.<br/>**0**: The default bundle information will be returned.<br/>**1**: The bundle information containing the ability information will be returned.|
| bundleFlags | number | Yes| Type of information that will be returned.<br/>**0**: The default bundle information will be returned.<br/>**1**: The bundle information containing the ability information will be returned.|
| callback | AsyncCallback\<BundleInfo> | Yes| Callback used to return the bundle information.|
| bundleFlags | number | Yes| Type of information that will be returned.<br/>**0**: The default application information will be returned. <br/>**8**: The application information containing the permission information will be returned.|
| bundleFlags | number | Yes| Type of information that will be returned.<br/>**0**: The default application information will be returned. <br/>**8**: The application information containing the permission information will be returned.|
| userId | number | Yes| User ID.|
| callback | AsyncCallback<Array\<ApplicationInfo>> | Yes| Callback used to return the application information.|
**Example**
```js
bundle.getAllApplicationInfo(8,0,OnReceiveEvent);
functionOnReceiveEvent(err,data){
console.info('xxx getAllApplicationInfo data length ['+data.length+']');
| want | Want | Yes| Want that contains the bundle name.|
| bundleFlags | number | Yes| Type of information that will be returned.<br/>**0**: The default ability information will be returned.<br/>**2**: The ability information containing the permission information will be returned.<br/>**4**: The ability information containing the application information will be returned.|
| userId | number | No| User ID. The default value is the user ID of the caller. The value must be greater than or equal to 0.|
| want | Want | Yes| Want that contains the bundle name.|
| bundleFlags | number | Yes| Type of information that will be returned.<br/>**0**: The default ability information will be returned.<br/>**2**: The ability information containing the permission information will be returned.<br/>**4**: The ability information containing the application information will be returned.|
| userId | number | Yes| User ID.|
| callback | AsyncCallback<Array\<AbilityInfo>> | Yes| Callback used to return the ability information.|
| want | Want | Yes| Want that contains the bundle name.|
| bundleFlags | number | Yes| Type of information that will be returned.<br/>**0**: The default ability information will be returned.<br/>**2**: The ability information containing the permission information will be returned.<br/>**4**: The ability information containing the application information will be returned.|
| callback | AsyncCallback<Array\<AbilityInfo>> | Yes| Callback used to return the ability information.|
| hapFilePath | string | Yes| Path of the HAP file.|
| bundleFlags | number | Yes| Type of information that will be returned.<br/>**0**: The default bundle information will be returned.<br/>**1**: The bundle information containing the ability information will be returned.|
| hapFilePath | string | Yes| Path of the HAP file.|
| bundleFlags | number | Yes| Type of information that will be returned.<br/>**0**: The default bundle information will be returned.<br/>**1**: The bundle information containing the ability information will be returned.|
| callback | AsyncCallback<BundleInfo> | Yes| Callback used to return the bundle information.|
| Promise\<GrantStatus> | Promise used to return the verification result. <br/>**-1**: The bundle does not have the specified permission.<br/>**0**: The bundle has the specified permission.|
| callback | AsyncCallback\<GrantStatus> | Yes| Callback used to return the verification result. <br/>**-1**: The bundle does not have the specified permission.<br/>**0**: The bundle has the specified permission.|
| deviceId | Read-only| string | No| ID of the device that runs the ability.|
| bundleName | Read-only| string | Yes| Bundle name of the ability. If both **bundleName** and **abilityName** are specified in a **Want**, the **Want** can directly match the specified ability.|
| abilityName | Read-only| string | Yes| Name of the ability. If both **bundleName** and **abilityName** are specified in a **Want**, the **Want** can directly match the specified ability.|