Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-2957

Support Firebase analytics

XMLWordPrintable

    • Hide

      This is the last issue about push notifications, so we'll test everything in here. 

      Please notice that some tests will require a branded app since some features are only available in branded apps (like Firebase analytics).

      This issue should be tested using the latest Airnotifier code (not applied yet). Please talk to Juan first to verify which site to use.

      Test push clicks (both in Android and iOS)

      1. Install the regular app in the device and login as a student in a master site with push notifications enabled (mobile master).
      2. Go to notification preferences and make sure that all notifications are enabled for the Mobile processor.
      3. In web as another user, send a contact request to the user in the app. Check that you receive a push notification.
      4. In the device, check that you see a badge in the notification tab with the number 1 (number of unread notifications).
      5. Click the push notification. Check that the messages tab is opened (view with the list of conversations). Check that the badge in the notification tab has disappeared (the notification is now marked as read).
      6. As the student, submit an assignment (either in app or in web). Check that you receive a push notification.
      7. Click the push notification. Check that the assignment is opened.
      8. In web as teacher, open a not-anonymous feedback activity that the student hasn't answered yet.
      9. Go to the "Show non-respondents" tab, select the student using the checkbox in the right, write a subject and a message and click "Send". Check that you receive a push notification.
      10. Click the push notification. Check that the feedback is opened.
      11. In web, award a badge to the student. Check that you receive a push notification.
      12. Click the push notification. Check that the badge is opened.
      13. As the student, submit a quiz. Check that you receive a push notification.
      14. Click the push notification. Check that the quiz is opened.
      15. As the student, answer a lesson that contains an essay question.
      16. In web as teacher, grade that essay question manually. Check that you receive a push notification.
      17. Click the push notification. Check that the grade of the lesson is opened.
      18. Now login as a teacher in the app and make sure that all notifications are enabled.
      19. In web as student, submit an assignment. Check that you receive a push notification.
      20. Click the push notification. Check that the assign is opened.
      21. In web as a student, answer a feedback. Check that you receive a push notification.
      22. Click the push notification. Check that the feedback attempt (or the list of respondents, depending on the configuration) is opened in the app.
      23. In web as a student, submit a quiz. Check that you receive a push notification.
      24. Click the push notification. Check that the student attempt is opened to review it.

      Test icon and group in mobile37 (Android only)

      1. In the app, login as a certain user in mobile37 site (it's configured as it was a branded app).
      2. Put the app in background.
      3. In web or another app, send a message to that user. Check that you receive a push notification with the image of the user that sent the message.
      4. Send a new message to that user. Check that you receive another push notification and the title now says there are 2 messages (something like: "John Smith (2)").
      5. Expand the notification center and check that you can see the 2 messages in the same notification.
      6. Now put the app in foreground.
      7. In web or another app, send a new message to that user. Check that you receive another push notification and the title now says there are 3 messages (something like: "John Smith (3)").
      8. Expand the notification center and check that you can see the 3 messages in the same notification.

      Test Firebase analytics in an app with analytics enabled (both Android and iOS)

      Testing Analytics is quite annoying because it can take up to an hour to send the events. In Android you can enable DebugView to make it faster, but in iOS it can only be done if the app is built with XCode.

      1. Install the app in the device and login in a site.
      2. Put the app in background.
      3. In web, open the Firebase Analytics console, open the right project and open "StreamView".
      4. Send a push notification (e.g. a private message). Check that you receive the push.
      5. Dismiss/Clear the notification.
      6. Put the app in foreground and send a new push notification.
      7. Click the push notification.
      8. Now open a couple of activities in the app. You just need to open the first page.
      9. Wait for the events to be sent to the console. It can take up to an hour, and the StreamView only displays events from the last 30 minutes so it's a bit annoying. If the events don't appear in StreamView, check the Events option.
      10. Check that you see the following events:
        1. moodle_notification_receive (only for Android).
        2. moodle_notification_dismiss (only for Android).
        3. moodle_notification_foreground
        4. moodle_notification_open
        5. Several view_item. Check that in view item params you see the WS called and the name of the item viewed (course name, activity name, etc.)  

      Test in desktop apps

      1. Repeat any of the click tests in the section "Test push clicks" and check that it works fine in desktop too. You don't have to test them all, just a couple of them.
      2. In the desktop app, login with a user that has at least 1 group conversation that isn't muted.
      3. In web, send a message to the group conversation.
      4. In the desktop app, wait a bit and check that a notification for the message is displayed.
      5. Now open the conversation and mute it.
      6. Open a different conversation (to make sure the group conversation isn't opened).
      7. In web, send a message to the group conversation.
      8. In the desktop app, wait a bit and check that no notification is displayed now.
      Show
      This is the last issue about push notifications, so we'll test everything in here.  Please notice that some tests will require a branded app since some features are only available in branded apps (like Firebase analytics). This issue should be tested using the latest Airnotifier code (not applied yet). Please talk to Juan first to verify which site to use. Test push clicks (both in Android and iOS) Install the regular app in the device and login as a student in a master site with push notifications enabled (mobile master). Go to notification preferences and make sure that all notifications are enabled for the Mobile processor. In web as another user, send a contact request to the user in the app. Check that you receive a push notification. In the device, check that you see a badge in the notification tab with the number 1 (number of unread notifications). Click the push notification. Check that the messages tab is opened (view with the list of conversations). Check that the badge in the notification tab has disappeared (the notification is now marked as read). As the student, submit an assignment (either in app or in web). Check that you receive a push notification. Click the push notification. Check that the assignment is opened. In web as teacher, open a not-anonymous feedback activity that the student hasn't answered yet. Go to the "Show non-respondents" tab, select the student using the checkbox in the right, write a subject and a message and click "Send". Check that you receive a push notification. Click the push notification. Check that the feedback is opened. In web, award a badge to the student. Check that you receive a push notification. Click the push notification. Check that the badge is opened. As the student, submit a quiz. Check that you receive a push notification. Click the push notification. Check that the quiz is opened. As the student, answer a lesson that contains an essay question. In web as teacher, grade that essay question manually. Check that you receive a push notification. Click the push notification. Check that the grade of the lesson is opened. Now login as a teacher in the app and make sure that all notifications are enabled. In web as student, submit an assignment. Check that you receive a push notification. Click the push notification. Check that the assign is opened. In web as a student, answer a feedback. Check that you receive a push notification. Click the push notification. Check that the feedback attempt (or the list of respondents, depending on the configuration) is opened in the app. In web as a student, submit a quiz. Check that you receive a push notification. Click the push notification. Check that the student attempt is opened to review it. Test icon and group in mobile37 (Android only) In the app, login as a certain user in mobile37 site (it's configured as it was a branded app). Put the app in background. In web or another app, send a message to that user. Check that you receive a push notification with the image of the user that sent the message. Send a new message to that user. Check that you receive another push notification and the title now says there are 2 messages (something like: "John Smith (2)"). Expand the notification center and check that you can see the 2 messages in the same notification. Now put the app in foreground. In web or another app, send a new message to that user. Check that you receive another push notification and the title now says there are 3 messages (something like: "John Smith (3)"). Expand the notification center and check that you can see the 3 messages in the same notification. Test Firebase analytics in an app with analytics enabled (both Android and iOS) Testing Analytics is quite annoying because it can take up to an hour to send the events. In Android you can enable DebugView to make it faster, but in iOS it can only be done if the app is built with XCode. Install the app in the device and login in a site. Put the app in background. In web, open the Firebase Analytics console , open the right project and open "StreamView". Send a push notification (e.g. a private message). Check that you receive the push. Dismiss/Clear the notification. Put the app in foreground and send a new push notification. Click the push notification. Now open a couple of activities in the app. You just need to open the first page. Wait for the events to be sent to the console. It can take up to an hour, and the StreamView only displays events from the last 30 minutes so it's a bit annoying. If the events don't appear in StreamView, check the Events option. Check that you see the following events: moodle_notification_receive (only for Android). moodle_notification_dismiss (only for Android). moodle_notification_foreground moodle_notification_open Several view_item. Check that in view item params you see the WS called and the name of the item viewed (course name, activity name, etc.)   Test in desktop apps Repeat any of the click tests in the section "Test push clicks" and check that it works fine in desktop too. You don't have to test them all, just a couple of them. In the desktop app, login with a user that has at least 1 group conversation that isn't muted. In web, send a message to the group conversation. In the desktop app, wait a bit and check that a notification for the message is displayed. Now open the conversation and mute it. Open a different conversation (to make sure the group conversation isn't opened). In web, send a message to the group conversation. In the desktop app, wait a bit and check that no notification is displayed now.
    • MOODLE_36_STABLE
    • MOODLE_37_STABLE
    • Moodle App 3.7.0

      The push plugin supports Firebase analytics in iOS, but not in Android. Even after enabling analytics in Android, we barely receive events in the Firebase console (neither in iOS or in Android).

      In this issue we'll:

      • Modify the native code to log notification events ourselves.
      • Log Moodle view events to Firebase console too.

            dpalou Dani Palou
            dpalou Dani Palou
            Pau Ferrer Pau Ferrer
            Juan Leyva Juan Leyva
            Juan Leyva Juan Leyva
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.