Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS1: Wireless Communication and Mobile Programming

Similar presentations


Presentation on theme: "CS1: Wireless Communication and Mobile Programming"— Presentation transcript:

1 CS1: Wireless Communication and Mobile Programming
Przemyslaw Pawluk Introduction to Android App Development Android architecture Tools Laurentian University International Global Experience Program 2017

2 Agenda Mobile in general Intro to Mobile Overview Mobile Devices
Mobile OS Framework IDE App Store Geolocation Intro to Mobile Overview Apps Components My First Android App

3 Devices (Running Mobile OS)
Smartphone Tablet MP3 player Camera Smart TV Media player CD/DVD player Set-top boxes VoIP phone Home automation and security system Smart Gadgets (watches) (c) Khaled Mahmud

4 Mobile OS OS Owner Device- Smartphone Device- Tablet Android Google
Samsung Galaxy, LG Nexus, HTC One Google Nexus iOS Apple iPhone iPad Windows 10 Mobile Microsoft Nokia Lumia 950 BlackBerry (OS 10, Tablet QNX) Blackberry (formerly RIM) Blackberry Z10 Ubuntu Touch Canonical Firefox OS Mozilla Tizen Linux Foundation Sailfish Jolla (c) Khaled Mahmud

5 Requirements for Mobile OS
Support for Touchscreen Cellular Bluetooth Wi-Fi GPS mobile navigation Camera, Video camera Speech recognition Voice recorder Music player Near field communication (NFC) and infrared blaster (c) Khaled Mahmud

6 World-wide Smartphone Sales (Percentage share)
(c) Khaled Mahmud

7 World-wide Smartphone Sales
(c) Khaled Mahmud

8 Android Releases and sweet names Open source Development language
Cupcake (1.5) Frozen Yogurt ("Froyo") (2.2) Ginger Bread (2.3) Honeycomb (3.0) Ice Cream Sandwich (4.0) Jelly Bean (4.2) KitKat (4.4) Lollipop Marshmallow Nugat Open source Promoted by OHA Development language Java (c) Khaled Mahmud

9 Android Development SDK: Android SDK Language: Java IDE:
Any Java IDE (recommended: Eclipse, plug-in available) Android Studio Emulator: available (c) Khaled Mahmud

10 iOS Closed source Language(s): Devices
Objective C Swift Devices All developed by Apple iPhone, iPod Touch, iPad Second-generation Apple TV Multitasking is supported through background APIs Not true multi-tasking like desktop (c) Khaled Mahmud

11 iOS Development SDK: iOS SDK Framework: Cocoa Touch IDE: Xcode
Needs Mac OS X (Lion) device Framework: Cocoa Touch IDE: Xcode Simulator: Freely available Requires Apple ID Actual device development: Requires subscription: Developer Program ($99/year) (c) Khaled Mahmud

12 iOS Architecture Four abstraction layers Core OS layer
Core Services layer Media layer, and Cocoa Touch layer (c) Khaled Mahmud

13 iOS User Interface UI is based on Multi-touch gestures
Swipe, tap, pinch, and reverse pinch Each has specific definitions within the context of the iOS Control elements Sliders, switches, and buttons (c) Khaled Mahmud

14 Windows 10 Mobile Closed source Current market share is less than 1%
Feature Metro-design Resizable tile Removable storage NFC VoIP integrated in the OS core FM radio Targeted for PCs, mobile devices, Xbox, (c) Khaled Mahmud

15 Windows Development Language: C/C++, C# SDK: Windows Phone SDK 10
IDE: Visual Studio 2015, … Emulator: Available Game development framework: Using XNA Beginners start here Absolute-Beginners (c) Khaled Mahmud

16 Blackberry 10 Based on QNX (Unix-like)
Targeted for both smartphone and tablet Closed source Language(s) C/ C++: Native SDK C++/Qt: Cascades SDK HTML5/Javascript/CSS: Webworks SDK ActionScript: Adobe AIR Java: Android runtime Devices All developed by Blackberry (RIM) Z10, Q10 (c) Khaled Mahmud

17 Ubuntu Touch Mobile version of Ubuntu: Designed for touch screen
Target: Smartphones, tablets, mobile, GPS smartnav, in-vehicle infotainment First device: BQ Aquaris M10 (tablet) UI platform: QT 5-based, also uses Maemo, MeeGo frameworks Because of Linux kernel, the system can be easily ported to Android smartphones (c) Khaled Mahmud

18 Bada By Samsung Closed source Reconfigurable kernel architecture
Already stopped development! (c) Khaled Mahmud

19 Open Handset Alliance (OHA)
Consortium of 84 firms to develop open standards for mobile devices Member firms include Google, HTC, Sony, Dell, Intel, Motorola, Qualcomm, Texas Instruments, Samsung Electronics, LG Electronics, T-Mobile, Sprint Nextel, Nvidia, and Wind River Systems Android is the flagship software of the alliance Competes against mobile platforms from Apple, Microsoft, Nokia (Symbian), HP (formerly Palm), and Samsung Electronics (Bada) (c) Khaled Mahmud

20 APP Stores Apple App Store Google Play Windows Store
Blackberry App World (c) Khaled Mahmud

21 Android Features (c) Khaled Mahmud Storage Connectivity: Messaging
SQLite (lightweight relational data base) Connectivity: GSM/GPRS/EDGE, CDMA, UMTS, WiFi, WiMAX Messaging SMS, MMS Web browser With JavaScript engine Media support H.263, MP3, MP4, AMR, AAC, WAV, MIDI, Ogg Vorbis, JPEG, GIF, PNG, BMP Multi-touch Multi tasking Flash support Tethering Hardware support Camera Accelerometer sensor Digital Compass Proximity sensor GPS (c) Khaled Mahmud

22 Android Architecture 4 layers (5 sections) Linus kernel Libraries
Android runtime Application framework Applications (c) Khaled Mahmud

23 Location services W3C Geolocation API
Client-side Consults of Location Information Servers Common sources of location information IP address Wi-Fi and Bluetooth MAC address Radio-Frequency Identification (RFID) Wi-Fi connection location Device Global Positioning System (GPS), and GSM/CDMA cell IDs (c) Khaled Mahmud

24 GPS Software in Mobile devices
iGO (paid) iOS, Wndows, Android Google maps for Mobile (free) Android, iOS Apple Maps (free) iOS BlackBerry Maps BlackBerry 10 Ovi Maps Symbian OS (c) Khaled Mahmud

25 Accessing Hardware Capabilities
Wireless device Modem Touch screen Camera Accelerometer sensor Digital Compass Proximity sensor GPS Battery How do they share profits? Developer: 70% Apple: 30% (c) Khaled Mahmud

26 How to build apps for Android

27 Simplicity is the key! Simplicity is a key ingredient of the mobile app success! The most successful apps are doing one thing but they do it perfectly.

28 Know your user To create good application (not necessarily mobile) you have to know your target – future users of your app. Know they needs, expectations and what they are used to. Follow good examples and learn from mistakes made by others!

29 What is Android Android is an open source software toolkit for mobile phones that was created by Google and the Open Handset Alliance

30

31 Android Interfaces and Architecture
Hardware Abstraction Layer (HAL) (c) Khaled Mahmud

32

33

34 Activity – main app component

35

36 Components

37

38 Project structure A project in Android Studio contains everything that defines your workspace for an app, from source code and assets, to test code and build configurations. When you start a new project, Android Studio creates the necessary structure for all your files and makes them visible in the Project window on the left side of the IDE

39 Module A module is a collection of source files and build settings that allow you to divide your project into discrete units of functionality. Your project can have one or many modules and one module may use another module as a dependency. Each module can be independently built, tested, and debugged. Additional modules are often useful when creating code libraries within your own project or when you want to create different sets of code and resources for different device types, such as phones and wearables, but keep all the files scoped within the same project and share some code.

40 Project Files manifests java res
Contains the AndroidManifest.xml file. java Contains the Java source code files, separated by package names, including JUnit test code. res Contains all non-code resources, such as XML layouts, UI strings, and bitmap images, divided into corresponding sub-directories. For more information about all possible resource types, see Providing Resources.

41 Project components build/ Contains build outputs. libs/
Contains private libraries. src/ Contains all code and resource files for the module in the following subdirectories: androidTest/ Contains code for instrumentation tests that run on an Android device. For more information, see the Android Test documentation. main/ Contains the "main" sourceset files: the Android code and resources shared by all build variants (files for other build variants reside in sibling directories, such as src/debug/ for the debug build type). AndroidManifest.xml Describes the nature of the application and each of its components. For more information, see the AndroidManifest.xml documentation.

42 Project components java/ jni/ gen/ res/ assets/ test/
Contains Java code sources. jni/ Contains native code using the Java Native Interface (JNI). For more information, see the Android NDK documentation. gen/ Contains the Java files generated by Android Studio, such as your R.java file and interfaces created from AIDL files. res/ Contains application resources, such as drawable files, layout files, and UI string. See Application Resources for more information. assets/ Contains file that should be compiled into an .apk file as-is. You can navigate this directory in the same way as a typical file system using URIs and read files as a stream of bytes using the AssetManager . For example, this is a good location for textures and game data. test/ Contains code for local tests that run on your host JVM. build.gradle (module) This defines the module-specific build configurations. build.gradle (project) This defines your build configuration that apply to all modules. This file is integral to the project, so you should maintain them in revision control with all other source code

43 Project Settings SDK Location: Sets the location of the JDK, Android SDK, and Android NDK that your project uses. Project: Sets the version for Gradle and the Android plugin for Gradle, and the repository location name. Developer Services: Contains settings for Android Studio add-in components from Google or other third parties. See Developer Services, below. Modules: Allows you to edit module-specific build configurations, including the target and minimum SDK, the app signature, and library dependencies. See Modules, below.

44

45

46

47

48 Activity types

49 Activity types

50 Assignment 2 Due: Thursday, July 20, 2017

51 Setup Same groups as in Assignment 1
Goal: Build a simple mobile application Deliverables: Report describing the application that contains the following sections: App name App description Work division (task: member name) ZIP file with the project

52 Apps proposals Shopping list ToDo list Note app Restaurant review app

53 Due: Thursday, July 20, 2017


Download ppt "CS1: Wireless Communication and Mobile Programming"

Similar presentations


Ads by Google