Commit 5cd92c2e authored by yogevbd's avatar yogevbd

Updated docs

parent ceaeb80a
--- ---
id: android-api id: android-api
title: Android specific title: Android Specific Commands
sidebar_label: Android specific sidebar_label: Android specific
--- ---
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In ac euismod odio, eu consequat dui. Nullam molestie consectetur risus id imperdiet. Proin sodales ornare turpis, non mollis massa ultricies id. Nam at nibh scelerisque, feugiat ante non, dapibus tortor. Vivamus volutpat diam quis tellus elementum bibendum. Praesent semper gravida velit quis aliquam. Etiam in cursus neque. Nam lectus ligula, malesuada et mauris a, bibendum faucibus mi. Phasellus ut interdum felis. Phasellus in odio pulvinar, porttitor urna eget, fringilla lectus. Aliquam sollicitudin est eros. Mauris consectetur quam vitae mauris interdum hendrerit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Duis et egestas libero, imperdiet faucibus ipsum. Sed posuere eget urna vel feugiat. Vivamus a arcu sagittis, fermentum urna dapibus, congue lectus. Fusce vulputate porttitor nisl, ac cursus elit volutpat vitae. Nullam vitae ipsum egestas, convallis quam non, porta nibh. Morbi gravida erat nec neque bibendum, eu pellentesque velit posuere. Fusce aliquam erat eu massa eleifend tristique. ## refreshToken
refreshToken
Sed consequat sollicitudin ipsum eget tempus. Integer a aliquet velit. In justo nibh, pellentesque non suscipit eget, gravida vel lacus. Donec odio ante, malesuada in massa quis, pharetra tristique ligula. Donec eros est, tristique eget finibus quis, semper non nisl. Vivamus et elit nec enim ornare placerat. Sed posuere odio a elit cursus sagittis. ```js
Notifications.refreshToken();
Phasellus feugiat purus eu tortor ultrices finibus. Ut libero nibh, lobortis et libero nec, dapibus posuere eros. Sed sagittis euismod justo at consectetur. Nulla finibus libero placerat, cursus sapien at, eleifend ligula. Vivamus elit nisl, hendrerit ac nibh eu, ultrices tempus dui. Nam tellus neque, commodo non rhoncus eu, gravida in risus. Nullam id iaculis tortor. ```
Nullam at odio in sem varius tempor sit amet vel lorem. Etiam eu hendrerit nisl. Fusce nibh mauris, vulputate sit amet ex vitae, congue rhoncus nisl. Sed eget tellus purus. Nullam tempus commodo erat ut tristique. Cras accumsan massa sit amet justo consequat eleifend. Integer scelerisque vitae tellus id consectetur.
---
id: android-events
title: Android
sidebar_label: Android
---
## getInitialNotification
Return the notification that caused the app to launch from dead state.
```js
const notification: Notification = await getInitialNotification();
```
## postLocalNotification(notification, id?)
Posts local notification to the device notification center.
```js
Notifications.postLocalNotification({
body: 'Local notificiation!',
title: 'Local Notification Title',
sound: 'chime.aiff',
category: 'SOME_CATEGORY',
link: 'localNotificationLink',
fireDate: new Date()
}, id);
```
## cancelLocalNotification(id)
Relevant for notifications sent with `fireDate`.
```js
Notifications.cancelLocalNotification(id);
```
## isRegisteredForRemoteNotifications()
Check if the app has permissions to send remote notifications.
```js
const hasPermissions: boolean = await getInitialNotification();
```
--- ---
id: general-api id: general-api
title: General API title: General Commands
sidebar_label: General API sidebar_label: General
--- ---
## getInitialNotification ## getInitialNotification
......
--- ---
id: general-events id: general-events
title: Events subscription title: General
sidebar_label: Events subscription sidebar_label: General
--- ---
## getInitialNotification ## registerRemoteNotificationsRegistered
Return the notification that caused the app to launch from dead state. registerRemoteNotificationsRegistered
```js ```js
const notification: Notification = await getInitialNotification(); Notifications.events().registerRemoteNotificationsRegistered((event: Registered) => {
console.log(event.deviceToken);
});
``` ```
## postLocalNotification(notification, id?) ## registerNotificationReceived
Posts local notification to the device notification center. registerNotificationReceived
```js ```js
Notifications.postLocalNotification({ Notifications.events().registerNotificationReceived((notification: Notification, completion: (response: NotificationCompletion) => void) => {
body: 'Local notificiation!', console.log(JSON.stringify(notification.data));
title: 'Local Notification Title',
sound: 'chime.aiff', // Calling completion on iOS with `alert: true` will present the native iOS inApp notification.
category: 'SOME_CATEGORY', completion({alert: true, sound: true, badge: false});
link: 'localNotificationLink', });
fireDate: new Date()
}, id);
``` ```
## cancelLocalNotification(id) ## registerRemoteNotificationOpened
Relevant for notifications sent with `fireDate`. registerRemoteNotificationOpened
```js ```js
Notifications.cancelLocalNotification(id); Notifications.events().registerRemoteNotificationOpened((notification: Notification) => {
console.log(JSON.stringify(notification.data));
});
``` ```
## isRegisteredForRemoteNotifications() ## registerRemoteNotificationsRegistrationFailed
Check if the app has permissions to send remote notifications. registerRemoteNotificationsRegistrationFailed
```js ```js
const hasPermissions: boolean = await getInitialNotification(); Notifications.events().registerRemoteNotificationsRegistrationFailed(() => {
```
});
```
\ No newline at end of file
--- ---
id: ios-api id: ios-api
title: iOS Specific API title: iOS Specific Commands
sidebar_label: iOS specific sidebar_label: iOS specific
--- ---
## Notifications.getInitialNotification() ## requestPermissions
Lorem ipsum dolor sit amet, consectetur adipiscing elit. In ac euismod odio, eu consequat dui. Nullam molestie consectetur risus id imperdiet. Proin sodales ornare turpis, non mollis massa ultricies id. Nam at nibh scelerisque, feugiat ante non, dapibus tortor. Vivamus volutpat diam quis tellus elementum bibendum. Praesent semper gravida velit quis aliquam. Etiam in cursus neque. Nam lectus ligula, malesuada et mauris a, bibendum faucibus mi. Phasellus ut interdum felis. Phasellus in odio pulvinar, porttitor urna eget, fringilla lectus. Aliquam sollicitudin est eros. Mauris consectetur quam vitae mauris interdum hendrerit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. request permissions
## BBB ```js
Duis et egestas libero, imperdiet faucibus ipsum. Sed posuere eget urna vel feugiat. Vivamus a arcu sagittis, fermentum urna dapibus, congue lectus. Fusce vulputate porttitor nisl, ac cursus elit volutpat vitae. Nullam vitae ipsum egestas, convallis quam non, porta nibh. Morbi gravida erat nec neque bibendum, eu pellentesque velit posuere. Fusce aliquam erat eu massa eleifend tristique. Notifications.requestPermissions();
```
## CCC ## checkPermissions
Sed consequat sollicitudin ipsum eget tempus. Integer a aliquet velit. In justo nibh, pellentesque non suscipit eget, gravida vel lacus. Donec odio ante, malesuada in massa quis, pharetra tristique ligula. Donec eros est, tristique eget finibus quis, semper non nisl. Vivamus et elit nec enim ornare placerat. Sed posuere odio a elit cursus sagittis. checkPermissions
## DDD ```js
Phasellus feugiat purus eu tortor ultrices finibus. Ut libero nibh, lobortis et libero nec, dapibus posuere eros. Sed sagittis euismod justo at consectetur. Nulla finibus libero placerat, cursus sapien at, eleifend ligula. Vivamus elit nisl, hendrerit ac nibh eu, ultrices tempus dui. Nam tellus neque, commodo non rhoncus eu, gravida in risus. Nullam id iaculis tortor. Notifications.checkPermissions();
```
Nullam at odio in sem varius tempor sit amet vel lorem. Etiam eu hendrerit nisl. Fusce nibh mauris, vulputate sit amet ex vitae, congue rhoncus nisl. Sed eget tellus purus. Nullam tempus commodo erat ut tristique. Cras accumsan massa sit amet justo consequat eleifend. Integer scelerisque vitae tellus id consectetur. ## registerPushKit
registerPushKit
```js
Notifications.registerPushKit();
```
## cancelAllLocalNotifications
cancelAllLocalNotifications
```js
Notifications.cancelAllLocalNotifications();
```
## getDeliveredNotifications
getDeliveredNotifications
```js
Notifications.getDeliveredNotifications();
```
## removeAllDeliveredNotifications
removeAllDeliveredNotifications
```js
Notifications.removeAllDeliveredNotifications();
```
## removeDeliveredNotifications
removeDeliveredNotifications
```js
Notifications.removeDeliveredNotifications();
```
## getBadgeCount
getBadgeCount
```js
Notifications.getBadgeCount();
```
## setBadgeCount
setBadgeCount
```js
Notifications.setBadgeCount(1);
```
\ No newline at end of file
...@@ -4,37 +4,21 @@ title: iOS ...@@ -4,37 +4,21 @@ title: iOS
sidebar_label: iOS specific sidebar_label: iOS specific
--- ---
## getInitialNotification ## registerPushKitRegistered
Return the notification that caused the app to launch from dead state. registerPushKitRegistered
```js ```js
const notification: Notification = await getInitialNotification(); Notifications.events().registerPushKitRegistered((event: RegisteredPushKit) => {
console.log(event.pushKitToken);
});
``` ```
## postLocalNotification(notification, id?) ## registerPushKitNotificationReceived
Posts local notification to the device notification center. registerPushKitNotificationReceived
```js ```js
Notifications.postLocalNotification({ Notifications.events().registerPushKitNotificationReceived((event: object) => {
body: 'Local notificiation!', console.log(JSON.stringify(event));
title: 'Local Notification Title', });
sound: 'chime.aiff',
category: 'SOME_CATEGORY',
link: 'localNotificationLink',
fireDate: new Date()
}, id);
``` ```
## cancelLocalNotification(id)
Relevant for notifications sent with `fireDate`.
```js
Notifications.cancelLocalNotification(id);
```
## isRegisteredForRemoteNotifications()
Check if the app has permissions to send remote notifications.
```js
const hasPermissions: boolean = await getInitialNotification();
```
...@@ -6,13 +6,9 @@ ...@@ -6,13 +6,9 @@
"tagline": "Documentation", "tagline": "Documentation",
"docs": { "docs": {
"android-api": { "android-api": {
"title": "Android specific", "title": "Android Specific Commands",
"sidebar_label": "Android specific" "sidebar_label": "Android specific"
}, },
"android-events": {
"title": "Android",
"sidebar_label": "Android"
},
"doc2": { "doc2": {
"title": "document number 2" "title": "document number 2"
}, },
...@@ -26,12 +22,12 @@ ...@@ -26,12 +22,12 @@
"title": "Fifth Document" "title": "Fifth Document"
}, },
"general-api": { "general-api": {
"title": "General API", "title": "General Commands",
"sidebar_label": "General API" "sidebar_label": "General"
}, },
"general-events": { "general-events": {
"title": "Events subscription", "title": "General",
"sidebar_label": "Events subscription" "sidebar_label": "General"
}, },
"installation-android": { "installation-android": {
"title": "Android Installation", "title": "Android Installation",
...@@ -42,7 +38,7 @@ ...@@ -42,7 +38,7 @@
"sidebar_label": "iOS Installation" "sidebar_label": "iOS Installation"
}, },
"ios-api": { "ios-api": {
"title": "iOS Specific API", "title": "iOS Specific Commands",
"sidebar_label": "iOS specific" "sidebar_label": "iOS specific"
}, },
"ios-events": { "ios-events": {
...@@ -61,7 +57,7 @@ ...@@ -61,7 +57,7 @@
"Subscription": "Subscription", "Subscription": "Subscription",
"Notification Events": "Notification Events", "Notification Events": "Notification Events",
"Advanced API - iOS": "Advanced API - iOS", "Advanced API - iOS": "Advanced API - iOS",
"Api": "Api", "Commands": "Commands",
"Events": "Events" "Events": "Events"
} }
}, },
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"Advanced API - iOS": ["doc3"] "Advanced API - iOS": ["doc3"]
}, },
"api": { "api": {
"Api": ["general-api", "ios-api", "android-api"], "Commands": ["general-api", "ios-api", "android-api"],
"Events": ["general-events", "ios-events", "android-events"] "Events": ["general-events", "ios-events"]
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment