- Android
- iOS
- JavaScript
- Flutter
- ReactNative
Get global Mute Notifications configuration.
Callback Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| errorCode | int | Error code. 0 indicates success. | 1.1.0 |
| isMute | boolean | Whether Mute Notifications is enabled | 1.1.0 |
| timezone | String | Time zone | 1.1.0 |
| periods | List<TimePeriod> | Mute Notifications time periods. If empty, Mute Notifications applies all day. | 1.1.0 |
Code Example
JIM.getInstance().getMessageManager().getMuteStatus(new IMessageManager.IGetMuteStatusCallback() {
@Override
public void onSuccess(boolean isMute, String timezone, List<TimePeriod> periods) {
}
@Override
public void onError(int errorCode) {
}
});
Get global Mute Notifications configuration.
Callback Parameters
| Name | Type | Description | Version |
|---|---|---|---|
| errorCode | JErrorCode | Error code. 0 indicates success. | 1.1.0 |
| isMute | BOOL | Whether Mute Notifications is enabled | 1.1.0 |
| timezone | NSString | Time zone | 1.1.0 |
| periods | NSArray <JTimePeriod *> | Mute Notifications time periods. If empty, Mute Notifications applies all day. | 1.1.0 |
Code Example
[JIM.shared.messageManager getMuteStatus:^(JErrorCode errorCode, BOOL isMute, NSString *timezone, NSArray<JTimePeriod *> *periods) {
}];
Get global Mute Notifications configuration.
Callback Parameters
| Property | Type | Description | Version |
|---|---|---|---|
| disturbInfo | Object | Mute Notifications information | 1.3.0 |
| disturbInfo.type | Number | Mute Notifications type | 1.3.0 |
| disturbInfo.timezone | String | Mute Notifications time zone, for example: Asia/Shanghai | 1.3.0 |
| disturbInfo.times | Array | Mute Notifications time periods | 1.3.0 |
Code Example
jim.getAllDisturb().then((disturbInfo) => {
console.log('get disturb successfully', disturbInfo);
});
Not supported.
Not supported.