Summary

This document provides an introduction to Android, including its features, history, architecture, and setup. It covers topics like open-source nature, platform libraries, and hardware support. There are also some questions for the reader relating to the material

Full Transcript

Lec. #1: Introduction Mobile Applications Development 1 FIRST SEMESTER OF THE ACADEMIC YEAR 2021/2024 What is Android Android is an open-source operating system based on Linux with a Java programming interface for mobile devices such as Smartphone (Touch Screen Devices who supports An...

Lec. #1: Introduction Mobile Applications Development 1 FIRST SEMESTER OF THE ACADEMIC YEAR 2021/2024 What is Android Android is an open-source operating system based on Linux with a Java programming interface for mobile devices such as Smartphone (Touch Screen Devices who supports Android OS) as well for Tablets too. Android was developed by the Open Handset Alliance (OHA), which is led by Google. (OHA) is a association of multiple companies like Samsung, Sony, Intel and many more to provide services and deploy handsets using the android platform. All the source code for Android is available free on Git-Hub, Stack overflow, and many more websites. Google publishes most of the code under the Apache License version 2.0. 2 Android Features 1. It’s open-source and we can customize the OS based 7. It has extensive support for multimedia hardware on our requirements. control to perform playback or recording using camera and microphone 2. It supports connectivity for GSM, CDMA, WIFI, NFC, Bluetooth, etc. for telephony or data transfer. It will 8. It has an integrated open-source WebKit layout based allow us to make or receive a calls / SMS messages web browser to support HTML5, CSS3 and we can send or retrieve data across mobile networks 9. It supports a multi-tasking, we can move from one task window to another and multiple applications can 3. By using WIFI technology we can pair with other run simultaneously devices using apps 10. It will give a chance to reuse the application 4. Android has multiple APIs to support location-based components and the replacement of native services such as GPS applications. 5. We can perform all data storage related activities by 11. We can access the hardware components like Camera, using lightweight database SQLite. GPS, and Accelerometer 6. It has a wide range of media supports like AVI, MKV, 12. It has support for 2D/3D Graphics FLV, MPEG4, etc. to play or record a variety of audio/video and having a different image format like JPEG, PNG, GIF, BMP, MP3, etc. 3 Android History Android was originally developed by a startup of the same name, Android, Inc. In 2005 Google purchased Android, Inc. and took over its development work Google launched the first version of Android platform on Nov 5, 2007. Since then, Google released a lot of android versions under a codename based on desserts, such as Apple Pie, Banana Bread, Cupcake, Donut, Éclair, Froyo, Gingerbread, Jellybeans, Kitkat, Lollipop, marshmallow, etc. and made a lot of changes and additions to the android platform. 4 Question? What is the latest version of android available now? List some of its features 5 Android Version Market Share Source: https://www.statista.com/statistics/271774/share-of-android-platforms-on-mobile-devices-with-android-os/ 6 Android Architecture It is a software stack of components to support mobile device needs and they are: 1. Applications 2. Android Framework 3. Android Runtime 4. Platform Libraries 5. Linux Kernel (main component) 7 Android Architecture Cont.. Platform Libraries LINUX KERNEL It is the bottom layer and heart of the android It includes various C/C++ core libraries and Java-based architecture. libraries such as SSL, libc, Graphics, SQLite, Webkit, Media, Surface Manger, OpenGL, etc. to provide It manages all the drivers such as display support for Android development. drivers, camera drivers, Bluetooth drivers, audio Some core android libraries available for android drivers, memory drivers, etc. which are mainly development. required for the android device during the ◦ Media library for playing and recording audio and video runtime. formats It provides an abstraction layer between the ◦ The Surface manager library to provide a display management device hardware and the remainder of the stack. ◦ SGL and OpenGL Graphics libraries for 2D and 3D graphics  It is responsible for memory management, ◦ SQLite is for database support and FreeType for font support power management, device management, resource access, etc. ◦ Web-Kit for web browser support and SSL for Internet security. 8 Android Architecture Cont.. ANDROID RUNTIME ENVIRONMENT APPLICATION FRAMEWORK ARE is an important part of Android rather than an It provides the classes used to create Android internal part and it contains components like core libraries and the Dalvik virtual machine. applications. It also provides a generic abstraction for hardware access and manages It is the engine that powers our applications along the user interface and application resources. It with the libraries and it forms the basis for the application framework. basically provides the services through which we can create a particular class and make that  Dalvik Virtual Machine (DVM) is a register-based class helpful for the Application creation. virtual machine like Java Virtual Machine (JVM). It is specially designed and optimized for android to ensure that a device can run multiple instances efficiently. It It includes services like telephony service, relies on the Linux kernel for threading and low-level location services, notification manager, NFC memory management. service, view system, etc. which we can use for  The core libraries in android runtime will enable us to application development as per our implement android applications using standard JAVA requirements. programming language. 9 Android Architecture Cont.. APPLICATIONS It is the top layer of the android architecture. The native and third-party applications like contacts, email, music, gallery, clock, games, etc. whatever we will build those will be installed on this layer only. It runs within ARE using the classes and services made available from the application framework. 10 Android Development Setup To start development of an android application we should have: 1. Java Development Kit (JDK) ◦ https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html 2. Android SDK ◦ Downloaded using Android Studio 3. development environment (like Android Studio) ◦ https://developer.android.com/studio 11 Android App / Project Folder Structure 12 Android First Application Example Hello World! The important files that we need to build our app in android studio. o Android Layout File (activity_main.xml) 13 Android First Application Example Hello World! The important files that we need to build our app in android studio. o Android Main Activity File (MainActivity.java) package com.example.helloworld; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } } 14 Android First Application Example Hello World! The important files that we need to build our app in android studio. o Android Manifest File (AndroidManifest.xml) 15 Run the project (ctrl+f10): Method 1 We can run our example on: o Your personal android mobile using USB in which: 1. Enabling developer options o open the Settings screen, scroll down to the bottom, and tap About phone or About tablet o Scroll down to the bottom of the About screen and find the Build number. o Tap the Build number field 7 times to enable Developer Options. o Tap the Back button and you’ll see the Developer options menu just above the “About Phone” section in Settings. o This menu is now enabled on your no need to repeat this process again unless a factory reset performed. 2. Enabling usb debugging o Go into the Developer options menu, scroll down to the Debugging section, and toggle the “USB Debugging” slider. o Press ok 3. In android studio, From the target device drop-down menu ◦ select the device that you want to run your app on. ◦ Press Run 16 Run the project (ctrl+f10): Method 2 We can run our example on: o Android Emulator which created using AVD (Android Virtual Device) in android studio 17 Run the project (ctrl+f10): Method 3 We can run our example on: o External Android Emulator like: Nox Genymotion Reference: 15 best Android emulators for PC and Mac of 2020 article 18 Create AVD in Android Studio 1. click on AVD Manager 2. click on Create Virtual Device 3. Now select the required device type and Click Next 4. Now we need to download and select the system image and click Next 5. Now verify the configuration of the AVD and click Finish 19

Use Quizgecko on...
Browser
Browser