# Push Notifications

## Push Notifications <a href="#push-notifications" id="push-notifications"></a>

Goto <https://onesignal.com/>.

Create an account or log in if you are already a registered user.

Click on 'Add New App' on the screen window .

You need to Create certificate or key ID for the IOS and Android .

SETUP android FCM key [click here](https://documentation.onesignal.com/docs/generate-a-google-server-api-key) .

SETUP IOS certificate for push [click here](https://documentation.onesignal.com/docs/generate-a-google-server-api-key).

Once new app setup is successful , click on the newly created app and navigate to app-setting where you will find one signal app-id in keys/ids section.

Replace this key / id in your main.dart file.

```
OneSignal.shared.init("343c7750-2f38-4244-a09c-be77fb655a8c", iOSSettings: settings);
```

You can find First parameter value key from one signal setting and the second value is **Sender ID** that you can get it from Firebase. You can click on the gear icon on Overview then click on Project Setting and go to Cloud Messaging Tab and copy the Sender ID

Now open your account window in onesignal.com and navigate to new-message section where you can send notification.

If you prefer your own Admin to send push notification instead of oneSingnal.com, then you can use their API to do it, or you can check our backend where we already have those stuff added.

![](https://gblobscdn.gitbook.com/assets%2F-LLY6S4_I6vG9eKLUKkp%2F-LLZCxyQGWJ3HkGZpT2Q%2F-LLZDGRCFqoJCVIHSa5I%2Ffirebase.png?alt=media\&token=fb6c71f0-9a3c-4baa-981c-17d0f6ac7c10)

FCM Setup for push notification

![](https://gblobscdn.gitbook.com/assets%2F-LLY6S4_I6vG9eKLUKkp%2F-LLZCxyQGWJ3HkGZpT2Q%2F-LLZDGRCFqoJCVIHSa5I%2Ffirebase.png?alt=media\&token=fb6c71f0-9a3c-4baa-981c-17d0f6ac7c10)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionicfirebaseapp.com/readymade-restaurant-app/push-notifications.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
