Protected
_nativeOptional
AuthorizationOptional
NotificationOptional
Priority?: typeof PriorityProtected
Abstract
createExecuted before everything. This should return nativeObject since it will be assinged directly to nativeObject.
Optional
params: Partial<Record<string, any>>Rest
...args: any[]Protected
preOptional
params: Partial<Record<string, any>>Protected
addProtected
addIOSPropsCancel all presented or scheduled local notifications.
cancelAllLocalNotifications
0.1 4.0.8 Use Notifications#removeAllDeliveredNotifications
Register for remote push notifications. For emulator this will not work and always calls onFailure callback. This function uses senderID inside of project.json file for registering push notification services. You can obtain registration token from onSuccess callback's argument's 'token' property.
You can receive push notification data from Application.onReceivedNotification when push notification arrives.
registerForPushNotifications
0.1
Unregister for remote push notifications. For emulator this will not work and does nothing.
unregisterForPushNotifications
0.1
Optional
getGets authorization status.
getAuthorizationStatus
2.0.11
Use this method to remove all of your app’s delivered notifications.
removeAllDeliveredNotifications
4.0.8
Handles a notification messages that arrived while the app was running in the foreground for iOS but Android handles while in the foreground or background. In iOS, the return value specifies how you want the system to alert the user, if at all. So return values does not effect in Android.
Notifications.onNotificationReceive = function(e){
console.log("willPresentNotification", e);
return [Notifications.iOS.NotificationPresentationOptions.SOUND,Notifications.iOS.NotificationPresentationOptions.ALERT]; // or []
};
onNotificationReceive
Specify [] to silence the notification completely.
4.0.3
import Notifications from '@smartface/native/global/natifications';
Notifications.on(Notifications.Events.NotificationReceive, (params) => {
console.info('onNotificationReceive', params);
});
This event triggered when clicked on notification alert
onNotificationClick
4.0.3
import Notifications from '@smartface/native/global/natifications';
Notifications.on(Notifications.Events.NoficationClick, (params) => {
console.info('onNotificationClick', params);
});
Generated using TypeDoc
Example