Skip to main content

Function: useForegroundService()

useForegroundService(config): void

A hook for managing a foreground service on Android. Does nothing on other platforms. You can use this hook to keep your app running in the background. You're also required to run a foreground service when screen sharing.

Parameters

ParameterTypeDescription
configForegroundServiceConfigConfiguration options for the foreground service.

Returns

void

Defined in

packages/react-native-client/src/hooks/useForegroundService.ts:109