
Mobile Application Development (MAD) is the process by which application software is developed for small low-power handheld devices such as personal digital assistants(PDAs), mobile phones, tablets etc.
These applications are either
(a) preinstalled on phones during manufacture, or
(b) downloaded by customers from various mobile software distribution platforms or
(c) can develop our own applications.
A Mobile Operating System is the software platform on top of which other programs can run on mobile devices.
Popular Mobile Operating Systems:
· Symbian - Nokia - Microsoft.
· BlackBerry - Research In Motion (RIM)
· iOS (known as iPhone OS)- Apple
· WebOS - Hewlett-Packard (HP)
· Bada - Samsung
· Windows Mobile - Microsoft
· Android etc...
Android
Android is a free, open source, mobile operating system based on a modified version of Linux for mobile devices.
Android is developed by Android Incorporation by Andy Rubin and his team, and is now maintained by OHA (Open Handset Alliance),led by Google.
Android is a complete stack of –
· Operating System- based on a modified version of Linux
· Middleware - SDK (Software Development Kit)
· Core Applications
Application development is mainly using Java , Kotlin languages
Flutter is an open-source mobile application development SDK created by Google. It is used to develop applications for Android and iOS. Flutter uses the Dart Language that was created by google
The Complete Android P Developer CourseCourse Contents:
Android Architecture
Installation
Android Application Build Process
Create the first Android Application
Run the application in AVD & Real Android Device
Android Resources
Event Handling & Toast Notification
Activity Lifecycle
Linking Activities
Intents & Intent Filters
Common UI components in Android
Text Controls, Button Controls, List Controls
Styles & Themes
Supporting Multiple Screen
Android Animations & Graphics
Menus & Dialogs
Notifications
Working with Media
Preferences and Data Storage – Shared Preferences, Internal and External Storage, SQLite Database
AsyncTask in Android
Networking using HttpURLConnection, OkHttp, Volley
SMS Messaging and Email
Broadcast Receivers
Android Services
Bluetooth and WiFi
Telephony Manager
Android Content Providers
Getting the Current Location of the Device
Working with Google Maps
Showing the current location on Map
XML & JSON with Parsing
Webservices using SOAP and RESTful services
Android Splash Screen
Retrofit
Google Places
Firebase – Auth, Notifications, Database etc
Publishing an Android Application in Google Play store
Android Devices:
Smart Phones
Tablets
Wearable Devices (WEAR) like Google Glass, Google Watch
Automobiles
Big Screen
etc..
Android Platform Versions::
Each version of Android is identified with Platform, Code-name and API Level Number
Resource Attached
Android Runtime:
Android can use two different virtual machines:
1) DALVIK
2) ART
Dalvik is the process virtual machine (VM) in Google's Android operating system prior to Android 4.4
DVM optimizes the virtual machine for memory, battery life and performance.
Dalvik is a name of a town in Iceland.
Android Application is developed using Java language and the application java programs (.java files) are compiled by the java compiler (javac.exe) to create .class files (java byte code files)
Before execution, all the java byte codes (.class files) are converted into the compact Dalvik Executable (.dex) format, which is designed to be suitable for systems that are constrained in terms of memory and processor speed.
"DX Tool" is used to convert Java .class files into the .dex format.
Multiple .class files are included in a single .dex file.
From Android 4.4 (Kitkat) version onwards, a new runtime environment was introduced for Android and is - ART
Why did Google moved from DALVIK to ART?
There was one major disadvantage of DALVIK - It was SLOW!.
Dalvik uses JIT compilation model. JIT compiler compiles the app when they are opened by users (The app start up procedure). So it made opening of apps slower and which in turn hampered the user experience.
ART uses the Ahead-Of-Time (AOT) compilation model which compiles the apps to machine code upon installation
Apps run a bit FASTER! under ART, so the startup time of apps gets reduced.
Android Architecture:
I) Linux Kernel
works as a HAL(Hardware Abstraction Layer)
contains Device drivers
used for Memory Management
used for Process Management
used for Networking
Power Management etc
II) Libraries
C/C++ libraries
A media library for playback of audio and video media
A surface manager to provide displaying management
Graphics libraries that include SGL (Scalable Graphics Library) and Open GL (Graphics Library) for 2D and 3D graphics
SQLite for native database support
SSL(Secured Socket Layer) and WebKit(browser) for integrated Internet security and web browser
FreeType - bitmap and vector font rendering
Libc - tuned for embedded Linux-based devices
II) Android Runtime
Dalvik VM / ART
-dex (Dalvik Executable) file
-Compact and efficient than .class files
-Limited memory and battery power
Core Libraries
-Android specific libraries
III) Application Framework
Provides Java classes to create Android applications
Activity Manager – manages application life cycle of applications.
View System is a set of components that can be used to build an application; including lists, grids, text boxes, buttons, an embeddable web browser etc.
Content Providers that enable applications to access data from other applications (such as Contacts), or to share their own data
A Resource Manager- providing access to non-code resources such as localized strings, images, audio files, video files , layout files etc
A Notification Manager that enables all applications to display custom alerts in the status bar
IV) Applications
Built in and user applications including an email client, SMS program, Calendar, maps, browser, contacts and others
Build Process of an Android Application and also to know how to publish an Android Application
How to install Android Studio
To develop an Android Mobile Application in Android Studio
Running An Android Application in Android Virtual Device and also in a Real Android Device
How to create a string resource?
Open "strings.xml" file from app/res/values folder
add one more string resource inside <resources> root element as
<string name="msg">Android @ Udemy</string>
this resource will be added into R.java inside "string" class ; so it can be referred in a java program as R.string.msg and in XML - @string/msg
In activity_main.xml - change the android:text value of TextView as
<TextView
android:text="@string/msg" />
To set a Background image for Activity:
place an image (back.jpg) in app/res/drawable folder; so that, it can be referred as R.drawable.back in a java program and @drawable/back in an XML file
In activity_main.xml
<RelativeLayout
android:background="@drawable/back"
/>
Working with ImageView
Place an ImageView from "Common" in Palette" window to activity_main.xml
and place an image (udemy.jpg) in app/res/drawable folder
The unit of measurement used in android for other than font size is "dp" (previous version "dip") - density independent pixel
<ImageView
android:layout_width="100dp"
android:layout_height="70dp"
android:id="@+id/imageView"
................................
android:src="@drawable/udemy" />
To know the use of AndroidManifest..xml and also to understand what it contains
Toast Notification
A toast notification is a message that pops up on the surface of the window.
It only fills the amount of space required for the message
The user's current activity remains visible and interactive.
The notification automatically fades in and out, and does not accept interaction events.
"Toast" is a pre-defined class present in android.widget package
makeText() is a static method of android.widget.Toast class
Toast t = Toast.makeText(context, string text, int duration);
t.show();
where "context" value can be retrieved by using the getApplicationContext() method or <Activity_class_name>.this (MainActivity.this) or using "this" keyword.
"text" is the message to be displayed
"duration" is either Toast.LENGTH_LONG (1) or Toast.LENGTH_SHORT (0) . LENGTH_LONG & LENGTH_SHORT are two pre-defined static final (constant) integer member datas of "Toast" class and their values are 1 & 0 respectively. Long duration may be approximately 3.5 seconds Short duration may be 2 seconds
Example: Android application to dispaly a toast message in the click event of a button
1) Create a New Android Project using Android Studio
2) Create a string resource with name "btn_label".
Open strings.xml file from res/values folder and add the following element inside <resources>
<resources>
<string name="btn_label">Show Message </string>
</resources>
3) Delete the TextView from activity_main.xml layout resource and change the root element to <RelativeLayout>
4) Place a "Button" inside activity_main.xml
5) Change the text value and width of Button and also register a method for click event
<Button
android:layout_width="220dp"
android:text="@string/btn_label"
android:layout_marginLeft="130dp"
android:layout_marginTop="47dp"
android:onClick="fun"
........................../>
6) MainActivity.java
package com.udemy.case1;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
public class MainActivity extends Activity{
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void fun(View v) {
Toast t=Toast.makeText(this,"Welcome to Android @ Udemy", Toast.LENGTH_LONG);
t.show();
}
}
To position the toast
t.setGravity(Gravity.CENTER,0,0);
Approach-2
Add the following attribute to <Button>
<Button
android:id="@+id/button"
/>
so that, a new "id" resource will be created and is referred in a java program as "R.id.button" (an int value) and in an XML as "@id/button"
findViewById(int resource ID) is a builtin method of android.app.Activity used to get the reference of a View component used in our application
Button b = findViewById(R.id.button);
OnClickListener is a builtin interface present in android.view.View class and it contains the method declaration as
public void onClick(View);
; so that if a View ( like Button) component is registered with OnClickListener and if anyone clicks on that View component, the control will be automatically fired to
public void onClick(View v) method definition
To work with different UI components and also to do some simple event handling
Logcat Window
To understand the Lifecycle of an Android Activity
To pass data from One Activity to Another Activity
How to get the data back from an Activity
To work with different type of Intents mainly Implicit Intents and also to know how to access the builtin applications like Contacts, Browser, Phone Dial pad, Camera, Gallery etc
To work with IntentFilter and also to configure it in AndroidManifest.xml and also programatically
This lesson is talking about Intent Filters in an Android Application
To work with different type of resources like String resource, Layout Resources etc
To work with color state list resource to change the text color of the view components based on its state
To work with TextView, different type of EditTexts etc
To work with AutoCompleteTextView
To work with Button, ToggleButton, ImageButton, CheckBox, RadioButton etc
To work with ListView, GridView and we will be able to develop an Image Gallery
CheckBox
To work with RadioButtons
To work with Themes in Android
To develop frame-by-frame animations
To develop tween animations with set, rotate, scale, alpha etc
To provide different shapes , gradient , width to the different UI components
To work with Options Menu
To Place an Options Menu Item in ActionBar with icon
To work with Context Menu
To work with Popup Menus and to know how to develop a sub-menu
To work with different type of Dialog Boxes used in Android application
Working with Progress Dialog
Work with TimePicker Dialog and Date Picker Dialog
To generate Status bar Notification
To integrate audio in our Android application
To integrate Video in Android Application
To wok with SharedPreferences
To save and to read data to/ from a file in Internal Storage
To work with files in external Storage
Writing to External Storage
To understand what is SQLite database
To create a database, database table, to insert record, retrieve , update and also to delete data in database table
To pre-create an SQLite database with data
Performing CRUD Operations in SQLite
Networking using Java
To check the network connectivity is available in the device or not and also to know the type of Internet connection
Application to understand AsynTask in a proper way
To get an Image from Internet
Working with OkHttp library for networking
Working with Volley Library for networking
To get the Text Response from URL using Volley
To get an Image from a URL using Volley
To send an SMS from our application
To send an SMS using an Implicit Intent
To send an Email from our application
To know the use of broadcast receivers and also to configure it in our application
Application to a do task in new package installation and removal
To work with Wifi and also to get the hotspot which got the highest signal strength
TelephonyManager is used to do the following:-
1. Initiating phone calls
2. Reading the phone, network, data connectivity, and SIM states
3. Monitoring changes to the phone, network, data connectivity, and SIM states
Android's telephony APIs is used to monitor mobile voice and data connections as well as incoming and outgoing calls.
To get current latitude and longitude of the device and also get the address using reverse-geocoding
To get the current address of device based on Latitude and Longitude
To work with GoogleMaps
To show the current location of the device in Map
To work with different Map Styles and Zoom Levels
To place multiple markers in Map
To show the current location of the device in Map
To work with Google Places to show the nearby hospitals, hotels, schools etc
The Android Complete Reference Course is primarily designed for students and programmers who want to learn how to create mobile applications on the Android platform. As a part of this course, we will understand the installation process of android, the internals of android application, create widgets, customize List view, Grid view, Spinners etc, create applications using audio, video and data storage in shared preferences, internal/external storage, SQLite database.
We have included the advanced view components with material design, Google Maps, Google Places and also to interact with Firebase. This course will help you learn mobile app development from scratch and unlock new job opportunities for you in start-ups as well as different multinational companies. Master Android app development, learn how to set up Android Studio, understand Android architecture in detail, learn about integrating your mobile apps with Facebook, Twitter and other social media, Google Drive, Google Maps, SQLite etc.