NativeCommandsSender.js 2.26 KB
Newer Older
冷佳娟's avatar
冷佳娟 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const react_native_1 = require("react-native");
class NativeCommandsSender {
    constructor() {
        this.nativeCommandsModule = react_native_1.NativeModules.RNBridgeModule;
    }
    postLocalNotification(notification, id) {
        return this.nativeCommandsModule.postLocalNotification(notification, id);
    }
    getInitialNotification() {
        return this.nativeCommandsModule.getInitialNotification();
    }
    requestPermissions() {
        return this.nativeCommandsModule.requestPermissions();
    }
    abandonPermissions() {
        return this.nativeCommandsModule.abandonPermissions();
    }
    refreshToken() {
        this.nativeCommandsModule.refreshToken();
    }
    registerPushKit() {
        return this.nativeCommandsModule.registerPushKit();
    }
    setCategories(categories) {
        this.nativeCommandsModule.setCategories(categories);
    }
    getBadgeCount() {
        return this.nativeCommandsModule.getBadgeCount();
    }
    setBadgeCount(count) {
        this.nativeCommandsModule.setBadgeCount(count);
    }
    cancelLocalNotification(notificationId) {
        this.nativeCommandsModule.cancelLocalNotification(notificationId);
    }
    cancelAllLocalNotifications() {
        this.nativeCommandsModule.cancelAllLocalNotifications();
    }
    isRegisteredForRemoteNotifications() {
        return this.nativeCommandsModule.isRegisteredForRemoteNotifications();
    }
    checkPermissions() {
        return this.nativeCommandsModule.checkPermissions();
    }
    removeAllDeliveredNotifications() {
        return this.nativeCommandsModule.removeAllDeliveredNotifications();
    }
    removeDeliveredNotifications(identifiers) {
        return this.nativeCommandsModule.removeDeliveredNotifications(identifiers);
    }
    getDeliveredNotifications() {
        return this.nativeCommandsModule.getDeliveredNotifications();
    }
    finishPresentingNotification(notificationId, notificationCompletion) {
        this.nativeCommandsModule.finishPresentingNotification(notificationId, notificationCompletion);
    }
    finishHandlingAction(notificationId) {
        this.nativeCommandsModule.finishHandlingAction(notificationId);
    }
}
exports.NativeCommandsSender = NativeCommandsSender;