Advanced
The following article covers advanced features and customization options available in the Actito SDK.
These topics are optional and can be adopted selectively based on your application’s requirements. You can safely skip any sections that are not relevant to your use case or implementation strategy.
Do Not Disturb
Each device registered with Actito can be configured with a Do Not Disturb (DnD) schedule — a time window during which notifications will not be displayed on the lock screen or in the notification center. This feature allows you to offer users a more personalized experience by respecting their preferred quiet hours directly from your app’s settings.
Messages received during a Do Not Disturb period will still appear in the Inbox, ensuring users can access them later even if they were not displayed at the time of delivery.
Retrieving preferences
You can retrieve the current Do Not Disturb configuration for the device using:
const dnd = await Actito.device().fetchDoNotDisturb();
Updating preferences
To update the Do Not Disturb values for a device, invoke:
await Actito.device().updateDoNotDisturb({
start: '23:00',
end: '08:00',
});
This allows you to set a custom start and end time for the quiet period according to the user’s preferences.
Clearing Do Not Disturb preferences
If the user wishes to remove their Do Not Disturb schedule entirely, you can clear it using:
await Actito.device().clearDoNotDisturb();