We will now try these class methods in our application on the same page that we created in the last section.
Follow these steps:
Add the following code to the
controller.rb
in theSystemExample
folder:require 'rho/rhocontroller' class SystemExamplesController < Rho::RhoController def index end def app_exit System.exit end def start_test_app if System::get_property('platform') == 'ANDROID' System.run_app('com.rhomobile.store', "security_token=123") elsif System::get_property('platform') == 'APPLE' System.run_app('store', "security_token=123") elsif System::get_property('platform') == 'Blackberry' System.run_app('store', "security_token=123") else System.run_app('rhomobile store/store.exe', "security_token=123") end end //This action will start the Skype application. def start_skype_app System.run_app('skype', nil) redirect :action => :index...