rhodes 3.1.0.beta.1 → 3.1.0.beta.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,150 @@
1
+ # Rhodes API Reference
2
+
3
+ This API reference contains links to all the Rhodes classes. It first lists them by function, and then alphabetically.
4
+
5
+ ## Application Classes
6
+
7
+ The [Model Controller Class](http://docs.rhomobile.com/rhodes/application#modelviewcontroller) contains several generated methods that perform basic CRUD on the Application Model object. The generated code is in the modelname_controller.rb file.
8
+
9
+ The [AppApplication Class](http://docs.rhomobile.com/rhodes/application#appapplication-class) contains methods that coordinate the startup of a Rhodes application. You place these methods in the application.rb file.
10
+
11
+ The [Application Helpers](http://docs.rhomobile.com/rhodes/application#application-helpers) are helper methods for the model view (.erb) files.
12
+
13
+ The [RhoSupport Class](http://docs.rhomobile.com/rhodes/application#rhosupport-class) has methods to encode and decode URLs.
14
+
15
+ ## User Interface Classes
16
+
17
+ The [WebView Class](http://docs.rhomobile.com/rhodes/ui#control-webview-from-controller-actions) lets you call on the WebView directly from your model controller files.
18
+
19
+ The [Application Menu methods](http://docs.rhomobile.com/rhodes/ui#application-menu) lets you change the native application menu items. You can write these methods in the application.rb file.
20
+
21
+ The [user defined menu-toolbar-tabbar actions](http://docs.rhomobile.com/rhodes/ui#user-defined-menutoolbartabbar-actions) lets you perform such actions as back, forward, home, and close with user define menus, toolbars, and tabbars.
22
+
23
+ The [NativeToolbar Class](http://docs.rhomobile.com/rhodes/ui#native-toolbar-control) let you create and remove toolbars at runtime.
24
+
25
+ The [Navigation bar for the iPhone](http://docs.rhomobile.com/rhodes/ui#navigation-bar) supports a title, a back button, and a right button.
26
+
27
+ The [DateTimePicker Class](http://docs.rhomobile.com/rhodes/ui#datetime-picker) allow the user to choose date or time.
28
+
29
+ ## Rhodes Configuration Properties Class
30
+
31
+ The [RhoConfig Class](http://docs.rhomobile.com/rhodes/configuration#run-time-configuration) allow access to the configuration properties in rhoconfig.txt.
32
+
33
+ ## Device Capabilities Classes
34
+
35
+ The [System Class](http://docs.rhomobile.com/rhodes/device-caps#system-class) provides access to system information.
36
+
37
+ The [GeoLocation Class API](http://docs.rhomobile.com/rhodes/device-caps#geolocation) allows you to access geological information using Ruby calls in your controller.
38
+
39
+ The [RhoContact Class](http://docs.rhomobile.com/rhodes/device-caps#pim-contacts) provides access to a device's phone book and contacts.
40
+
41
+ The [RhoEvent Class](http://docs.rhomobile.com/rhodes/device-caps#pim-calendarevents) provides access to a device's calendar and events.
42
+
43
+ The [Camera Class](http://docs.rhomobile.com/rhodes/device-caps#camera) lets you take a picture and choose a picture from an album.
44
+
45
+ The [Barcode Class](http://docs.rhomobile.com/rhodes/device-caps#barcode) allows the device to recognize a barcode.
46
+
47
+ The [SignatureTool Class](http://docs.rhomobile.com/rhodes/device-caps#signature-capture) allows the device to take a signature and save it as an image with the method take_signature.
48
+
49
+ The [BluetoothManager Class](http://docs.rhomobile.com/rhodes/device-caps#bluetooth) makes a connection between your Bluetooth-equipped device and another Bluetooth-equipped device.
50
+
51
+ The [BluetoothSession Class](http://docs.rhomobile.com/rhodes/device-caps#bluetooth) controls the session between your Bluetooth-equipped device and another Bluetooth-equipped device.
52
+
53
+ The [NFC Classes Class](http://docs.rhomobile.com/rhodes/nfc) provides access to Near Field Communication functionality, which is currently only supported on Android.
54
+
55
+ ZZZ Filled in
56
+ The [RingtoneManager Class](http://docs.rhomobile.com/rhodes/device-caps#ringtone-manager) allows you to view and play a device's ringtones.
57
+
58
+ ZZZZ Filled in
59
+ The [Alert Class](alert-api) lets you call system alert methods for popup, vibrate, or playing audio files.
60
+
61
+ ZZZZ Filled in
62
+ The [Timer Class](timer-api) lets the device use a timer.
63
+
64
+ The [MapView Class](http://docs.rhomobile.com/rhodes/device-caps#mapview) provides an embeddable map interface with the create method and various settings and annotations depending on the map provider (such as Google).
65
+
66
+ The [File Class](http://docs.rhomobile.com/rhodes/device-caps#file-system-access) allows access to the Rhodes file structure.
67
+
68
+ ## Rhom and Database Classes
69
+
70
+ The [Rhom Class](http://docs.rhomobile.com/rhodes/rhom#rhom-api) allows access to the Rhodes mini database object mapper, performing database operation on Rho model objects.
71
+
72
+ The [RhomSource Class](http://docs.rhomobile.com/rhodes/rhom#accessing-sync-info-with-rhomsource) exposes sync information, which you can use for alerts, status pages, and so on.
73
+
74
+ The [Rhom database functions](http://docs.rhomobile.com/rhodes/rhom#resetting-the-database) allow you to reset the Rhom database.
75
+
76
+ ## SyncEngine Class - Sync the Rhodes Model with the RhoSync Server
77
+
78
+ The [SyncEngine Class](http://docs.rhomobile.com/rhodes/synchronization#syncengine-api) allows you to synchronize data for the Rhodes model and handle updates between the Rhodes application and the RhoSync server.
79
+
80
+ ## Logging, Testing, Error Classes
81
+
82
+ The logging Ruby class, RhoLog, has the methods info and error which take 2 strings and writes them to the rholog.txt file. The first string is the category, the second string is the message.
83
+
84
+ The [RhoError Class](http://docs.rhomobile.com/rhodes/test-log-debug#logging) accesses error messages.
85
+
86
+ ## Alphabetical List Of Classes and Function Types
87
+
88
+ The [Alert Class](http://docs.rhomobile.com/rhodes/device-caps#alerts) lets you call system alert methods for popup, vibrate, or playing audio files.
89
+
90
+ The [AppApplication Class](http://docs.rhomobile.com/rhodes/application#appapplication-class) contains methods that coordinate the startup of a Rhodes application. You place these methods in the application.rb file.
91
+
92
+ The [Application Helpers](http://docs.rhomobile.com/rhodes/application#application-helpers) are helper methods for the model view (.erb) files.
93
+
94
+ The [Barcode Class](http://docs.rhomobile.com/rhodes/device-caps#barcode) allows the device to recognize a barcode.
95
+
96
+ The [BluetoothManager Class](http://docs.rhomobile.com/rhodes/device-caps#bluetooth) makes a connection between your Bluetooth-equipped device and another Bluetooth-equipped device.
97
+
98
+ The [BluetoothSession Class](http://docs.rhomobile.com/rhodes/device-caps#bluetooth) controls the session between your Bluetooth-equipped device and another Bluetooth-equipped device.
99
+
100
+ The [Camera Class](http://docs.rhomobile.com/rhodes/device-caps#camera) lets you take a picture and choose a picture from an album.
101
+
102
+ The [DateTimePicker Class](http://docs.rhomobile.com/rhodes/ui#datetime-picker) allow the user to choose date or time.
103
+
104
+ The [File Class](http://docs.rhomobile.com/rhodes/device-caps#file-system-access) allows access to the Rhodes file structure.
105
+
106
+ The [GeoLocation Class API](http://docs.rhomobile.com/rhodes/device-caps#geolocation) allows you to access geological information using Ruby calls in your controller.
107
+
108
+ The [MapView Class](http://docs.rhomobile.com/rhodes/device-caps#mapview) provides an embeddable map interface with the create method and various settings and annotations depending on the map provider (such as Google).
109
+
110
+ The [Model Controller Class](http://docs.rhomobile.com/rhodes/application#modelviewcontroller) contains several generated methods that perform basic CRUD on the Application Model object. The generated code is in the modelname_controller.rb file.
111
+
112
+ The [Menu methods for Applications](http://docs.rhomobile.com/rhodes/ui#application-menu) lets you change the native application menu items. You can write these methods in the application.rb file.
113
+
114
+ The [menu-toolbar-tabbar user defined actions](http://docs.rhomobile.com/rhodes/ui#user-defined-menutoolbartabbar-actions) lets you perform such actions as back, forward, home, and close with user define menus, toolbars, and tabbars.
115
+
116
+ The [NativeToolbar Class](http://docs.rhomobile.com/rhodes/ui#native-toolbar-control) let you create and remove toolbars at runtime.
117
+
118
+ The [NFC Classes Class](http://docs.rhomobile.com/rhodes/nfc) provides access to Near Field Communication functionality, which is currently only supported on Android.
119
+
120
+ The [Navigation bar for the iPhone](http://docs.rhomobile.com/rhodes/ui#navigation-bar) supports a title, a back button, and a right button.
121
+
122
+ The [RhoConfig Class](http://docs.rhomobile.com/rhodes/configuration#run-time-configuration) allow access to the configuration properties in rhoconfig.txt.
123
+
124
+ The [RhoContact Class](http://docs.rhomobile.com/rhodes/device-caps#pim-contacts) provides access to a device's phone book and contacts.
125
+
126
+ The [RhoError Class](http://docs.rhomobile.com/rhodes/test-log-debug#logging) accesses error messages.
127
+
128
+ The [RhoEvent Class](http://docs.rhomobile.com/rhodes/device-caps#pim-calendarevents) provides access to a device's calendar and events.
129
+
130
+ The logging Ruby class, RhoLog, has the methods info and error which take 2 strings and writes them to the rholog.txt file. The first string is the category, the second string is the message.
131
+
132
+ The [Rhom Class](http://docs.rhomobile.com/rhodes/rhom#rhom-api) allows access to the Rhodes mini database object mapper, performing database operation on Rho model objects.
133
+
134
+ The [Rhom database functions](http://docs.rhomobile.com/rhodes/rhom#resetting-the-database) allow you to reset the Rhom database.
135
+
136
+ The [RhomSource Class](http://docs.rhomobile.com/rhodes/rhom#accessing-sync-info-with-rhomsource) exposes sync information, which you can use for alerts, status pages, and so on.
137
+
138
+ The [RhoSupport Class](http://docs.rhomobile.com/rhodes/application#rhosupport-class) has methods to encode and decode URLs.
139
+
140
+ The [RingtoneManager Class](http://docs.rhomobile.com/rhodes/device-caps#ringtone-manager) allows you to view and play a device's ringtones.
141
+
142
+ The [SignatureTool Class](http://docs.rhomobile.com/rhodes/device-caps#signature-capture) allows the device to take a signature and save it as an image with the method take_signature.
143
+
144
+ he [SyncEngine Class](http://docs.rhomobile.com/rhodes/synchronization#syncengine-api) allows you to synchronize data for the Rhodes model and handle updates between the Rhodes application and the RhoSync server.
145
+
146
+ The [System Class](http://docs.rhomobile.com/rhodes/device-caps#system-class) provides access to system information.
147
+
148
+ The [Timer Class](http://docs.rhomobile.com/rhodes/device-caps#timer) lets the device use a timer.
149
+
150
+ The [WebView Class](http://docs.rhomobile.com/rhodes/ui#control-webview-from-controller-actions) lets you call on the WebView directly from your model controller files.
@@ -0,0 +1,102 @@
1
+ # Alert API - Popup, Vibrate, Play for System Alerts
2
+
3
+ The [Alert Class API](http://docs.rhomobile.com/rhodes/device-caps#alerts) lets you call system alert methods for popup, vibrate, or playing audio files.
4
+
5
+ ## Alert.show_popup "message"
6
+
7
+ Alert.show_popup( { :message, :title, :icon, :buttons, :callback } )
8
+
9
+ Bring the application up front and show a popup message.
10
+
11
+ ### Returns
12
+
13
+ Nil.
14
+
15
+ ### Parameters
16
+
17
+ :message – text to be displayed in popup window
18
+ :title – title of the popup window
19
+ :icon – image to be displayed in popup window. Its value can be one of the following predefined values, or a path to an image file.
20
+ * :alert – ‘!’ icon
21
+ * :question – ‘?’ icon
22
+ * :info – informational icon
23
+ :buttons – array of buttons for popup window. Each button defined by its id and title. Button can be specified by Hash with :id and :title keys or just String – in this case both id and title will be set to this value.
24
+ :callback – url to be called when any of the button will be clicked. This callback will be called with @params hash containing three keys: :button_id, :button_title and :button_index.
25
+
26
+ #### Example
27
+
28
+ :::ruby
29
+ Alert.show_popup( {
30
+ :message => 'Some message',
31
+ :title => 'Custom title',
32
+ :icon => '/public/images/icon.png',
33
+ :buttons => ["Yes", "No",
34
+ {:id => 'cancel', :title => 'Cancel all'}],
35
+ :callback => url_for(:action => :on_dissmiss_popup) } )
36
+
37
+ ### Alert.hide_popup
38
+
39
+ Closes the current popup window.
40
+
41
+ ### Returns
42
+
43
+ None.
44
+
45
+ ## Alert.vibrate(duration_in_milliseconds)
46
+
47
+ Vibrate the device.
48
+
49
+ ### Returns
50
+
51
+ None.
52
+
53
+ ### Parameters
54
+
55
+ duration_in_milliseconds - vibrate for the specified number of milliseconds, up to 25500; if 0 or no duration is specified, it will vibrate for 2500 millisecond.
56
+
57
+ ### Example
58
+
59
+ :::ruby
60
+ Alert.vibrate(2000)
61
+
62
+ ## Alert.play_file(file_name.ext, media_type)
63
+
64
+ Play the specified file if the media type is supported by the phone. The file should be included in the application. For example, if file is in public folder, file name will be /apps/public/test-file.mp3.
65
+
66
+ ### Returns
67
+
68
+ None.
69
+
70
+ ### Parameters
71
+
72
+ file_name.ext - The path to the file name, ending in the file name and extension.
73
+
74
+ media_type - Media type can be specified explicitly, or can be recognized from the file extension. Known file extensions are:
75
+ * .mp3 – audio/mpeg
76
+ * .wav – audio/x-wav
77
+
78
+ ## Alert.show_status(title, status_text, hide_button_label)
79
+
80
+ Show status messages. The status window will close after clicking on hide button.
81
+
82
+ ### Returns
83
+
84
+ None.
85
+
86
+ ### Parameters
87
+
88
+ status_text – text to be displayed in status window
89
+ hide_button_label – label of hide button
90
+
91
+ ### Example
92
+
93
+ :::ruby
94
+ def sync_notify
95
+ status = @params['status'] ? @params['status'] : ""
96
+ Alert.show_status(
97
+ "Status",
98
+ "#{@params['source_name']} : #{status}",
99
+ Rho::RhoMessages.get_message('hide'))
100
+ end
101
+
102
+
@@ -0,0 +1,50 @@
1
+ # RingtoneManager API - View and Play Ringtones
2
+
3
+ The [RingtoneManager Class allows you to view and play a device's ringtones.
4
+
5
+ ## RingtoneManager.get_all_ringtones
6
+
7
+ Get all ringtones on the device.
8
+
9
+ ### Returns
10
+
11
+ A hash containing key/value pairs, where the key is the user-friendly name of ringtone, and the value is its full file name.
12
+
13
+ ### Parameters
14
+
15
+ None.
16
+
17
+ ### Example
18
+
19
+ :::ruby
20
+ @ringtones = RingtoneManager::get_all_ringtones
21
+
22
+ ## RingtoneManager.play @ringtones['my_ringtone']
23
+
24
+ Play a ringtone.
25
+
26
+ ### Returns
27
+
28
+ None.
29
+
30
+ ### Parameters
31
+
32
+ The ringtone to play from the hash.
33
+
34
+ ## RingtoneManager.stop
35
+
36
+ Stop playing a ringtone. Can safely be called even if no ringtone is playing.
37
+
38
+ Currently implemented for Android, Blackberry and Windows mobile. On Blackberry, only the user installed ringtones are accessible. System preinstalled ringtones are not accessible due to Blackberry limitations.
39
+
40
+ ### Returns
41
+
42
+ None.
43
+
44
+ ### Parameters
45
+
46
+ None.
47
+
48
+
49
+
50
+
@@ -0,0 +1,39 @@
1
+ # Timer API - Use a Timer
2
+
3
+ The [Timer Class API](http://docs.rhomobile.com/rhodes/device-caps#timer) lets the device use a timer.
4
+
5
+ ## Timer.start(interval_milliseconds, callback_url, callback_data)
6
+
7
+ Start the timer and call the callback when the timer has run.
8
+
9
+ ### Returns
10
+
11
+ None.
12
+
13
+ ### Parameters
14
+
15
+ interval_milliseconds - Duration of timer in milliseconds.
16
+ callback_url - callback to call at end of timer duration.
17
+ callback_data - data for callback.
18
+
19
+ ### Example
20
+
21
+ :::ruby
22
+ Rho::Timer.start(5000, (url_for :action => :timer_callback), "test")
23
+
24
+ ## stop(callback_url)
25
+
26
+ Stop the timer by callback.
27
+
28
+ ### Returns
29
+
30
+ None.
31
+
32
+ ### Parameters
33
+
34
+ callback_url - the callback_url for this timer; stopped by this method.
35
+
36
+
37
+
38
+
39
+
data/rhodes.gemspec CHANGED
@@ -3,7 +3,7 @@ require "lib/rhodes.rb"
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = %q{rhodes}
6
- s.version = "3.1.0.beta.1"
6
+ s.version = "3.1.0.beta.2"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.authors = ["Rhomobile"]
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhodes
3
3
  version: !ruby/object:Gem::Version
4
- hash: 62196433
4
+ hash: 62196439
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 3
8
8
  - 1
9
9
  - 0
10
10
  - beta
11
- - 1
12
- version: 3.1.0.beta.1
11
+ - 2
12
+ version: 3.1.0.beta.2
13
13
  platform: ruby
14
14
  authors:
15
15
  - Rhomobile
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-08-05 00:00:00 -07:00
20
+ date: 2011-08-07 00:00:00 -07:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -162,6 +162,10 @@ files:
162
162
  - doc/linea.txt
163
163
  - doc/nfc.txt
164
164
  - doc/release.txt
165
+ - doc/rhodes-api/alert-api.txt
166
+ - doc/rhodes-api/ringtonemanager-api.txt
167
+ - doc/rhodes-api/timer-api.txt
168
+ - doc/rhodes-api.txt
165
169
  - doc/rhom.txt
166
170
  - doc/simulator.txt
167
171
  - doc/standard-css.txt
@@ -1020,6 +1024,7 @@ files:
1020
1024
  - lib/test/rho_stubs.rb
1021
1025
  - lib/test/syncdb.sqlite
1022
1026
  - LICENSE
1027
+ - Manifest.txt
1023
1028
  - platform/android/build/android.rake
1024
1029
  - platform/android/build/android_tools.rb
1025
1030
  - platform/android/build/androidcommon.rb