@nativescript/local-notifications
Version:
The Local Notifications plugin allows your app to show notifications when the app is not running.
23 lines (22 loc) • 1.11 kB
TypeScript
import { LocalNotificationsApi, LocalNotificationsCommon, ReceivedNotification, ScheduleOptions } from './common';
export declare class LocalNotificationsImpl extends LocalNotificationsCommon implements LocalNotificationsApi {
private static IS_GTE_LOLLIPOP;
private static getIntervalMilliseconds;
private static getIcon;
private static cancelById;
hasPermission(): Promise<boolean>;
requestPermission(): Promise<boolean>;
addOnMessageReceivedCallback(onReceived: (data: ReceivedNotification) => void): Promise<void>;
addOnMessageClearedCallback(onReceived: (data: ReceivedNotification) => void): Promise<void>;
cancel(id: number): Promise<boolean>;
cancelAll(): Promise<void>;
getScheduledIds(): Promise<Array<number>>;
schedule(scheduleOptions: ScheduleOptions[]): Promise<Array<number>>;
private static ensurePreconditions;
private static canSend;
private static areEnabled;
private static hasPermission;
private static requestPermission;
private static isAuthorized;
}
export declare const LocalNotifications: LocalNotificationsImpl;