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

Local Notifications make the app crash for some Android devices

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2
    • Component/s: Others
    • Labels:
    • Testing Instructions:
      Hide

      To test the cancel all:

      1. Change version number to 2003.
      2. Check that the update process finishes successfully.

      To test the 2 issues in the comment:

      1. Add console.log to $mmLocalNotifications#schedule and log the uniqueId used.
      2. Install the app as new (don't update it).
      3. Access with the demo account: student. Access the app with another account too.
      4. Kill the app.
      5. Start the app again and check in the log that the ids belong to only 2 sites.
      Show
      To test the cancel all: Change version number to 2003. Check that the update process finishes successfully. To test the 2 issues in the comment: Add console.log to $mmLocalNotifications#schedule and log the uniqueId used. Install the app as new (don't update it). Access with the demo account: student. Access the app with another account too. Kill the app. Start the app again and check in the log that the ids belong to only 2 sites.
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE

      Description

      In The Google play store we see a lot of crashs for the app (16) related with the Local Notifications plugin:

      java.lang.RuntimeException: Unable to start receiver de.appplant.cordova.plugin.localnotification.RestoreReceiver: java.lang.NumberFormatException: Invalid int: "4851555713369"
      at android.app.ActivityThread.handleReceiver(ActivityThread.java:2580)
      at android.app.ActivityThread.access$1700(ActivityThread.java:151)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
      at android.os.Handler.dispatchMessage(Handler.java:110)
      at android.os.Looper.loop(Looper.java:193)
      at android.app.ActivityThread.main(ActivityThread.java:5292)
      at java.lang.reflect.Method.invokeNative(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:515)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
      at dalvik.system.NativeStart.main(Native Method)
      Caused by: java.lang.NumberFormatException: Invalid int: "4851555713369"
      at java.lang.Integer.invalidInt(Integer.java:137)
      at java.lang.Integer.parse(Integer.java:377)
      at java.lang.Integer.parseInt(Integer.java:365)
      at java.lang.Integer.parseInt(Integer.java:331)
      at de.appplant.cordova.plugin.notification.Manager.getIds(Manager.java:197)
      at de.appplant.cordova.plugin.notification.Manager.getOptions(Manager.java:319)
      at de.appplant.cordova.plugin.notification.AbstractRestoreReceiver.onReceive(AbstractRestoreReceiver.java:54)
      at android.app.ActivityThread.handleReceiver(ActivityThread.java:2573)
      ... 10 more
      

        Attachments

          Activity

            People

            • Assignee:
              dpalou Dani Palou
              Reporter:
              jleyva Juan Leyva
              Peer reviewer:
              Juan Leyva
              Integrator:
              Juan Leyva
              Tester:
              Juan Leyva
              Participants:
              Component watchers:
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Sep/15