4 Replies Latest reply on Jul 15, 2014 3:36 AM by Alpesh Budhia

    Issue with Rho::Notification.showPopup

    Alpesh Budhia

      We are experiencing issue with Rho::Notification.showPopup on android. The dialogs intermittently don't appear immediately when called, when they aren't displaying they might pop-up after 10 minutes or so.  Closing and reopening the app makes the Dialogs appear as required.

       

      One thing I've noticed is when we have the issue the 'Show Notification' option for the app has became un-ticked. When I use the android monitor to view the debug info it says that notification message have been disabled by the user, this is when the dialog should appear. It's like the dialogs are trying to be shown as notifications.

       

      This is causing a big problem as with are using a dialog to ask the user a question that depending on there answer will take them to a different page. If the dialog isn't appearing the user is stuck.

       

      Example code:

       

      Rho::Notification.showPopup({

                                          :message => 'Do you want to book return travel?',

                                          :title => 'Info',

                                          :icon => :info,

                                          :buttons => [{:id => 'yes', :title => 'Yes'}, {:id => 'no', :title => 'No'}]},

                                          url_for(:action => :navigate_return_travel, :id => @params['id'])

          )

       

       

      We've had this issue in versions 2.2, 4.0 and 4.1 of Rhostudio.

       

      Devices we've used

      Samsung Galaxy S2 (android 4.1.1)

      Samsung Galaxy S4

      Toughshield R500+

       

      Thanks

        • Re: Issue with Rho::Notification.showPopup

          Is there any other information you can provide on this issue? I have attempted to reproduce this on a Galaxy S4 but the popup comes up every time, even with notifications turned off for the app in question. I have also tried this on an TC55 (Motorola) which did not exhibit this issue either.

            • Re: Re: Issue with Rho::Notification.showPopup
              Alpesh Budhia

              Hi Michael,

               

              Sorry for late response.

               

              I've got the issue myself today on a Samsung Galaxy S2 running android 4.1.2. This happened after re-installing the app and registering.

               

              I ran Android monitor to capture some debug info from the device. There on entry that says 'Suppressing notification from package com.qube_global_software.planetmobile by user request.'

              Then 7 minutes later the popup does appear.

               

              When this does happen, the 'show notification' setting is disabled in the android app settings. If I turn this setting back on, the popups show up as notifications instead of dialogs.

               

              The Android log file is attached (log2.txt) along with two rhomobile log files from the mobile.

               

              06-25 16:27:10.294: I/APP(13624): I 06/25/2014 16:27:10:298 00003574 RHO SettingsController| Layout file: /data/data/com.qube_global_software.planetmobile/rhodata/apps/app/layout_erb.iseq. Content size: 3396

              06-25 16:27:11.124: I/APP(13624): I 06/25/2014 16:27:11:130 00003574         Notification| button object=java.util.HashMap

              06-25 16:27:11.144: D/ApplicationPolicy(2130): isStatusBarNotificationAllowed: packageName = com.qube_global_software.planetmobile

              06-25 16:27:11.144: W/NotificationManager(13624): notify: id corrupted: sent 5, got back 0

              06-25 16:27:11.144: E/NotificationService(2130): Suppressing notification from package com.qube_global_software.planetmobile by user request.

              06-25 16:27:11.154: I/APP(13624): I 06/25/2014 16:27:11:157 00003538       SimpleMainView| Cleared URL: http://127.0.0.1:60711/app/Settings

               

              Note: when we do have the issue restarting the app make is work as expected.