> For the complete documentation index, see [llms.txt](https://esp-ru.gitbook.io/gradient-messenger/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://esp-ru.gitbook.io/gradient-messenger/notification-chat.md).

# Notification chat

ЭSo here we are in the chat!  Next, here's a list of what you need to know for background notification to work!  I remind you that the project will be published on Sketchub.

Here is a screenshot.

![](/files/IXF43CSqY6qkEHOMXRsT) ![](/files/2HdEYPSzvvgfNA4AIEJS) ![](/files/LE4bqCzxV0zQlP4dY76r) ![](/files/YK8PGtcqo7pZFyuozato) ![](/files/hsWnSer6jitSXR96gIi4)

And now in the code that you need to pay attention, if you have a different name for the activity or icons, then change.

![](/files/7J9VbrXCtvfu4lDLqhr5)

be sure to set the permission, otherwise it won't work.

![](/files/HgMvooJ5jz9h1moyt2jO) ![](/files/DCWrNCQ2v0v01zytLPyZ)

we go to the manifest, where we noted and this code is needed.

![](/files/2w1l8uOcBFKYx2jUU490) ![](/files/hcRmB7NwVgXL1GfkppV9)

```
<service 
   android:name=".NotifyService" 
   android:enabled="true"
   android:exported="true" /> 

<receiver
android:name=".RebootService"
android:label="RebootReciever">
android:enabled="true"
android:exported="true"
android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
```

![](/files/A6qepXxhOA9oRvUTyBHo)

Well, the last screen, where I noted this, is the sending of a notification.

The structure of the base is as follows.\
&#x20;• When sending a notification, the following fields are created:\
&#x20;  ° from - The UID of the sender is passed here\
&#x20;  ° message - The message is sent here\
&#x20;  ° read - Flag 0 or 1 is written here (0 - message not read, 1 - message read)\
&#x20;P.S.  If the flag is 1, then this notification will not be received, since the service will consider it read\
&#x20;  ° title - Notification title\
&#x20;  ° to - The UID of the recipient is transmitted here (by this field, the service will find out who the notification is assigned to)

@ l e k s from 4pda thanks!=)
