290 likes | 375 Views
Developing a Mobile Phone Application. Compare and contrast to ENCM511 Lab ideas. Based on the following Circuit Cellar Articles.
E N D
Developing a Mobile Phone Application Compare and contrast to ENCM511 Lab ideas
Based on the following Circuit Cellar Articles • Kotchorek, R., M. R. Smith, V. Garousi, "Development of a basic mobile phone application", Circuit Cellar magazine, Accepted September 2009. Expected to be published in issue #245, Dec. 2010 • Kotchorek, R., M. R. Smith, V. Garousi, "Adding health monitoring capability to a mobile phone application" Circuit Cellar magazine, Accepted, September 2009. . Expected to be published in issue #246, Jan. 2011
The ‘story’Spark podcast 49 • The podcast explained how HappyWakeUp (happywakeup.com) used a cell phoneto monitor the sounds of a sleeper’s movement for the last half-an-hour before a planned wake-up alarm call. This time consists of alternating deep sleep and arousal periods. Wake up during an arousal time, and you are refreshed. • Prototype for mobile applications to form the first practical part of a software engineering course on the “Reliable development of mobile medical devices”.
The articles • Building the initial Snorecognizer prototype at the “Hello World” level demonstrates how to write software to use the many basic features available on a PDA or smart phone. This meant that the prototype will have to accept input commands from the available keys and display text together with handling basic audio operations. • By doing some basic DSP analysis on the monitored input sounds, the final cell phone Snorecognizer will output graphs on the maximum number of snores per snooze and other useful pieces of information
Getting started • 90-trial version of Visual Studio 2008 Professional is available on Microsoft’s site (www.microsoft.com/ downloads • Microsoft Developer Network function descriptions/usage guides (msdn.microsoft.com/) . • The Windows Mobile SDKs are also available on the same download site
Compare to a VDSP project build • Details in articles
Auto build – simpler to template for basic TTCOS project • Clicking on the finish button causes Visual Studio to generate a large portion of the code for us. • The WinMain( ) function, the entry point into the application, continuously listens to the messages sent to it by the mobile operating system when events (interrupts) occur . • These messages are then dispatched to the WndProc( ) callback function.
Each call to BeginPaint( ) must be followed by an EndPaint( ) call (Line 32) to complete the painting processes. These functions can only be called inside the WM_PAINT case .
Running as simulation or on an actual Windows Mobile Phone find the target device menu amongst your toolbars, it can be enabled by selecting View -> Toolbars - > Device from the menu bar.
Recognizing key strokes • Detailed information about each WM_KEYDOWN message is contained in the wParam and lParam arguments passed to WndProc( ) (Line 1) • The wParam variable contains a code corresponding to which key has been pressed. • The lParam variable contains additional information about the key-press, such as whether or not the key has been pressed and released or is being held down
Set up buffers At very start of prorogram Equivalent at a higher level to [--SP] = R4 But to ‘System Heap’
Avoid memory leaks when application closes Equivalent to R4 = [SP++] But at system ‘heap’ level
First prototype worksWhere we want to go with 2nd • 1st also records and plays back
Record • Start on press and stop on press
Demonstrate DSP application
Based on the following Circuit Cellar Articles • Kotchorek, R., M. R. Smith, V. Garousi, "Development of a basic mobile phone application", Circuit Cellar magazine, Accepted September 2009. Expected to be published in issue #245, Dec. 2010 • Kotchorek, R., M. R. Smith, V. Garousi, "Adding health monitoring capability to a mobile phone application" Circuit Cellar magazine, Accepted, September 2009. . Expected to be published in issue #246, Jan. 2011