INNER CODE UNIT · TypeScript
exit
OneSignal/react-native-onesignal · src/index.ts:207
export function exit(activityId: string, handler: (result: object) => void = () => {}) {
if (!isNativeModuleLoaded(RNOneSignal)) return;
if (Platform.OS === 'ios') {
RNOneSignal.exitLiveActivity(activityId, handler);
}
}
/**
* Indicate this device is capable of receiving pushToStart live activities for the
* `activityType`. The `activityType` **must** be the name of the struct conforming
* to `ActivityAttributes` that will be used to start the live activity.
*
* Only applies to iOS
*
* @param activityType: The name of the specific `ActivityAttributes` structure tied
* to the live activity.
* @param token: The activity type's pushToStart token.