@nativescript/local-notifications
Version:
The Local Notifications plugin allows your app to show notifications when the app is not running.
32 lines (31 loc) • 1.57 kB
TypeScript
import { LocalNotificationsApi, LocalNotificationsCommon, ReceivedNotification, ScheduleOptions } from './common';
export declare class LocalNotificationsImpl extends LocalNotificationsCommon implements LocalNotificationsApi {
private static didRegisterUserNotificationSettingsObserver;
private notificationReceivedObserver;
private pendingReceivedNotifications;
private receivedNotificationCallback;
private notificationHandler;
private notificationManager;
private observer;
constructor();
static isUNUserNotificationCenterAvailable(): boolean;
private static hasPermission;
private static getImageName;
private static addObserver;
private static getInterval;
private static getIntervalSeconds;
private static schedulePendingNotifications;
private static schedulePendingNotificationsNew;
private static calendarWithMondayAsFirstDay;
private static schedulePendingNotificationsLegacy;
addOrProcessNotification(notificationDetails: ReceivedNotification): void;
hasPermission(): Promise<boolean>;
requestPermission(): Promise<boolean>;
addOnMessageReceivedCallback(onReceived: (data: ReceivedNotification) => void): Promise<any>;
addOnMessageClearedCallback(onReceived: (data: ReceivedNotification) => void): Promise<any>;
cancel(id: number): Promise<boolean>;
cancelAll(): Promise<void>;
getScheduledIds(): Promise<number[]>;
schedule(scheduleOptions: ScheduleOptions[]): Promise<Array<number>>;
}
export declare const LocalNotifications: LocalNotificationsImpl;