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

Add push notification documentation #297

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Push Notification Management in Ant Media Server Android SDK",
"position": 2,
"link": {
"type": "generated-index",
"description": "Introduction to push notification management in Ant Media Server Android SDK"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Configure Ant Media Server
description: Sending Notification in Android Tutorial
keywords: [Push Notification Management Tutorial, Push Notification Management, Ant Media Server Documentation, Ant Media Server Tutorials]
sidebar_position: 6
---

# Configure Ant Media Server:

After you register FCM or APN, you will have the private key. You need to save it into the Ant Media Server. Open the management panel, select an application, and go to the application-level settings. You will see it in the push notification section.

![](@site/static/img/push-notification-settings.jpg)

To protect the send push notification WebSocket message, you need to generate two subscriber authentication tokens with the sender’s Subscriber ID and the receiver’s Subscriber ID. You can call the [getSubscriberAuthenticationToken](https://antmedia.io/rest/#/default/getSubscriberAuthenticationToken) Rest API endpoint. We will call the sender’s token as authToken in the rest of the documentation. We will call the sender’s Subscriber ID as subscriberId and we will call the receiver’s Subscriber ID as sendNotificationToSubscriber.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Configure Manifest
description: Sending Notification in Android Tutorial
keywords: [Push Notification Management Tutorial, Push Notification Management, Ant Media Server Documentation, Ant Media Server Tutorials]
sidebar_position: 4
---

# Configure AndroidManifest.xml:

- Open your AndroidManifest.xml file.
- Add the necessary permissions and service declarations:

```xml
<service
android:name=".AntMediaFirebaseMessagingService.java"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Create an Android App Project in Android Studio
description: Sending Notification in Android Tutorial
keywords: [Push Notification Management Tutorial, Push Notification Management, Ant Media Server Documentation, Ant Media Server Tutorials]
sidebar_position: 2
---

## Step 2: Create an Android App Project in Android Studio

- Open Android Studio and create a new project with No Activity.

![](@site/static/img/sdk-integration/android-sdk/android-new-project-page.png)

- Select No Activity and then click Next.

![](@site/static/img/sdk-integration/android-sdk/android-project-naming-screen.png)

- Give your application a name, and then click Finish. We will call it
`MyWebRTCStreamingApp`.

Congratulations! You have successfully created your WebRTC Android SDK application project.
Loading