4 Replies Latest reply on Nov 5, 2013 5:14 PM by Nicolas Grolleau

    local_server_port not working anymore in Rhomobile 4 on android

    Nicolas Grolleau

      Hi,

      I've been using the parameter local_server_port in rhoconfig.txt to be able to use html5 localstorage in my app.

      It was working fine with previous version of rhomobile, but no more with rhomobile 4 on android (not tested yet on other platforms).

       

      The first time I run the app I get the correct port, but if I exit and re-open the app, I get a random port, and a new one each time I exit and re-open.

      If I reboot the device, then I get again the expected fixed port at first run and random ports at next runs.

       

      To test it, I made a new rhomobile application and modify index.erb to add the following line in the listview:

      <li><%= Rho::System.localServerPort %></li>

      I also added a button to call Application.quit to exit the app.

      and I modified rhoconfig.txt to uncomment the local_server_port line

       

      Is there a fix or workaround for this isssue?

      It's quite annoying not to be able to rely on localstorage when trying to migrate existing webapps into rhomobile.