Posted on November 24th, 2015 by Ashis Kumar
Let’s say you have a variable “query” which contains some string and you want to concatenate the value with a URL ( string ). You can proceed this way. @URL = “http://www.yourdomain.com?#{query}” That’s it.
Posted on November 24th, 2015 by Soutom Dhara
Sometimes we need to load some data to internal DB at the time of initializing/Starting of the application. In below mentioned code I have defined how to insert one admin user’s record to User table. For this we have to write our code ‘initialize‘ method of AppApplication Class. This appApplication class is available in […]
Posted on November 24th, 2015 by Ashis Kumar
Introduction: In Rhomobile, we have the ability to capture signature using the Signature API. The signature API opens a full screen view where user draws its signature and then press the use bytton to store it. Description: First of all, on the controller, we need to call the take method ofSignatureCapture API to show the […]
Posted on November 24th, 2015 by Ashis Kumar
Server APIs which implement basic HTTP Authentication mechanism need username and password to be sent with each API call. This can be achieved in Rhomobile Ajax call as follows $username = “some@example.com” $password = “password” result = Rho::AsyncHttp.get ( :url => “http://www.yourservice.com/API/getRecords”, :authentication => { :type => :basic, :username => $username, :password => $password } […]
Posted on November 24th, 2015 by Ashis Kumar
To download a file/image from server, we need to have the actual file/image path stored on the server. For this, we need to call the server to get the path, then we can use the download_file method to get the file downloaded. So below is the code to achieve this target def download_image_from_server # Get […]
Posted on November 24th, 2015 by Ashis Kumar
Introduction: Rhomobile framework allows to use html, javascript and css to develop the application. But inspecting the UI on the simulator is not possible, and in RhoSimuator, its not so powerfull enough. Description: So in Rhomobile, we can make the application run on a particular port and can open that port on local host in […]
Posted on November 24th, 2015 by Ashis Kumar
In Rhomobile, as we know that global variable can be accessed through out the application, even in the views, we can use them as a session variable. Let’s assume having a small application with some pages where we need to show the logged in user’s name. So to achieve this, global variable can play a […]
Posted on November 24th, 2015 by Ashis Kumar
Introduction: While using the standard web languages like JavaScript, HTML, CSSwith RhoMobile, sometimes we face some issue with the HTML-unsafe characters. We need to handle them to ensure that they don’t break the desired layout. Description: Using RhoMobile, we can handle the accidental breakage of the layout due to HTML-unsafe characters in view using ERB’s […]
Posted on November 24th, 2015 by Ashis Kumar
Introduction: While developing application, we sometimes need to make ajax calls to local methods so that we can render the update without refresing the whole page. When we do so using RhoMobile and get the data using javascript ajax call, we found that the data is rendered as HTML and the data is wrapped inside […]
Posted on November 24th, 2015 by Ashis Kumar
This tip show how to block the screen orientation to specific direction in Rhodes Application for blackberry. To block the Screen Orientation in blackberry, navigate to the path < Rodes >/platform/bb/rhodes/src/rhomobile/ Now open the RhodesApplication.java and paste this function inside the class ( RhodesApplication ). private void setScreenOrientation(int iDirection){ int thisDirections; switch(iDirection) { case Display.DIRECTION_LANDSCAPE: thisDirections = Display.DIRECTION_LANDSCAPE; […]
Posted on November 24th, 2015 by Ashis Kumar
We can create a fixed menu bar in rhomobile application as like the following : In your ‘application.rb’ , put the follwing code inside ‘initialize’ method @tabs = [ { :label => “Photos”, :action => “/app/Photos”, :icon => “/public/images/photos.png” }, { […]
Posted on November 24th, 2015 by Ashis Kumar
We can get the platform name by using : System::get_property(‘platform’) It returns string value and these value can be one of the following : ‘APPLE’ , ‘ANDROID’ , ‘Blackberry’ , ‘WP7’ , ‘WINDOWS’ and ‘UNKNOWN’ for others. If we want to get the OS versions, we can do this using: System::get_property(‘os_version’) This returns the os […]
Posted on November 24th, 2015 by Ashis Kumar
This tip show how to block the screen orientation to specific direction in Rhodes Application for blackberry. To block the Screen Orientation in blackberry, navigate to the path < Rodes >/platform/bb/rhodes/src/rhomobile/ Now open the RhodesApplication.java and paste this function inside the class ( RhodesApplication ). private void setScreenOrientation(int iDirection){ int thisDirections; switch(iDirection) { case Display.DIRECTION_LANDSCAPE: thisDirections = Display.DIRECTION_LANDSCAPE; […]
Posted on November 24th, 2015 by Ashis Kumar
iPhone 4.0 onwards needs three size of icons. They are icon57.png ( 57×57), icon72.png ( 72×72 ) & icon114 ( 114×114 ). We need to put these icons into ‘icon’ folder present inside ‘app’ folder, while building the Application using RhoStudio. If you are building the Application using XCode, then you need to replace the […]
Posted on November 23rd, 2015 by Ashis Kumar
We can create a fixed menu bar in rhomobile application as like the following : In your ‘application.rb’ , put the follwing code inside ‘initialize’ method @tabs = [ { :label => “Photos”, :action => “/app/Photos”, :icon => “/public/images/photos.png” }, { :label => “Videos”, :action => “/app/Videos”, :icon => “/public/images/videos.png” }, { :label => “About […]
Posted on November 23rd, 2015 by Ashis Kumar
We can get the platform name by using : System::get_property(‘platform’) It returns string value and these value can be one of the following : ‘APPLE’ , ‘ANDROID’ , ‘Blackberry’ , ‘WP7’ , ‘WINDOWS’ and ‘UNKNOWN’ for others. If we want to get the OS versions, we can do this using: System::get_property(‘os_version’) This returns the […]
Posted on November 23rd, 2015 by Ashis Kumar
Problem: While developing application using Rhomobile for Android platform, i came across a situation where, when a user focuses on text fields, soft keyboard pops up, but it overlaps the input field so we can’t see what we are entering. The page also doesn’t scroll so that we can’t manually scroll the page to get […]