1 Reply Latest reply on Dec 1, 2013 11:52 PM by Kutir Mobility

    How do I update the Notification/Status Bar?

    Matthew Kerry

      I am writing an app where I have an item with an expiry date. I want to check the expiry date and if it is in the past, put a message in the notification/status bar (icon and message).

       

      This sounds trivial, but I am struggling to find any code snippets that demonstrate how to update the notification/status bar.

       

      Does anyone have any code or a walkthrough on how to achieve this?

       

      Thanks in advance

        • Re: How do I update the Notification/Status Bar?
          Kutir Mobility

          Hi Matthew,

          When you try to show the expiry date in notification, pass the item expiry date dynamically as shown below,

          In view.erb,

          <a href="<%= url_for :action => :popup, :query => {:mgs => "Expiry Date"}%>">Notification</a>

          In controller.rb,

          def popup

              Rho::Notification.showStatus({

                :message => @params["mgs"],

                :title => "Greeting",

                :icon => :info,

                :buttons => ["OK"]

              })

              redirect :index

            end

          Is it helpful?

           

          Visnupriya R

          Kutir Mobility