[FC-0047] - Configure mobile push notifications in edx-platform

1. Create a new Firebase project

All push notifications in Open edX are sent via FCM service to start with it you need to create a new Firebase project in Firebase console https://console.firebase.google.com/

image-20240628-183429.png

2. Provide service account credentials to initialize an FCM admin application in edx-platform

To configure sending push notifications via FCM from edx-platform, you need to generate private key for FIrebase admin SDK in Project settings > Service accounts section.

Screenshot 2024-06-28 at 21.49.50.png

After downloading .json key, you should mount it to LMS/CMS containers and specify a path to the mounted file using FIREBASE_CREDENTIALS_PATH settings variable.

edx-ace/docs/decisions/0002-push-notifications.rst at master · openedx/edx-ace

 

3. Configure and build mobile applications

Use the supported Open edX mobile applications:

GitHub - openedx/openedx-app-android: The mobile app for Android for the Open EdX Platform.

GitHub - openedx/openedx-app-ios: The mobile app for iOS for the Open EdX Platform.

3.1 Configure oauth2

First you need to configure Oauth applications for each mobile client in edx-platform. You should create separate entries for Android and IOS applications in the Django OAuth Toolkit > Applications.

Fill in the form with the values like depicted in the screenshot:

Specify generated Client ID in mobile config.yaml file

openedx-app-android/Documentation/ConfigurationManagement.md at main · openedx/openedx-app-android

openedx-app-ios/Documentation/CONFIGURATION_MANAGEMENT.md at main · openedx/openedx-app-ios

3.2 Provide FCM credentials to the app

Create new apps in Firebase Console for Android and IOS in Project settings > General section.

Download credentials file, google-services.json for Android, or GoogleService-Info.plist for IOS

Copy/paste values from configuration file into config.yaml as shown in example configurations.

openedx-app-android/Documentation/ConfigurationManagement.md at main · openedx/openedx-app-android

openedx-app-ios/Documentation/CONFIGURATION_MANAGEMENT.md at main · openedx/openedx-app-ios

 

Build applications and you’re ready to go!