Wroclaw University of Technology  –  Faculty of Electronics  –  Internet Engineering

ARCHIVES '2012-2013
"Application Programming: Mobile Computing"

Time           Thursday 11:15-13:00, 15:15-16:55, 17:05-18:45
Place:          Laboratory 127P / C3
Instructor :  Marek Piasecki
Tutor.hrs :   Thursday 09:15-11:00, Friday 13:15-15:00

Assessment of Students' Solutions:

Exemption from the lecture/test:

Students who succeed in finishing all the laboratory exercises before June 6
(including successful deploying of Windows Phone application to Marketplace)
with the final laboratory assessment not less than 4.5 , they will be
exempted from written test examination during last lecture June 13.
 [ Sample questions for the test ]

Laboratory Tasks:
        L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, Final

Java MicroEdition:
  • L0 (21.II)
    - Understanding J2ME Application Models  (Sun/Oracle technology papers)
    - Programming Java Micro Edition  (chapter from the Coursebook)
    - NetBeans IDE 7.3 Download
    ( from version 7.2 Visual Designer is a separate plugin, which can be installed by:
     NetBeans » Tools » Plugins » Available » Visual Mobile Designer »  Install )  

    Note: J2ME applications for laboratory assessment should be created "by hand"
               (i.e. without Visual Designer)
  • L1 (28.II)
    - J2ME_ex_(1) - Standard MIDlet Life Cycle
    J2ME_ex_(2) - MIDlet User Interface and Input Event Handling
  • L2 (07.III)
    - J2ME_ex_(3) - Drawing Low Level Graphics on the Device Screen
    J2ME_ex_(4) - Wireless Messaging by SMS Texting
    J2ME_ex_(5) - MIDP Persistent Data Storage Using RMS

    Final J2ME solution have to be tested on real device !
    (private deploying through "USB" )

  • L3 (14.III)
    - Download Android Installation bundle (SDK + Eclipse + ADT)
    - Android_ex_(0) - Getting familiar with Android platform and its IDE
  • L4 (21.III)
    - Android_ex_(1) - Understand Android application and activity life cycle
    - Android_ex_(2) - Experiments with basic UI design (Layouts, Widgets, Menu)
  • L5 (04.IV)
    - Android_ex_(3) - "IntentDemo" application
  • L6 (11.IV)
    - Android_ex_(4) - "TelephonyDemo" application
  • L7 (18.IV)   
    - Android_ex_(5) - SQLite database - "To Do" list application

    Final Android solution have to be tested on real device
    and complete for placing in Google Play 

Windows Phone:
  • L8 (25.IV)
    - Windows Phone ex (1)

  • L9 (09.V)  -  Lecture and laboratories are canceled due to Juvenalia (Rector's Day)
    - Windows Phone ex (2) - this exercise will be done as a homework
                                                 (for a period of three weeks 25.IV-16.V)
  • L10 (16-23.V)
    - Windows Phone ex (2) - continuation
    - Windows Phone ex (3)
    Final Windows Phone solution have to be tested on real device
    and placed in Marketplace

Final project - selected / individual mobile application:
  • 29.V - 06.VI
    - select your favourite / interesting mobile platform
    - select mobile technology aspect:
    a) built-in smartphone sensors: accelerometer, gyroscope, magnetometer, gps
    b) networking, data synchronization or web services
    c) 3D graphics
    d) Bluetooth communication between mobile devices

Assessment / project evaluation:
  • 13.VI

Course Description:

    The objective of the laboratory class is to provide a real hands-on experience in software development for various hardware and programming environments, namely: Java Micro Edition, Windows Mobile, Symbian and Qt/QtMobility framework. This includes handling essential limitations of mobile environment: restricted user interface, limited computational performance, memory-awareness, power management and security in mobile applications.
    All laboratory participants are expected to posses theoretical and practical abilities suitable for fast creation of medium difficulty programs in Java/C++ (about one hundred lines of code) in the time not exceeding one hour. Knowledge of the theoretical concepts is required to solve laboratory tasks. It is expected that the students have taken a look at the lecture slides and studied related chapters, from accompanying course book "Mobile Computing", before the class. According to tentative schedule, the laboratory will consists of following modules:

In summer term 2012, the antiquated Symbian platform is going to be exchanged for Android 2.x, 3.x
and Windows Mobile 6.x  for Windows Phone 7.5 Mango.

Exercises Description:

Java MicroEdition . ex_1
Standard MIDlet Life Cycle
Create a simple application (with a very limited or without user interface),
demonstrating all possible states and transpositions of MIDlet's life cycle:
  1. Pure background MIDlet (console) application, which does not possess any graphical user interface components, which notifies life cycle changes by System.out.print() messages in debug/output window of IDE.
  2. "HelloWorld" application displaying a single Form with the selected title, which quits after counting down assigned time interval (e.g. 5 seconds).
Java MicroEdition . ex_2
MIDlet User Interface and Input Event Handling
Create a MIDlet application utilizing MIDP High-Level UI API to compose user friendly interface for standard key-pad based cell phone.
  1. MIDlet implementation of currency exchange calculator.
  2. MIDlet implementation of questionnaire form, collecting selected personal,
    education and employment data for national census
    (for future sending, by SMS or WLAN, to census office)
  3. The user interface for a foreign language mini-dictionary for a tourist,
    supporting self-memorizing and quick searching for popular phrases.
Java MicroEdition . ex_3
Drawing Low Level Graphics on the Device Screen
Create a MIDlet application utilizing Canvas object for implementing custom user interface composed of geometrical figures and animation.
  1. Implement selected two-dimensional computer game (like Ping-Pong, PacMan or Arkanoids) which demands to perform some simple drawing and animation.
  2. For devices with a touch screen, supporting pointer events, create a simple “Paint”-like graphical editor, which allows one to draw basic figures (lines, rectangles, circles)
Java MicroEdition . ex_4
Wireless Messaging by SMS Texting.
Create MIDlet applications communicating with each other through SMS-based communication channel.
  1. Create a distributed implementation of tic-tac-toe (noughts and crosses) game, which enables to play the game remotely between two SMS subscribers.
  2. Create an application which automates the process of SMS-based broadcasting of selected predefined text messages, to predefined group of phone subscribers (for example: inviting friends to a Friday party, informing superiors about illness or absence)
Java MicroEdition . ex_5
MIDP Persistent Data Storage Using RMS.
Create MIDlet applications that permanently memorize data collected during subsequent sessions or share the same data between several MIDlets (from different Suites).
  1. Implement a MIDlet with history-feature, that stores all the Data/Time moments of its launching.
  2. Create a composition of three cooperating MIDlets, which share the same RecordStore. At least one of them should be from different MIDlet Suite. Consider three functionalities: record owner, reader (read only) and writer.
  3. Create a MIDlet implementation of a home private library database representing books, readers and  their relation in the form of three tables.

Android . ex_0
Getting familiar with Android platform and its Integrated Development Environment.
  1. Use SDK Manager to check/install/uninstall  Android SDK ( platform, samples, tools, documentation, etc.) for selected API version (default: API 2.3.3 Gingerbread)
  2. Use Virtual Device Manager to create Android Emulator for API level (version) installed in the exercise (a)
  3. Test the proces of creation / building / running of Android sample applications:
    File > New > Other > Android > Sample Project > SkeletonApp
    or more complicated APIDemos sample projects.
    Utilize virtual device created in exercise (b).
  4. Follow instructions from lecture slides Android Devlopment Introduction (pg.33-41) to create new Android project and implement single activity "Currency Converter".
  5. Use DDMS perspective, Devices, FileExplorer and LogCat, to test and debug internal state of emulator and your Currency Converter application.

Android . ex_1
Understand Android Application and Activity Life Cycle.
Create an Android application signaling changes of internal state through notifying Toasts e.g.
      Toast.makeText(this, "onCreate", 1).show();
implemented for all following events:  onCreate, onStart, onResume,
onSaveInstanceState, onPause, onStop, onDestroy, onRestart.
This task could be simplified with the use of
 Menu > Source > Override/Implement Methods…
option from the Eclipse’s top menu.
Observe and note the sequence of messages displayed by the Toast-commands after:
  1. Click on application FINISH button
  2. Click on the emulator’s HOME button
  3. Click on the emulator’s CALL ( Green phone)
  4. Long press on the emulator’s HANG-UP button
  5. Receiving a text-message from other emulator
  6. Making a voice-call from other emulator.
Every time, return to the same "running" state, through clicking on device's launch pad,
and selecting your application icon.
Android . ex_2
Experiment with basic UI design (use of Layouts, Widgets, main and context MENU):
  1. Implement a simple font color/style demo, which changes the color/size/style of the displayed TextView content by pressing buttons or selecting menu options.
  2. Create your implementation of general purpose number calculator.
  3. Create multiple-choice test of e-learning application for memorizing 10 pairs of Polish/English worlds
Android . ex3
Create an "IntentDemo" Android application
utilizing built-in (platform provided) Intent handlers and at least one Activity self-made by the student to:
  1. display contacts list,
  2. send an SMS message to selected receiver,
  3. display google map of the place with the given geographic coordinates (latitude/longitude),
  4. display an “About” screen containing student's name, email and the version number of the application.
Android . ex4
Create "TelephonyDemo" Application
which have at least three screens and implement options (or context) menu to enable to:
  1. gather basic information about the phone state (CallState, PhoneType, NetworkType, subscriber SIM ID, etc)
  2. block all outgoing voice calls to specified phone number,
  3. react to an incoming SMS, automatically sending back another SMS with the name of student (and phone position?) added to the message body.
  4. monitor / listen to phone state changes (ie. the availability of data connection or changes of signal strength)
Supplementary reading: Chapter 7. Telephony API

Android . ex5
"To Do" List Application
  1. Store all data in local SQLite Database  ( android.database.sqlite ).
  2. Provide options to: add, update, delete list entries.
  3. Filter entries, depending on the category.
  4. Provide option for geotagging, display map/geographic information about the task
Suplementary reading: Android - Managing_and_Accessing_Local_Databases
Windows Phone . ex1
Introduction to Windows Phone Platform
Review slides  1.1  1.4  2.2  from lecture (or first chapter from below listed book),
and compose your individual answers for following topics:
  1. List main elements of standard hardware configuration for Windows Phone.
  2. What is Silverlight?
  3. What is the main difference between Silverlight and XNA?
  4. For what purpose will we use XAML?
Results/answers should be placed in a text file named: "WinPhoneEx1_Answers.txt".

A handbook "Windows Phone Programming in C#" by Rob Miles / Microsoft Education
Installation of Windows Phone SDK 7.1 (Visual Studio 2010 + Expression Blend + Emulator)

BlueBook Code Demos: AddingMachine_00AddingMachine_01AddingMachine_02
Windows Phone . ex2
Starting with the source code of projects:
  - Lab 4.1/2/3 Working TimeCalculator.zip
  - Lab 4.4 Customer_Time_Logger.zip
and perform at least two tasks/exercises from instruction "Lab 04. User Interface Design.pdf"

Final solutions should be packed into files:  WinPhoneEx_041, WinPhoneEx_042, ...
and left od drive "I:" in subdirectory with your family name and student id (index no).

Sulplementary slides for exercise 2 (Lab.04):
Windows Phone . ex3
Create a final Windows Phone application.
According to your preferences, select one of below listed areas of interest (a), (b) or (c):
  1. Using Databases on Windows Phone
    (Chapter_6.pdf, demos for chapter 6, Laboratory_6.pdf, LaboratoryExamples_6.zip)
  2. Networking with Windows Phone
    (Chapter_7.pdf, demos for chapter 7, Laboratory_7.pdf, LaboratoryExamples_7.zip)
  3. Creating XNA Games on Windows Phone
    (Chapter_8.pdf, demos for chapter 8Laboratory_8.pdf, LaboratoryExamples_8.zip)
Study related chapter from Windows Phone Programming BlueBook. Analyse attached demonstrations and laboratory exercises. Use provided resources as a skeleton for your final Windows Phone application. Other ideas are permissible on condition that they will be earlier reported to the lab instructor.
Windows Phone . ex4
Upload developed Windows Phone application to Marketplace.
  1. Create your individual developer account on Dev Center with Windows Live ID
    (Activation Code can be obtained from lab instructor)
  2. Use instructions from last chapter of BlueBook: "Windows Phone Marketplace"
    to prepare your application for distribution (performance analysis, creating XAP file, creation of application tiles and artwork, Marketplace approval testing)
  3. Finalize application submission and approval process
    sending the link (to your Marketplace distribution) to laboratory instructor.

Final Project - selected / individual mobile application
  • Select your favourite / most interesting for you / mobile platform
    (Android, Windows Phone, Apple iOS, ... ? )
  • Select at least one mobile technology aspect
    (which is not included in laboratories 1-10):
    1. built-in smartphone sensors: accelerometer, gyroscope, magnetometer, gps
    2. networking, data synchronization or web services
    3. 3D graphics on mobile device
    4. Bluetooth communication between mobile devices
  • Use the period of the last two laboratories (29.V-6.VI),
    to create your entirely individual mobile application,
    that uses selected technology aspect.