![]() This means that there is an action associated with the event. Note that the link icon to the right of the listing is blue. ![]() Toward the top of the General section of that listing you will see the entry for preShow. You will see a listing of events that belong to the form. In the Properties window (found on the right hand side of Iris), click on the Action tab. There is only one form listed, frmBatteryStatus.Ĭlick on this form. To see how this works in Iris, go to the Project browser and click on Mobile, then Forms. Any change to phone status following app start-up, such as removing the charging cable or discharging the battery will not be updated on the display. This means that the battery is read one time, just before the initial display of the status. In this app the form is displayed just once, during start-up and is not changed or updated after that. It fires just before anything is drawn to the screen. preShow EventĮvery form has a preShow event, which fires every time a form is displayed. The function getDeviceInfo() is associated with the preShow event of frmBatteryStatus which is called just before the form is displayed. You can see these files displayed at the bottom of the project. The code can is contained in two user provided files: These elements are adjusted at run time from JavaScript code associated with the project. An indicator that the battery is currently charging.The project consists of one form named frmBatteryStatus. The iris project can be seen in the Project browser: There are two main parts of the app - what you can see Iris, and what is contained in JavaScript code associated with the app. The top level form, frmBatteryStatus has an action associated with it's preShow event that makes the api calls to display the charging and battery status for the phone. The project contains a single form which contains flex containers for the battery status graphic and the Charger status graphic. You can download the app from the GitHub project site. How to use the iOS currentDevice object to read device status in Volt MX JavaScript.How to use Android Intents in Volt MX JavaScript.How to write code that supports two platforms in one application.How to read battery status using the Volt MX Iris Native Function API to access stock Android and iOS APIs.The Volt MX Battery Status app is a simple graphical application that works both on iPhone and Android. Native Function API Developer's Guide: Native Function APIs for Android > Android Examples > Battery Status - Application Walkthrough Battery Status Application Walk-through.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |