Slide 1

Slide 1 text

Introduction to Android Development - GMS and HMS Thean Hoogenboezem and Emenice Mhungu

Slide 2

Slide 2 text

Introduction - Thean Hoogenboezem

Slide 3

Slide 3 text

Introduction - Emenice Mhungu

Slide 4

Slide 4 text

Agenda ● Android Development Basics ● Introduction to Android Studio ● Starting Basic Application ○ Templates ● Android Studio Features ● Intro to GMS and overview ● Intro to HMS ○ Why important ○ Impact on platform ● Example Code ● Questions

Slide 5

Slide 5 text

Android Development Basics ● Programming Language - Java / Kotlin, XML ● IDE - Android Studio ● Framework developed and maintained by Google ○ Open source project ○ Source.android.com ● Android Developer Guide ○ developer.android.com ● Google Developer Guide ○ developers.google.com

Slide 6

Slide 6 text

Android Development - Kotlin ● Google endorsed language ● Interoperable with Java ● Many features simplifying and reducing boilerplate code ● Kotlin introduces the following features ○ Null Safety ○ Lambda Expressions and inline Functions ○ Extension Functions ○ Coroutines ○ Smart Casts ○ To name a few

Slide 7

Slide 7 text

Android Studio Introduction ● Android studio official IDE for android development - 5 to 6 years ● Before Android Studio - Eclipse ○ Horrible ○ Very un-user friendly ● Android studio only free IDE from JetBrains with all the features ○ Ongoing development and support ○ Latest Stable Version 4.0 ● Android Studio is your 1 stop shop for Android Development

Slide 8

Slide 8 text

Android Studio - Template Apps

Slide 9

Slide 9 text

Android Development - Templates ● What are they? ○ Kickstarters with already defined ■ Skeleton ■ Android Basic Building Blocks ready to go ■ Architecture ● MVVM on most of them ■ Unit Test Base ■ Gradle Build system already setup and configured ● Just press play!

Slide 10

Slide 10 text

Android Studio - App Popular Templates ● Basic Activity ● Bottom Nav ● Navigation Drawer ● Tabbed Activity ● Master/Detail Flow ● Map Activity

Slide 11

Slide 11 text

Android Studio - App Less Used Templates ● Native C++ ○ Build C libraries to integrate into Android Apps ● Empty Activity ○ Clean activity with no predefined structure, navigations or actions ● Google AdMob Ads Activity ○ Add basic activity for hosting Google Ads

Slide 12

Slide 12 text

Android Studio - Other Supported Templates ● Android Wear ○ Smart watches ● Android TV ● Android Automotive ○ Car interfaces using Android ● Android Things ○ Embedded operating system apps for smaller devices running Android

Slide 13

Slide 13 text

Android Studio - Features ● Instant App Run ● Visual Layout Editor ( XML) ● Fast Emulator ● Intelligence Code Editor ● Add on App Template Creation ● Builds to all Android Devices ● Firebase setup integration ● Performance Analysis ● Source Control Management ● Many More!

Slide 14

Slide 14 text

Quick Studio Demo with Multilingualism Skills!

Slide 15

Slide 15 text

Google Mobile Services (GMS) ● GMS services consists of many of the features we enjoy on our Android devices ○ Google Play Store - Access to Android applications ○ GMail - Most people have a gmail account linked to their device ○ Chrome - Google Search ○ Google Maps ■ Location searches ■ Listed information about locations ○ Youtube ○ Google Cloud hosted services ■ Cloud capabilities for developers to use in applications ○ android.com/gms

Slide 16

Slide 16 text

GMS - What it provides for Android Frequently referred to as the heart of Android and its applications Provides multiple capabilities for applications to leverage on and provide functionalities Allows distribution of developed applications via Play Store

Slide 17

Slide 17 text

Worldwide Smartphone User Statistics ● In 2020 there are 3.8 Billion Smartphone users worldwide ○ Roughly 70 % of those users are on Android ○ 21 % of users are using iOS ○ Rest other operating systems ● Majority Share Device Manufacturers ○ Apple ○ Samsung ○ Huawei

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

The Divorce - Google and Huawei

Slide 20

Slide 20 text

Trade Sanctions by the US ● In 2018 the US started pushing aggressive trade sanctions against China ● Forcing American owned companies like Google to start cutting off ties with Chinese companies like Huawei ○ Initially sparking the idea of Huawei developing their own OS ○ In time it became clear that the Android Open Source Project would still be used ■ Without GMS ■ Forcing Huawei to expand their long running/neglected AppGallery (HMS) ecosystem

Slide 21

Slide 21 text

Android without GMS? ● User Features lost ○ Google Playstore ■ No method of application distribution ○ Google Search ○ Youtube ○ Google Drive ● Developer Capabilities lost ○ Location services ○ Firebase ○ Google developed cloud services ● The list goes on

Slide 22

Slide 22 text

Android OS considerations ● Uniform experience across multiple devices from different manufacturers - Diverging further ○ Beyond the UI changes already made ■ Samsung ■ Huawei ■ Xiaomi MUI UI ■ One Plus ○ How far will the modifications to Android stretch with this new trend

Slide 23

Slide 23 text

HMS - What does this mean for developers? ● Develop Android apps supporting both ecosystems (HMS and GMS) ● Trade-offs supporting both from dev point of view ○ Builds ○ Versioning ○ Code bases ● Older Huawei devices with GMS and HMS ○ Apps listed on both stores ■ Same package name? ■ Versioning the app? ■ Conflicts between two stores? ● Difficulty porting GMS only apps to support HMS? ● If simple ○ Others like Samsung also diverge? ■ Something like SMS?

Slide 24

Slide 24 text

HMS - What does this mean for Android users? ● Can no longer use Google provided backups ● Other ex. Samsung - Samsung ID ● Huawei ID ○ GMS apps backed up and restored on HMS ecosystem ■ How do apps behave? ● Android standard experience diverging further among platforms ○ Beyond UI changes ● Integration into a new ecosystem not linked to Google history... ○ Many users are well integrated into some google services if not all

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

Huawei Mobile Services (HMS) ● Huawei provides ○ User Features ■ AppGallery (Replacing Google PlayStore) ■ Video (Replacing Youtube) ■ Browser (...) ○ Developer Features ■ Location Services ■ PushKit ■ DriveKit ○ Many more cloud services

Slide 27

Slide 27 text

Let’s look at some more code!

Slide 28

Slide 28 text

Do you want to become a Superhero? https://www.dvt.co.za/graduates

Slide 29

Slide 29 text

Questions?

Slide 30

Slide 30 text

Android Development 101 ● Understand ○ Platform Architecture ○ Android Studio ○ Basic Components / Building Blocks ○ Android Build System - Gradle ○ Android Lifecycle ○ Android JetPack ○ Bonjour le monde!

Slide 31

Slide 31 text

Android Platform Architecture https:/ /developer.android.com /guide/platform

Slide 32

Slide 32 text

Android Studio - IDE ● One stop shop for Android development ● Free usage ● Works on all OS ○ Windows ○ Mac ○ Linux ● Provides all the tools required to develop Android Applications ○ Coding ○ Building ○ Debugging ○ Analysing Performance

Slide 33

Slide 33 text

Android App Components ● Activities ○ Entry Point to interaction with user ○ View System integrates to Activities and Fragments ● Services ○ Entry Point for keeping app and processes running in the background ● Broadcast Receivers ○ Allows app to respond to system wide broadcasts ● Content Providers ○ Manages a shared set of data stored ■ In the file system ■ In an SQLite database ■ On the web

Slide 34

Slide 34 text

Android App Other Components ● Android Manifest ○ Declares App requirements ■ Filters ● Intent Filters ■ Permissions ● However user must accept the permissions when required ● Resources ○ Text displayed ○ Colour codes ○ Images ● Intents and Intent Filters ● And many more

Slide 35

Slide 35 text

Android Build System - Gradle ● App.gradle ● Defines supported SDK versions ○ SDK 19 - KitKat ○ SDK 21 - Lollipop ○ SDK R - Latests un-named build ○ Etc ● Libraries used by the app ○ Definitions and configurations ○ Version management ■ Ex. Android X lib version ○ Support libraries - deprecated with X ○ External API based libraries

Slide 36

Slide 36 text

Android Lifecycle ● Lifecycle provides ○ A way to react to user and OS events ○ Ex. user kills the app ■ Maybe we need to stop a service ○ User pauses the app ■ User backgrounding the app ■ Maybe we must store data

Slide 37

Slide 37 text

Android JetPack - Android X Libs ● Suite of libraries and tools ○ Accelerates Development ○ Eliminates boilerplate code ○ Allows building high quality and robust apps ● Components ○ Foundational ■ Cross cutting functionality - Ex. Backwards compatibility ○ Architecture ■ Helps design robust, testable and mainable apps ○ Behaviour ■ Allows integration of Android services - Ex. Permissions and Notifications ○ UI ■ Provides widgets - to allow ease of development and delightful experiences