Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-70081

Missing device type in tokens registrations requests to Airnotifier

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.8.6, 3.9.3
    • 3.8.5, 3.9.2, 3.10, 4.0
    • Messages
    • MOODLE_310_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_38_STABLE, MOODLE_39_STABLE
    • MDL-70081-master
    • Hide

      Requirements for testing:

      • Ngrok
      • Mobile app

      Testing:

      • Install a new site with this branch
      • Give the site a public internet site address (URL) using Ngrok and https
      • As admin, access to the site using the public URL
      • Go to Site administration -> Messaging -> Notification settings and check that you see the "Mobile" plugin enabled (checkbox with a tick) just under Notifications plugins
      • Now go to Administration -> Site registration
      • And complete the registration process by accepting the "Privacy notice" and clicking "Register your site" button
      • Once the registration process finishes, go back to the Site administration -> Messaging -> Notification settings > Mobile settings
      • Go to the bottom of the page and check if the "Airnotifier Access key" field is empty
      • If is empty click on "Request access key" to retrieve a key
      • Now create a new normal user account in the site (no admin)
      • Using the Moodle app, access to the site with the new account using the public site URL
      • In the Moodle app, go to the "More" option (at the bottom, is the icon with three horizontal lines, right to the bell icon) -> Preferences -> Messages
      • Enable the following settings:
        • Accept messages from: Anyone on the site
        • Notification preferences: Mobile
      • Put the Moodle app in background in your device
      • Now, as admin in the Moodle web site, send a private message to the app's user
      • Confirm that:
        • You receive Push notification in the mobile device with the new message
      Show
      Requirements for testing: Ngrok Mobile app Testing: Install a new site with this branch Give the site a public internet site address (URL) using Ngrok and https As admin, access to the site using the public URL Go to Site administration -> Messaging -> Notification settings and check that you see the "Mobile" plugin enabled (checkbox with a tick) just under Notifications plugins Now go to Administration -> Site registration And complete the registration process by accepting the "Privacy notice" and clicking "Register your site" button Once the registration process finishes, go back to the Site administration -> Messaging -> Notification settings > Mobile settings Go to the bottom of the page and check if the "Airnotifier Access key" field is empty If is empty click on "Request access key" to retrieve a key Now create a new normal user account in the site (no admin) Using the Moodle app, access to the site with the new account using the public site URL In the Moodle app, go to the "More" option (at the bottom, is the icon with three horizontal lines, right to the bell icon) -> Preferences -> Messages Enable the following settings: Accept messages from: Anyone on the site Notification preferences: Mobile Put the Moodle app in background in your device Now, as admin in the Moodle web site, send a private message to the app's user Confirm that: You receive Push notification in the mobile device with the new message

      Previously we were able to detect the device type just by checking the length of the device token (64 bits for iOS, otherwise it was Android). The type of device is necessary to correctly prepare the payload format of a Push notification.

      Since we starting using Firebase Cloud Messaging, the device tokens for Android and iOS have the same format, so it is not possible to detect the type of the device as we did before.

      This has not been a major problem because of as part of the Push Notification payload that comes from Moodle to Airnotifier we always include the device type, but, it could happen that the first time a use device is registered in Airnotifier is not via a Push Notification. In that case, the device type is incorrectly stored in the Airnotifier database (it will be fixed later after the user receive a Push notification).

      So, basically, the main issue here is data inconsistencies between Airnotifier and Moodle list of devices.

       

            jleyva Juan Leyva
            jleyva Juan Leyva
            Pau Ferrer Pau Ferrer
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 45 minutes
                2h 45m

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