# 4. Push Notification Setup

We have used OneSignal for push notifications. To set up OneSignal Push Notification Service to the app, you need an **App ID** from OneSignal. Follow the steps below:

* Go to [onesignal.com](https://onesignal.com/) and create an account and create a project by clicking on the new app/website button.

<figure><img src="https://lh5.googleusercontent.com/g8HRIUnylR0uUU7PWtbxinuCAnWKLGfGbnquRiE35RCmOA3QQpWx07ySFa6FSdkAKeqizopz_hFCYbaeJP68rI4PVE1UW7KuPfiPQwOj7ft3l7nE8_567jNzY4PTx1HfjmO8j5N4B2QL1Em9UAmzTQ" alt=""><figcaption></figcaption></figure>

* Enter your **app name** and then select **Google Android**.
* And then you need a **Web API Key** and a **Sender ID**.

<figure><img src="https://lh4.googleusercontent.com/sgjz9AOpDzLofw1T_9JRVUPG6MGdHdrVMiTDiX-kQh1LQYDv9NXPrgWcQqSejsGLc8mSmmaESLVF98hbrN8SR3o7adLiUbxdxglD1XnjeRwj-F2dotQIEyGcodbOJ_vvYuxd1QkY1L6lcLn7ZMIaCA" alt=""><figcaption></figcaption></figure>

* You will get them from your firebase project. Go to your firebase project > project settings > cloud messaging and copy them and input both **Server Key** and **Sender ID** in the Onesignal and save them and complete the setup.

<figure><img src="https://lh3.googleusercontent.com/CP63hnF66RXWKQo-pMRYXNd9r7zJGAI3tyVlD4Z0NET6OAb1Ze8IJ_QiOszfyq3o8yGtbjW9M7iSPgSN7BRzrOrFY-A6_dI7PcsK50b3PToAqCoEIppmRQXIjsvT8aB9Jb0sc19tts2F8_KRnU1vKA" alt=""><figcaption></figcaption></figure>

* You will get an **App ID** from Onesignal. Copy that App ID and go to the **lib/configs/config.dart** file and replace the Onesignal App ID.&#x20;

That’s it. Your OneSignal Push Notification Setup is complete.


---

# 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://walfydoc.mrb-lab.com/app/4.-push-notification-setup.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.
