Wroclaw University of Technology  –  Faculty of Electronics  –  Internet Engineering

ARCHIVES '2014-2015

"Application Programming: Mobile Computing"
  INEA00112  LABORATORY

Time           Friday 09:15-11:00, 11:15-13:00
Place:          Laboratory 127P / C3
Instructor :  Marek Piasecki
Tutor.hrs :   Monday 15:00-17:00,  Wednesday 08:00-09:00,  Friday 13:00-14:00

Assessment of Students' Solutions:

Laboratory Tasks:



Laboratory (A0)  -  ANDROID - Introduction, Eclipse IDE + Android SDK
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. Use DDMS perspective and its windows: Devices, FileExplorer, Emulator control and LogCat, to explore the state of emulator and test your SkeletonApp application.
Supplementary readings - slides by Victor Matos from Cleveland State University:
       - Android App Development Tools (Setup: Eclipse + ADT + SDK)


Android's Eclipse ADT installation bundles:

 
Laboratory (A1.a)   -  ANDROID  - Understand Activity Life Cycle.
Download, unpack and open example code 03-1-LifeCycleDemo from V.Matos archives,
or try to create your own version of such 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.

Hint:
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.

Supplementary readings:
       - Android Application's Life Cycle 
   
 
Laboratory (A1.b)   -   ANDROID - Creating example Currency Converter app.
  1. Follow instructions from lecture slides Android Devlopment Introduction  (pg.31-38)
    to create new Android project and implement single activity "Currency Converter".

  2. Use DDMS perspective to test and debug internal state of emulator and your Currency Converter application.
 

Laboratory (A2)  -  ANDROID - Experiments with UI design
Create single screen/activity application demonstrating the use of:  Layouts, Widgets, and Menu components to compose the user interface:
  1. Implement a program demonstrating various possibilities for changes in the color, size and font style (of the displayed TextView content), as a result of pressing different buttons or selecting various menu options.
  2. Create your implementation of a general-purpose mathematical calculator.
  3. Develop some kind of multiple-choice e-learning application, that supports memorizing the correlation of predefined number of word-pairs, in two different languages (e.g. Polish and English)


Laboratory (A3)  -   ANDROID -   Intents and multi-screen apps
Create a multi-activity application demonstrating the use of Android's Intents
to start another activity or build-in Intent handlers (platform provided applications) like: Contacts, Phone Dialer, Web Browser, Google Map, etc:
  1. display the phone contacts list (and receive the data of the selected contact),
  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 and return the data bundle containing student's name, email and the version number of the application.
At least one of sub-activities have to be self-made by the student.
At least one of them must return back some results to the launching code.

Supplementary readings:
  - Android Intents - Tutorial (by Lars Vogel)


Laboratory (A4)  -   ANDROID  -  Telephony API
Create "TelephonyDemo" application which provides options for:
  1. Gather basic information about the phone state (CallState, PhoneType, NetworkType, subscriber SIM ID, etc) 
    documentation:  [Listing 7.1]  ,  android.telephony.TelephonyManager
  2. Block all outgoing voice calls to specified phone number
    documentation:  [Listing 7.6]
  3. React to an incoming SMS, automatically sending back another SMS with the name of student (and phone position?) added to the message body.
    documentation:  [Listing 7.7 and 7.8] ,  android.telephony.SmsManager
  4. Monitor / listen to phone state changes (ie. the availability of data connection or changes of signal strength)
    documentation:  [Listing 7.2] ,  android.telephony.PhoneStateListener
Supplementary reading: Chapter 7. Telephony API

Android

Laboratory (A_Project)  -   ANDROID -  advanced application
  • Theme of final Android project may be proposed by student.

  • Each student selects at least two of mobile technology aspects
    (which are not included in laboratories A0 - A4):
    1. mobile database (SQLite)
    2. built-in smartphone sensors: accelerometer, gyroscope, magnetometer, gps
    3. networking, data synchronization or web services
    4. 3D graphics or animation on mobile device
    5. Bluetooth communication between mobile devices
  • Students use the period of three laboratories assigned to this project,
    to create entirely individual mobile application,
    that demonstrates selected technology aspects.






iOS
Laboratory ( i1 )  -  iOS - Intro, development environment, startup application
Getting familiar with Apple iOS7 mobile platform and XCode5 IDE:
  1. Use instructions from following auxiliary readings to create a new iOS7 project
    and implement single screen "Currency Converter" application.
  2. Use iPhone emulator and XCode tools to test and debug your application.
  3. Rebuild and expand this first "converter" program to the form of a general-purpose mathematical calculator (analogous to the calculator made ​​for the Android platform).
Supplementary materials:


Local resources - 
PDF presentation: Walkthrough iOS 5



Laboratory ( i2 )  -  iOS - ViewController life cycle, Segues in Storyboard
  1. Study the concept of ViewController in iOS ModelViewController architecture:
      - review selected slides no 6-16 from Lecture_5 (course CS193p/Stanford/2013)
      - View Controller Programming Guide for iOS (online iOS documentation)
      -  or other usefull comments: iOS View Controller Programming, View Controller Life Cycle
     
  2. Implement basic "life cycle" methods (e.g. viewDidLoad, viewWill/DidAppear, viewWill/DidDisappear, willRotateToInterfaceOrientation, ..., etc)  for main ViewController in Converter/Calculator application created during the laboratory (i1)

    Use NSLog(...) function to print debug information visualising the sequence of ViewController life cycle events (in similar manner like Toast or Log.i for visualising Android Activity lifecycle in laboratory A1.a). 

  3. Get familiar with the method of visual composition of Segues between sequence of windows (ViewControllers) in multi-screen iOS application:
      - selected slides no 16-38 from Lecture_6 (course CS193p/Stanford/2011)
      - 12 minutes demo iOS - Storyboards-Scenes and Segues on YouTube

  4. Analyse the example code of  "PSYCHOLOGIST" application
    (created as demo for "Lecture 6: Multiple MVCs and Segues" - last 25 minutes of video)
    Create similar "StudyAdvisor" application, which will assist in the choice of the  field/speciality of study at our Faculty of Electronics.
    (using questions like: Are you more interested in computer hardware or software?
    What is your favourite programming language: Java, C++, Asembler? , etc.)    


Laboratory ( i3 )  -  TableViewController, Master-Detail programming pattern
  1. Study the concept of UITableView and TableViewController in iOS architecture:
      - review selected slides no 1-58 from Lecture_11 (course CS193p/Stanford/2013)
      - Table View Programming Guide for iOS (online iOS documentation)
      -  or other usefull comments: Simple Master-Detail Application Master-Detail video demo
     
  2. Follow one of below listed step-by-step tutorials:
      - Dynamic TableViews with Prototype Table View Cells
         from Techotopia  iOS 7 App Development Essentials online book,
      - Simple Master-Detail iPhone App (EN/PL)
    to create your version of Master-Detail application which utilize master TableViewController to display a brief list of data items (cars, animals, ...)
    and detail ViewController to present more precise information about selected item.

    The default theme could be application presenting a brief list all specialities at our Faculty of Electronics and related detail information about selected speciality.

    Depending on your preferences, you can use  Static_Cells  for predefined fixed list of items, or Dynamic_Prototypes for variable number of items
    (e.g. loaded from a mutable array or database).




Windows Phone
Laboratory (W1)  -  Windows Phone - Introduction, IDE, startup application
Getting familiar with Microsoft WP 7/7.5 mobile platform,  XAML and VisualStudio IDE:
  1. Review slides  (1.1)  (1.3)  (1.4)  or first chapter from below listed book, to acquire general knowlege about Windows Phone 7 and Silverlight platform.
  2. Use instructions from slides  (2.1)  (2.2)  (2.3) describing composition of "Adding Machine" project, and implement single page "Currency Converter" application.
  3. Rebuild and expand this first "converter" program to the form of a general-purpose mathematical calculator (analogous to the calculator made ​​for the Android platform).
Supplementary resources:
For beginners:


Update for Windows Phone 8:


Laboratory (W2)    Handling orientation, Binding, Pages and Navigation
  1. Based on suggestions from the presentation Managing Application Page Layout
    expand the functionality of your MathematicalCalculator (from laboratory W1)
    to allow changes of the interface layout, depending on the device orientation changes.
     
  2. Starting with the source code of the project: Lab 4. Working TimeCalculator.zip
    and hints from the presentation Data manipulation and display (4.2),
    perform exercise number 4.3 "Using Data Binding"
    from instruction "Lab 04. User Interface Design"

    (compressed folder: Lab 4.3 Data Binding Time Calculator with TimeClass.cs)

     
  3. Study the presentation about Pages and Navigation (4.5)
    and create simple application which contains at least three pages
    and buttons which enable skipping from one page to another.


Laboratory (W3)    Launchers/Choosers, App distribution through Marketplace
Launchers and Choosers:
  1. Study the presentation 9.3 Launchers and Choosers or Chapter 9.3 from BlueBook
    and analyse corelated code examples:  01_Email_JotPad  ,  02_PictureDisplay.

  2. Based on above guidance, create an application demonstrating the possibilities of launching build-in Windows Phone resources/aplications which may display a webpage, start a phone call, read Contacts or Calendar data.
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 one of your applications for distribution (performance analysis, creating XAP file, creation of application tiles and artwork, Marketplace approval testing)
  3. Finalize application submission and approval process
    by
    sending the link (to your Marketplace distribution) to laboratory instructor.