Add subscribeToTopic to react-native-push-notification (#42563)

This commit is contained in:
Miklós András Danka 2020-02-27 20:27:45 +01:00 committed by GitHub
parent 8e4b60f9f1
commit f52feeb51c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -84,6 +84,7 @@ export interface PushNotification {
requestPermissions(
permissions?: Array<"alert" | "badge" | "sound">
): Promise<PushNotificationPermissions>;
subscribeToTopic(topic: string): void;
presentLocalNotification(details: PushNotificationObject): void;
scheduleLocalNotification(details: PushNotificationScheduleObject): void;
cancelLocalNotifications(details: object): void;

View File

@ -15,6 +15,7 @@ PushNotification.unregister();
PushNotification.localNotification = (details) => {};
PushNotification.localNotificationSchedule = (details) => {};
PushNotification.requestPermissions();
PushNotification.subscribeToTopic("topic");
PushNotification.presentLocalNotification = (details) => {};
PushNotification.scheduleLocalNotification = (details) => {};
PushNotification.cancelLocalNotifications = (details) => {};