Developing a Mobile Phone Application
-
Upload
lilianna-valerian -
Category
Documents
-
view
18 -
download
2
description
Transcript of Developing a Mobile Phone Application
![Page 1: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/1.jpg)
Developing a Mobile Phone Application
Compare and contrast to ENCM511 Lab ideas
![Page 2: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/2.jpg)
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
![Page 3: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/3.jpg)
The ‘story’Spark podcast 49
• The podcast explained how HappyWakeUp (happywakeup.com) used a cell phone to 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”.
![Page 4: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/4.jpg)
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
![Page 5: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/5.jpg)
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
![Page 6: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/6.jpg)
Compare to a VDSP project build
• Details in articles
![Page 7: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/7.jpg)
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.
![Page 8: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/8.jpg)
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 .
![Page 9: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/9.jpg)
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.
![Page 10: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/10.jpg)
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
![Page 11: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/11.jpg)
![Page 12: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/12.jpg)
![Page 13: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/13.jpg)
![Page 14: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/14.jpg)
Handling record on and record off message
![Page 15: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/15.jpg)
Set up buffers
At very start of prorogram
Equivalent at a higher level to
[--SP] = R4
But to
‘System Heap’
![Page 16: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/16.jpg)
Avoid memory leaks when application closes
Equivalent to R4 = [SP++]
But at system ‘heap’ level
![Page 17: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/17.jpg)
First prototype worksWhere we want to go with 2nd
• 1st also records and plays back
![Page 18: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/18.jpg)
General idea of 1st prototype
![Page 19: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/19.jpg)
• Record
• Start on press and stop on press
![Page 20: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/20.jpg)
Demonstrate
DSP application
![Page 21: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/21.jpg)
Starting timers
![Page 22: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/22.jpg)
Using timer information
![Page 23: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/23.jpg)
Starting application phone graphics
![Page 24: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/24.jpg)
Drawing graph labels
![Page 25: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/25.jpg)
![Page 26: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/26.jpg)
![Page 27: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/27.jpg)
![Page 28: Developing a Mobile Phone Application](https://reader036.fdocuments.net/reader036/viewer/2022062719/56813028550346895d95b3d4/html5/thumbnails/28.jpg)
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