Wroclaw University of Technology  –  Faculty of Electronics  –  Internet Engineering

"Application Programming: Mobile Computing"
  INEA00112  LABORATORY   '2016

Time           Tuesday 17:05-18:45
Place:         Laboratory L.2.3 / C-16
Instructor :   Marek Piasecki
Tutor.hrs :   Monday 15:00-17:00,  Tuesday 11:00-13:00,  room: 321/C-3

Assessment of Students' Solutions:

Laboratory Tasks:

Laboratory (A0)  -  ANDROID - Introduction, Android Studio configuration
Getting familiar with Android platform and its Integrated Development Environment.
  1. Download Main reading: chapter 2 and 3  from
    free Techotopia ebook  "Android Studio Development Essentials"
  2. Follow instructions from chapter 2 to configure Android Studio environment
  3. Use SDK Manager to check/install/uninstall  Android SDK ( platform, samples, tools, documentation, etc.) for selected API version
  4. Use Virtual Device Manager to create Android Emulator for API level (version) installed in the exercise (c)
  5. Follow instructions from chapter 3 to test the proces of creation / building / running sample "Blank Activity" application. Utilize virtual device created in exercise (d).
  6. Use Device Monitor (DDMS) and its windows: Devices, FileExplorer, Emulator control and LogCat, to explore the state of emulator and test your sample application.

Archival materials for Eclipse IDE:

Laboratory (A1.a)   -  ANDROID  - Understand Activity Life Cycle.
Download, unpack and import example 03-1-LifeCycleDemo (Eclipse project)
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.

This task could be simplified with the use of
       Code > Override Methods…        (shortcut: Ctrl+O)
option from the Android Studio’s top menu.
(sort by percent of classes which override the method)

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 reading:
       - Android Application's Life Cycle 
Laboratory (A1.b)   -   ANDROID - Creating example Currency Converter app.
  1. Follow instructions from lecture slides Android Devlopment Introduction  (pg.32-39)
    to create new Android project and implement single activity "Currency Converter".

  2. Use the AndroidMonitor view (Alt+6), or separate Dalvik Debug Monitor Server  (DDMS) tool, to test and debug internal state of emulator and your Currency Converter application. Utilise the control printouts generated by instructions:
           Log.i( "TAG_for_filtering", "Example message" );
    to visualise the flow of the program execution in the LogCat window.

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)
Supplementary readings:
  - Lesson 4: Graphical User Interfaces (Victor Matos)
  - Using ConstraintLayout to design your views (Google Developers CodeLabs)

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 optionally 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:
  - Lesson 10: Android Intents (by Victor Matos)
  - Android Intents - Tutorial (by Lars Vogel)
  - Retrieving Details for a Contact

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  - example chapter from book "Android in Action"
  - Requesting Permissions at Run Time - how to solve the permission denied error
    (in API / targetSdkVersion of 23 or higher)


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
    6.  . . . ?
  • Students use the period of three laboratories assigned to this project,
    to create entirely individual mobile application,
    that demonstrates selected technology aspects.

  • The application should have a user interface of some (non-trivial) complexity.
    At least three Windows/Activities/Fragments/Tabs are expected.


Archival laboratory '2015: "Programming iOS 7 in Objective-C" ►

Current laboratory schedule: "Programming iOS 9 in Swift"  ▼

Laboratory ( i1 )  -  iOS/Swift - Intro, development environment, startup application
Getting familiar with Apple iOS9 mobile platform and XCode7 IDE:
  1. Use instructions from Techotopia ebook/tutorial
    Chapter 15. Creating an Interactive iOS 9 App
    to create new iOS7 project and implement single screen "Currency Converter"

  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:
  - Lecture 1 - Logistics, iOS 8 Overview - video on YouTube,
  - Lecture 2 - More Xcode and Swift, MVC - based on materials from the
     Stanford University CS193P course "Developing iOS 8 Apps with Swift"

  - On line Swift 2.2 documentation
     or "Swift 2.1 programming language" PDF handbook.

  - Techotopia - iOS 9 App Development Essentials (with Swift),

Archival resources - PDF presentation: Walkthrough iOS 5

Laboratory ( i2 )  -  iOS - ViewController life cycle, Segues in Storyboard
  1. Study the concept of ViewController in iOS Model-View-Controller architecture:
    CS193p - Lecture 8 - View Controller Life cycle slides (and video)

    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 print(...) or NSLog(...) functions 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). 

  2. Get familiar with the method of visual composition of Segues between sequence of windows (ViewControllers) in multi-screen iOS application:
    Techotopia - Chapter 23 - Using Storyboards and Segues in XCode 7

    Analyse the example "Psychologist" application
    (created as demo for archival "Lecture 6: Multiple MVCs and Segues" from year 2011
    - watch last 25 minutes of this video , starting from minute 44)
    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:
      - simple introductory tutorial - Getting Started With UITableView in Swift
      - CS193p - Lecture 10 - Table View start from page 8 (and video 1h 21min)
    More advanced Apple Developer tutorials:
      - Lesson 7 Working with Table Views (master TableView)
      - Lesson 8 Implementing Navigation  (connect with detail Meal sub-View)

  2. Create your version of Master-Detail application which utilize master TableViewController to display a brief list of example 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 Phone7.x / 8.x
Windows 10 Mobile

Archival laboratory '2015: "Programming Windows Phone 7.0 / 7.5 / 7.8" ►

Current laboratory schedule:
"Programming Windows 10 Mobile (Windows Phone 8.1)

Laboratory (W1)  -  Windows Phone/Mobile - Introduction, IDE, startup application
Getting familiar with Microsoft Windows 10 Mobile platform,  XAML and VisualStudio IDE:
  1. Use instructions from below listed "Windows Phone ... for Beginners" ebook:
    Lecture 2 - Writing your First Windows Phone 8.1 App PDF or Video  (10min),
    Lecture 9 - Tip Calculator PDF or related Video tutorial  (25min),
    to implement your own version of single page "Currency Converter" application.

Supplementary materials:

Laboratory (W2)    Adaptive User Intarface, Pages and Navigation
  1. Based on suggestions from below listed free-ebook chapters:
    UWP-008 - XAML Layout with Grids
    UWP-009 - XAML Layout with StackPanel
    UWP-017 - XAML Layout with RelativePanel
    expand "converter" program, from the first laboratory (W1), to the form of a general-purpose mathematical calculator which adaptively resize its interface for different devices (analogous to the calculator made ​​for the Android platform).
  2. Study the chapter UWP-019-Working with Navigation and create simple application which contains at least three pages and buttons which enable skipping from one page to another.
Supplementary materials:

Laboratory (W3)    Application distribution through Windows App Store
  1. Study the instructions:
      - chapter from Beginners book UWP-056 - Submitting to the Windows Store
      - Developers Guide to Windows  10 - Submit App PPTx slides (or video 57min)
    demonstrating how to:
      - use Windows Dev Center dashboard to prepare and submit your application
        to Windows App Store.
      - make your app available to beta testers on Windows 10 devices

  2. Register as an app developer and use DevCenter dashboard
    to upload one of your self-developed (during previous laboratories)
    Windows 10 Mobile application to Windows Phone App Store.
    Finalize the application submission and approval process by sending the link (to your app beta testing / targeted distribution page in Windows Store) to laboratory instructor.

    Students Hint:
      - How to set up your free Windows Store developer account with DreamSpark