Skip to content

Commit f169e9b

Browse files
cshfangtannerabreadjimblanc
authored
feat(react-native): Add push notification docs (aws-amplify#5344)
* feat(react-native): Add push notification docs * Addressing feedback * Update src/fragments/lib/push-notifications/react-native/getting_started/50_integrate_native_modules.mdx Co-authored-by: Bannon Tanner <[email protected]> * Update src/fragments/lib/push-notifications/react-native/identify_user/10_get_auth_user.mdx Co-authored-by: Bannon Tanner <[email protected]> * Update src/fragments/lib/push-notifications/ios/setup_push_service/setup-apns.mdx Co-authored-by: Bannon Tanner <[email protected]> * Update src/fragments/lib/push-notifications/react-native/enable_rich_notifications/enable-rich-notifications.mdx Co-authored-by: Bannon Tanner <[email protected]> * Update src/fragments/lib/push-notifications/react-native/enable_rich_notifications/enable-rich-notifications.mdx Co-authored-by: Bannon Tanner <[email protected]> * Update src/fragments/lib/push-notifications/react-native/interact_with_notifications/notification-lifecycle.mdx Co-authored-by: Bannon Tanner <[email protected]> * Update src/fragments/lib/push-notifications/react-native/request_permissions/request-permissions.mdx Co-authored-by: Bannon Tanner <[email protected]> * Addressing feedback * Addressing feedback * Addressing feedback * Added migration guide * Fix an error in replacement API table * Added a missed API to table * Update src/fragments/lib/push-notifications/react-native/migrate_from_previous_version/migrate-from-previous-version.mdx Co-authored-by: Bannon Tanner <[email protected]> * Update src/fragments/lib/push-notifications/react-native/migrate_from_previous_version/migrate-from-previous-version.mdx Co-authored-by: Bannon Tanner <[email protected]> * Update references to push to be more consistent * Add missing step to iOS migration * Move Android callouts further up * Update src/directory/directory.mjs Co-authored-by: Jim Blanchard <[email protected]> * Update src/fragments/lib/push-notifications/android/getting_started/10_pre_req.mdx Co-authored-by: Jim Blanchard <[email protected]> * Update src/fragments/lib/push-notifications/android/getting_started/fcm-pre-req.mdx Co-authored-by: Jim Blanchard <[email protected]> * Update src/fragments/lib/push-notifications/common/getting-started.mdx Co-authored-by: Jim Blanchard <[email protected]> * Update src/fragments/lib/push-notifications/common/getting-started.mdx Co-authored-by: Jim Blanchard <[email protected]> * Update src/fragments/lib/push-notifications/react-native/app_badge_count/app-badge-count.mdx Co-authored-by: Jim Blanchard <[email protected]> * Update src/fragments/lib/push-notifications/react-native/app_badge_count/app-badge-count.mdx Co-authored-by: Jim Blanchard <[email protected]> * Update src/fragments/lib/push-notifications/react-native/getting_started/10_pre_req.mdx Co-authored-by: Jim Blanchard <[email protected]> * Update src/fragments/lib/push-notifications/react-native/getting_started/40_install_lib.mdx Co-authored-by: Jim Blanchard <[email protected]> * Update src/fragments/lib/push-notifications/react-native/interact_with_notifications/notification-lifecycle.mdx Co-authored-by: Jim Blanchard <[email protected]> * Update src/fragments/lib/push-notifications/react-native/interact_with_notifications/notification-received.mdx Co-authored-by: Jim Blanchard <[email protected]> * Update src/fragments/lib/push-notifications/react-native/migrate_from_previous_version/migrate-from-previous-version.mdx Co-authored-by: Jim Blanchard <[email protected]> * Update src/fragments/lib/push-notifications/react-native/migrate_from_previous_version/migrate-from-previous-version.mdx Co-authored-by: Jim Blanchard <[email protected]> * Update src/fragments/lib/push-notifications/react-native/migrate_from_previous_version/migrate-from-previous-version.mdx Co-authored-by: Jim Blanchard <[email protected]> * Update src/fragments/lib/push-notifications/react-native/migrate_from_previous_version/migrate-from-previous-version.mdx Co-authored-by: Jim Blanchard <[email protected]> * Update src/fragments/lib/push-notifications/react-native/request_permissions/request-permissions.mdx Co-authored-by: Jim Blanchard <[email protected]> * Update src/fragments/lib/push-notifications/react-native/request_permissions/request-permissions.mdx Co-authored-by: Jim Blanchard <[email protected]> * Update src/fragments/lib/react-native-polyfills.mdx Co-authored-by: Jim Blanchard <[email protected]> * Update src/fragments/sdk/analytics/ios/getting-started.mdx Co-authored-by: Jim Blanchard <[email protected]> * Fixed an error in RN identifyUser --------- Co-authored-by: Bannon Tanner <[email protected]> Co-authored-by: Jim Blanchard <[email protected]>
1 parent fb640b6 commit f169e9b

File tree

68 files changed

+1064
-545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1064
-545
lines changed
56.7 KB
Loading
51.7 KB
Loading
71.7 KB
Loading
526 KB
Loading
230 KB
Loading
112 KB
Loading
175 KB
Loading
92.8 KB
Loading

src/directory/directory.mjs

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const directory = {
1111
},
1212
items: {}
1313
},
14-
"flutter-references": {
14+
'flutter-references': {
1515
productRoot: {
1616
title: 'Amplify Libraries for Flutter API References',
1717
route: '/flutter-references'
@@ -648,11 +648,6 @@ export const directory = {
648648
'push-notifications': {
649649
title: 'Push Notifications',
650650
items: [
651-
{
652-
title: 'Overview',
653-
route: '/lib/push-notifications/overview',
654-
filters: ['react-native']
655-
},
656651
{
657652
title: 'Getting started',
658653
route: '/lib/push-notifications/getting-started',
@@ -668,14 +663,34 @@ export const directory = {
668663
route: '/lib/push-notifications/record-notifications',
669664
filters: ['ios']
670665
},
666+
{
667+
title: 'Request permissions',
668+
route: '/lib/push-notifications/request-permissions',
669+
filters: ['react-native']
670+
},
671+
{
672+
title: 'Receive device token',
673+
route: '/lib/push-notifications/receive-device-token',
674+
filters: ['react-native']
675+
},
676+
{
677+
title: 'Interact with notifications',
678+
route: '/lib/push-notifications/interact-with-notifications',
679+
filters: ['react-native']
680+
},
671681
{
672682
title: 'Identify user',
673683
route: '/lib/push-notifications/identify-user',
674-
filters: ['android', 'ios']
684+
filters: ['android', 'ios', 'react-native']
685+
},
686+
{
687+
title: 'App badge count',
688+
route: '/lib/push-notifications/app-badge-count',
689+
filters: ['react-native']
675690
},
676691
{
677-
title: 'Working with API',
678-
route: '/lib/push-notifications/working-with-api',
692+
title: 'Enable rich notifications',
693+
route: '/lib/push-notifications/enable-rich-notifications',
679694
filters: ['react-native']
680695
},
681696
{
@@ -689,9 +704,14 @@ export const directory = {
689704
filters: ['android', 'ios', 'react-native']
690705
},
691706
{
692-
title: 'Setting up push notification services',
707+
title: 'Set up push notification services',
693708
route: '/lib/push-notifications/setup-push-service',
694-
filters: ['android', 'ios']
709+
filters: ['android', 'ios', 'react-native']
710+
},
711+
{
712+
title: 'Migrate from previous version',
713+
route: '/lib/push-notifications/migrate-from-previous-version',
714+
filters: ['react-native']
695715
}
696716
]
697717
},

src/fragments/lib/push-notifications/android/getting_started/10_pre_req.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
* An Android application targeting at least Android SDK API level 24 with Amplify libraries integrated
2-
* For a full example of creating Android project, please follow the [project setup walkthrough](/lib/project-setup/create-application)
1+
- An Android application targeting at least Android SDK API level 24 with Amplify libraries integrated
2+
- For a full example of creating an Android project, please follow the [project setup walkthrough](/lib/project-setup/create-application)
33

4+
import fcmPreReq from '/src/fragments/lib/push-notifications/android/getting_started/fcm-pre-req.mdx';
45

5-
Push Notifications are delivered via Firebase Cloud Messaging (FCM), In order to use FCM, you need to register your app on the Firebase console. See [Setting up push notification services](/lib/push-notifications/setup-push-service/) for more information.
6+
<Fragments fragments={{ android: fcmPreReq }} />
67

78
## Request Permissions
89

0 commit comments

Comments
 (0)