Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Main part

Push notifications (PN) functionality based on the Firebase Cloud Service (FCM) is planned to be added. Flow which is needed to be implemented:

  1. Mobile app sends device token to the server.

  2. Server stores devices_token in to DB. One user can have several device_tokens.

  3. On the specific events a PN should be sent for specific user for each their device_token.

  4. User receives the PN on their device.

PN functionality is planned to be implemented in edx-platform and edx-ace repositories.

  1. edx-platform will contain all required environmental variables that is needed to authenticate our platform with FCM to be able to send authenticated requests to FCM service to send push notifications.

  2. edx-ace is planned to be extended by:

    1. Extending Recipient to have additional device_token field.

    2. Add PushNotificationChannel, similar to other channels in the edx-ace

    3. Add PushNotificationRenderer, similar to EmailRenderer but for PN.

    4. Use django-push-notifications OR firebase-admin-python.

      1. django-push-notifications

        1. contains all required modules like models, views, serializers and urls for adding device_token into the system

        2. initialization using credentials from FCM

        3. the plan is to incapsulate functionality from the package into the edx-ace (reexport)

      2. firebase-admin-python (in case django-push-notifications won’t work for us)

        1. requires to implement initialization, models, serializer, url and additional functionality that is implemented by django-push-notifications

  3. Integration of incapsulated Push Notifications functionality from the edx-ace into edx-platform

    1. Extend INSTALLED_APPS with django-push-notifications that is planned to be defined in the edx-ace

    2. Extend urls for POST device_token endpoint

    3. Use similar way to send PN as already done for Emails from edx-ace

Problems & Questions

  1. django-push-notifications is not supported currently for Python 3.10 and Django 4? Do we want to contribute this package or to use Firebase admin SDK.

    1. Findings: The current package isn’t fully compatible wuth

  2. Where the push notifications app should be initialized? Example: we specify FCM_API_KEY and initialization should be in the edx-ace or in the edx-platform.

  3. In case we use django-push-notifications, what is the best way to extend INSTALLED_APPS? Install it straight into edx-platform or only edx-ace?

  4. If we don’t use django-push-notifications can we create models and endpoint in the edx-ace

New questions & updates (2024.04.09):

  1. We start implementing the solution with edx-ace right now.

  2. edx-ace Push Notifications will be imported and used under lms/djangoapps/mobile_api

  3. Do we want to implement user preferences? In the notifications app in edx-platform there is preferences system.

  • No labels