Skip to content

Commit fed9f5a

Browse files
jesseruderexpbot
authored andcommitted
Add docs for getDevicePushTokenAsync
fbshipit-source-id: a509811
1 parent 26d24eb commit fed9f5a

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

versions/unversioned/sdk/notifications.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,21 @@ Returns a promise that resolves to the number that is displayed in a badge on th
128128

129129
Sets the number displayed in the app icon's badge to the given number. Setting the number to zero will both clear the badge and the list of notifications in the device's notification center on iOS. On Android this method does nothing.
130130

131+
## Standalone App Only
132+
133+
### `Expo.Notifications.getDevicePushTokenAsync(config)`
134+
135+
Note: Most people do not need to use this. It is easier to use `getExpoPushTokenAsync` unless you have a specific reason to need the actual device tokens. We also don't guarantee that the iOS and Android clients will continue expecting the same push notification payload format.
136+
137+
Returns a native APNS or GCM token that can be used with another push notification service.
138+
139+
#### Arguments
140+
141+
- **config (_object_)** -- An object with the following fields:
142+
- **gcmSenderId (_string_)** -- GCM sender ID.
143+
144+
#### Returns
145+
146+
A Promise that resolves to an object with the following fields:
147+
- **type (_string_)** -- Either "apns" or "gcm".
148+
- **data (_string_)** -- The push token as a string.

versions/v23.0.0/sdk/notifications.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,21 @@ Returns a promise that resolves to the number that is displayed in a badge on th
128128

129129
Sets the number displayed in the app icon's badge to the given number. Setting the number to zero will both clear the badge and the list of notifications in the device's notification center on iOS. On Android this method does nothing.
130130

131+
## Standalone App Only
132+
133+
### `Expo.Notifications.getDevicePushTokenAsync(config)`
134+
135+
Note: Most people do not need to use this. It is easier to use `getExpoPushTokenAsync` unless you have a specific reason to need the actual device tokens. We also don't guarantee that the iOS and Android clients will continue expecting the same push notification payload format.
136+
137+
Returns a native APNS or GCM token that can be used with another push notification service.
138+
139+
#### Arguments
140+
141+
- **config (_object_)** -- An object with the following fields:
142+
- **gcmSenderId (_string_)** -- GCM sender ID.
143+
144+
#### Returns
145+
146+
A Promise that resolves to an object with the following fields:
147+
- **type (_string_)** -- Either "apns" or "gcm".
148+
- **data (_string_)** -- The push token as a string.

0 commit comments

Comments
 (0)