2 Replies Latest reply on Mar 18, 2015 8:09 AM by Tobias Kiefer

    nosip.ShowSIP(true) not working on Android

    Tobias Kiefer

      Hello everyone,


      In my android application I want to place a button which globally allows / forbids the appearance of the soft keyboard.

      Using PreloadLegacyNoSIP as 1 I was able to permanently remove the softkeyboard in Android. According to the reference (Rhomobile | NoSIP Preexisting JavaScript Object) there should be a nosip object now on which I can call nosip.ShowSIP(bool) to show and hide the keyboard which would accomplish the above task.

      However, I always get a ReferenceError that the variable nosip cannot be found. Using the same code on the server but connecting with a wm device everything works fine.


      Does anyone have suggestions what could be the problem on Android here?


      Thank you in advance,


        • Re: nosip.ShowSIP(true) not working on Android
          Darryn Campbell

          Hi Toby,


          Owing to technical limitations the pre-existing objects were removed in RMS 4.0, if you're using 5.0 or higher then one potential work around is to include elements.js on your page (find it installed on your machine under C:\RhoMobileSuite5.x.y\ruby\lib\ruby\gems\1.9.1\gems\rhoelements-5.x.y\libs\rhoelementsext\public\re1).  That file contains the definition of nosip, I haven't tried it myself but it should work

            • Re: nosip.ShowSIP(true) not working on Android
              Tobias Kiefer

              Hi Darryn,


              Thank you for your answer. Unfortunately it did not work.


              I linked elements.js and had <PreloadLegacyNoSIP   value="1"/> in my build.yml. When I called nosip.ShowSIP(true); nosip could not be found.

              The useragent contained Android so that if(/Android/.test(navigator.userAgent)) (of elements.js) evaluted to true. Therefore, the last function (which returns nosip) should be executable. I also ensured that elements.js was loaded first among all scripts.


              I also found Rhomobile | Migrating your RhoMobile application to 5.X that in order to use the 2.2 API I would need to include rho_javascript_api.js . I tried including this file to the page as well, however still nosip could not be found.



              I have one more Idea on how to globally enable / disable the SIP: in my config.xml there is a field as follows: <EnableSIP value="1"/>. If the value is 0 there is no keyboard whatever I do, if it is set to 1 there is a keyboard if I click in an input field. Now using a file explorer on my android device, changes of that value in the config.xml are applied when I restart the app.

              So if there would be a possiblity to reload the config without restarting the App, I could write a native extension which changes the value a reloads the config file. Does anyone know of a mechanism to dynamically reload the config.xml?

              Do you have any other ideas how I could get nosip to work properly?

              Thanks again,