Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs][notifications] Add Android and iOS notification object examples #31211

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

betomoedano
Copy link
Collaborator

Why

The PR adds examples of notification objects for both Android and iOS platforms when using addNotificationReceivedListener. These examples highlight key structural differences: Android uses a nested structure with FCM-specific fields, while iOS has a flatter structure with APN-specific elements.

How

Create a minimal expo notifications app integrating FCM v1, create development builds for Android and iOS using EAS

Test Plan

Register both devices to receive push notifications, get the tokens, and trigger notifications using Push Notification Tool

Paste notification object examples and run docs locally.

image image image

Checklist

@expo-bot expo-bot added the bot: passed checks ExpoBot has nothing to complain about label Aug 27, 2024
Co-authored-by: Aman Mittal <amandeepmittal@live.com>
@betomoedano betomoedano merged commit 4ab8e2e into main Aug 29, 2024
2 checks passed
@betomoedano betomoedano deleted the @betomoedano/add-platform-notification-examples branch August 29, 2024 19:39
behenate pushed a commit that referenced this pull request Sep 30, 2024
#31211)

# Why

The PR adds examples of notification objects for both Android and iOS
platforms when using addNotificationReceivedListener. These examples
highlight key structural differences: Android uses a nested structure
with FCM-specific fields, while iOS has a flatter structure with
APN-specific elements.

# How

Create a [minimal expo notifications
app](https://github.com/betomoedano/expo-notifications-app.git)
integrating FCM v1, create development builds for Android and iOS using
EAS

# Test Plan

Register both devices to receive push notifications, get the tokens, and
trigger notifications using [Push Notification
Tool](https://expo.dev/notifications)

Paste notification object examples and run docs locally.

<img width="1487" alt="image"
src="https://github.com/user-attachments/assets/02dfce45-2b7d-4baa-9bbc-5348c45f1f83">

<img width="1191" alt="image"
src="https://github.com/user-attachments/assets/054d1e33-d083-4807-ba9d-6f420311d444">

<img width="1181" alt="image"
src="https://github.com/user-attachments/assets/7b52e7da-6ec6-4883-ae8f-34606c6f0cd2">

# Checklist

- [x] Documentation is up to date to reflect these changes (eg:
https://docs.expo.dev and README.md).
- [x] Conforms with the [Documentation Writing Style
Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
- [x] This diff will work correctly for `npx expo prebuild` & EAS Build
(eg: updated a module plugin).

---------

Co-authored-by: Aman Mittal <amandeepmittal@live.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants