Background App Refresh Permission

How to ask for the Background App Refresh permission?

It is not available in docs.
https://docs.expo.io/versions/latest/sdk/permissions

On my device, for the Expo app I do not see the option at all, to even manually switch it.

This is needed for setting Notification badges when app is closed. Expo.Notifications.setBadgeNumberAsync(number).

Hey @parthya,

Background task functionality is not yet part of the Expo SDK so this is currently not possible. We’re getting close to adding background support though!

Cheers,

Adam

Thanks for the response @adamjnav.

Is there a way to use Expo.Notifications.setBadgeNumberAsync(number) when app is closed? That is perhaps the best use case for this method.

It is not possible, but you can send the badge count value as part of the payload of your notification.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.