Difference between revisions of "Phonebot developer's reference/Sample applications"
From EtherWiki
(→Calculator) |
(→Calculator) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
* Each number key contains the same script in its OnClick event by using [[Phonebot_developer%27s_reference/Script_language#The_this_keywords|the <code>this</code> keyword]]. | * Each number key contains the same script in its OnClick event by using [[Phonebot_developer%27s_reference/Script_language#The_this_keywords|the <code>this</code> keyword]]. | ||
+ | |||
+ | == Email client == | ||
+ | |||
+ | * Uses [[Phonebot_developer%27s_reference/Object_reference/Using_Phonebot_services#Service_properties|Email]] service to send emails with attachments. | ||
+ | * Uses [[Phonebot_developer%27s_reference/Object_reference#Module|file dialog]] to browse for attachments from the file system and the [[Phonebot_developer%27s_reference/Object_reference#File|file]] object to read the file. | ||
== Notepad == | == Notepad == | ||
Line 13: | Line 18: | ||
* Uses the <code>[[Phonebot_developer%27s_reference/Object_reference#Map|map]]</code> object to sort notes | * Uses the <code>[[Phonebot_developer%27s_reference/Object_reference#Map|map]]</code> object to sort notes | ||
* Uses [[Phonebot_developer%27s_reference/Object_reference#List|<code>list</code> named objects]] to store database records within the visual list | * Uses [[Phonebot_developer%27s_reference/Object_reference#List|<code>list</code> named objects]] to store database records within the visual list | ||
+ | * Uses a [[Phonebot_developer%27s_reference/Advanced_tools#User-defined_methods|user-defined method]] to load notes into the list | ||
== Services == | == Services == | ||
Line 18: | Line 24: | ||
* Contains several examples of each type of <code>[[Phonebot_developer%27s_reference/Object_reference#Services|service]]</code> | * Contains several examples of each type of <code>[[Phonebot_developer%27s_reference/Object_reference#Services|service]]</code> | ||
* The "Twitter feed" module uses an http service object to make a request to the Twitter [https://dev.twitter.com/docs/api/1/get/search search Web service]. When the [[Phonebot_developer%27s_reference/Object_reference#Module|module]]'s [[Phonebot_developer%27s_reference/Creating_applications#Services|<code>OnService</code> event]] fires, the <code>[[Phonebot_developer%27s_reference/Object_reference#Json|json]]</code> object is used to parse the event data and fill a [[Phonebot_developer%27s_reference/Object_reference#List|list]] with the search results. | * The "Twitter feed" module uses an http service object to make a request to the Twitter [https://dev.twitter.com/docs/api/1/get/search search Web service]. When the [[Phonebot_developer%27s_reference/Object_reference#Module|module]]'s [[Phonebot_developer%27s_reference/Creating_applications#Services|<code>OnService</code> event]] fires, the <code>[[Phonebot_developer%27s_reference/Object_reference#Json|json]]</code> object is used to parse the event data and fill a [[Phonebot_developer%27s_reference/Object_reference#List|list]] with the search results. | ||
+ | |||
+ | Depending on the hardware, sensors can produce a large number of events. If the application freezes when reading sensor data, try setting the Phonebot "Sensor buffer" to a lower value. | ||
== Time tracker == | == Time tracker == |
Latest revision as of 20:26, 18 August 2012
Agent
- Uses
application.open_application(name)
to open external processes - Creates a user
database
to save previous commands
Calculator
- Each number key contains the same script in its OnClick event by using the
this
keyword.
Email client
- Uses Email service to send emails with attachments.
- Uses file dialog to browse for attachments from the file system and the file object to read the file.
Notepad
- Creates a user
database
to save notes - Uses the
map
object to sort notes - Uses
list
named objects to store database records within the visual list - Uses a user-defined method to load notes into the list
Services
- Contains several examples of each type of
service
- The "Twitter feed" module uses an http service object to make a request to the Twitter search Web service. When the module's
OnService
event fires, thejson
object is used to parse the event data and fill a list with the search results.
Depending on the hardware, sensors can produce a large number of events. If the application freezes when reading sensor data, try setting the Phonebot "Sensor buffer" to a lower value.
Time tracker
Keep track of how much time you spend on different tasks. Create task types to categorize tasks. Use timer to start and stop tasks. View a list of every task or a summary of how much time was spent on each task type.
- Creates two user
database
s - Uses
datetime
objects to manage timestamps and durations - The application contains application scoped variables
- The "Menu" module uses module scoped variables