Skip to content
Gravity Logo / Docs Gravity home
Browse documentation
Documentation/Gravity Native

Push Notifications

Gravity comes bundled with everything you need to start sending push notifications - saving you hours of headache.

On a physical device, sign-in calls Notification.register(). It checks notification permissions and asks for permission if needed. With permission and a configured Expo project ID, it obtains an Expo push token and sends it to PUT /api/pushtoken. Gravity supports multiple devices per user.

Set expo.extra.eas.projectId in app.json to your Expo project ID. The registration helper skips token creation if the ID is missing or still set to the placeholder.

Sending Push Notifications

Please refer to the Push Notifications section of the Gravity Server documentation to learn about sending push notifications from the server.

The bundled client registers Expo push tokens. The server sends messages using the Expo server SDK.