ANDROID BASICS PART I
Mohan Lalwani
1.
What is meaning of Android Word?
·
Robot with a human appearance.
2.
What is Android?
·
Open-source operating system (Not a Programming Language).
·
Platform Independent.
·
Introduced by Google in 2007.
·
Based on Linux kernel.
·
Primarily used for touch screen inputs - smart phones and
tablet computers.
·
Also used in Android TVS, Cars, Wrist Watches, game
consoles, digital cameras, regular pc’s, etc.
·
Android has 65.58% MARKET SHARE where IOS (27.24 %) and Windows (3.26 %)
[As of June 2016]
Extended Questions
View all
answers of extended questions on this page –
A1. What do you mean by Open-source?
A2. What do you mean by Platform Independent?
A3. What is difference between drivers and kernel?
A4. What is the Linux Kernel and What Does It Do?
A4. What is the Linux Kernel and What Does It Do?
A5. Why only Linux kernel is used for the
integration between h/w and s/w in android and why no other kernel ?
A6. Why are there so many different Android Kernels?
A6. Why are there so many different Android Kernels?
A7. Can you compare between Android and Windows?
A8. Can you compare Android and IOS?
A9. Explain Android TV's
A10. Explain Android Auto
A11. Explain Android Wrist Watch
A12. What is portable wi-fi hotspot?
3.
Advance Features of Android OS
·
Google Now (voice assistant)
·
NFC (Near Field Communication)
·
Use your phone with joystick to enjoy gaming experience
·
Connect your phone with LED TV via MHL or micro HDMI
cable
·
Multi-tasking future that is Task Switcher
·
Data usages(check and also set limit for devices)
Extended Questions: http://techendu.blogspot.in/p/android-basics-ex.html?m=1
B1. Explain in Detail Google Now (voice assistant) -
B2. NFC (Near Field Communication)
4.
Inventors of Android
·
Andy Rubin
·
Rich Miner
·
Nick Sears
Must Read:
5.
What is the latest API level and version number
of android as on March 2016?
Code name
|
Version number
|
Initial release date
|
API level
|
1.0
|
September 23, 2008
|
1
|
|
1.1
|
February 9, 2009
|
2
|
|
1.5
|
April 27, 2009
|
3
|
|
1.6
|
September 15, 2009
|
4
|
|
2.0–2.1
|
October 26, 2009
|
5–7
|
|
2.2–2.2.3
|
May 20, 2010
|
8
|
|
2.3–2.3.7
|
December 6, 2010
|
9–10
|
|
3.0–3.2.6
|
February 22, 2011
|
11–13
|
|
4.0–4.0.4
|
October 18, 2011
|
14–15
|
|
4.1–4.3.1
|
July 9, 2012
|
16–18
|
|
4.4–4.4.4, 4.4W–4.4W.2
|
October 31, 2013
|
19–20
|
|
5.0–5.1.1
|
November 12, 2014
|
21–22
|
|
6.0–6.0.1
|
October 5, 2015
|
23
|
6. Do all mobile phones support the latest Android operating system?
Some Android-powered
phone allows you to upgrade to the higher Android operating system version.
However, not all upgrades would allow you to get the latest version.
It depends largely on
the capability and specs of the phone, whether it can support the newer
features available under the latest Android version.
7.
How do you give version numbers for application
which is targeted for both mobiles and tablets? Will you give same version or
different version?
Same because it is not
based the version number that we differentiate between mobile version and tablet
version, but it is by using fragments in the application
8.
Tools required for Developing Android Apps
·
JDK
·
Eclipse + ADT Plug-in
·
SDK Tools
·
Android Studio by Google
Extended Questions:
9.
Different types of eclipse tools/flavors
Eclipse Versions:
Neon (4.6),
Mars (4.5),
Luna (4.4),
Kepler (4.3),
Juno (4.2, 3.8),
Previous to Juno (<=4.1),
Release
|
Main Release
|
Platform version
|
Oxygen
|
June 2017
|
|
Neon
|
22 June 2016
|
4.6
|
Mars
|
24 June 2015
|
4.5
|
Luna
|
25 June 2014
|
4.4
|
Kepler
|
26 June 2013
|
4.3
|
Juno
|
27 June 2012
|
4.2
|
Indigo
|
22 June 2011
|
3.7
|
Helios
|
23 June 2010
|
3.6
|
Galileo
|
24 June 2009
|
3.5
|
Ganymede
|
25 June 2008
|
3.4
|
Europa
|
29 June 2007
|
3.3
|
Callisto
|
30 June 2006
|
3.2
|
Eclipse 3.1
|
28 June 2005
|
3.1
|
Eclipse 3.0
|
28 June 2004
|
3.0
|
Platform
Support: Windows,
Mac, Linux/GTK
Organization
Name: Google,
Inc.
Sincere
Thanks to Source:
http://stackoverflow.com/questions/4008976/difference-between-eclipse-europa-helios-galileo
http://stackoverflow.com/questions/4008976/difference-between-eclipse-europa-helios-galileo
10.
Explain Tools in android?
The Android SDK and Virtual
Device Manager:
It is used to create and manage Android Virtual Devices (AVD) and SDK packages. The AVD hosts an emulator running a particular build of Android, letting you specify the supported SDK version, screen resolution, amount of SD card storage available, and available hardware capabilities (such as touch screens and GPS).
It is used to create and manage Android Virtual Devices (AVD) and SDK packages. The AVD hosts an emulator running a particular build of Android, letting you specify the supported SDK version, screen resolution, amount of SD card storage available, and available hardware capabilities (such as touch screens and GPS).
The Android Emulator:
An implementation of the Android virtual machine designed to run within a virtual device on your development computer. Use the emulator to test and debug your Android applications.
An implementation of the Android virtual machine designed to run within a virtual device on your development computer. Use the emulator to test and debug your Android applications.
Dalvik Debug Monitoring
Service (DDMS):
Use the DDMS perspective to monitor and control the Dalvik virtual machines on which you're debugging your applications.
Use the DDMS perspective to monitor and control the Dalvik virtual machines on which you're debugging your applications.
Android Asset Packaging Tool
(AAPT):
Constructs the distributable Android package files (.apk).
Constructs the distributable Android package files (.apk).
AAPT
allows you to view, create, and update Zip-compatible archives (zip, jar, apk).
It can also compile resources into binary assets. It is the base builder for
Android applications.
Android Debug Bridge (ADB):
Android Debug Bridge is a
command-line debugging application shipped with the SDK. It provides tools to
browse the device, copy tools on the device, and forward ports for debugging
Sincere
Thanks to Source:
http://stackoverflow.com/questions/28234671/what-is-aaptandroid-asset-packaging-tool-how-it-works
11.
What is AVD?
· Android Virtual Device(AVD) –EMULATOR
· Android SDK includes a mobile device emulator - a virtual
mobile device that runs on your computer.
· Emulator allows the developers to work around an
interface which acts as if it were an actual mobile device
· They can write, test and debug the code
· They are safe for testing the code
12.
Explain ADT and SDK?
ADT stands for Android Developer Tools
· Android Development Tools (ADT) is a plug-in for the Eclipse IDE that is designed to give you a powerful, integrated environment in which to build Android applications.
· ADT extends the capabilities of Eclipse to let you quickly set up new Android projects, create an application UI, add packages based on the Android Framework API, debug your applications using the Android SDK tools, and even export signed (or unsigned) .apk files in order to distribute your application.
· Developing in Eclipse with ADT is highly recommended and is the fastest way to get started. With the guided project setup it provides, as well as tools integration, custom XML editors, and debug output pane, ADT gives you an incredible boost in developing Android applications.
· Android Development Tools (ADT) is a plug-in for the Eclipse IDE that is designed to give you a powerful, integrated environment in which to build Android applications.
· ADT extends the capabilities of Eclipse to let you quickly set up new Android projects, create an application UI, add packages based on the Android Framework API, debug your applications using the Android SDK tools, and even export signed (or unsigned) .apk files in order to distribute your application.
· Developing in Eclipse with ADT is highly recommended and is the fastest way to get started. With the guided project setup it provides, as well as tools integration, custom XML editors, and debug output pane, ADT gives you an incredible boost in developing Android applications.
Sincere Thanks to Source:
SDK stands for
Software Development Kit
A software developer's kit (SDK)
is a set of programs used by a computer programmer to write application
programs. Typically, an SDK includes a visual screen builder, an editor,
a compiler, a linker, and sometimes other facilities. The term is used by
Microsoft, Sun Microsystems, and a number of other companies.
In other words, it is a software
development kit that enables developers to create applications for the Android
platform. The Android SDK includes sample projects with source code,
development tools, an emulator, and required libraries to build Android
applications.
The Google Android SDK
is a toolset that developers need in order to write apps on Android enabled
devices. It contains a graphical interface that emulates an Android driven
handheld environment, allowing them to test and debug their codes.
13.
What is the Java SDK?
The JDK forms an extended subset
of a software development kit (SDK). It includes "tools for
developing, debugging, and monitoring Java applications". Oracle
strongly suggests that they [who?] now use the term "JDK"
to refer to the Java SE Development Kit.
14.
Explain Android Architecture in detail
It contains:
Linux Kernel
Libraries
Android
Framework
Android
Applications
Android
Framework
The Android Framework is an important aspect of
the Android Architecture
Here you can
find all the classes and methods that developers would need in order to write
applications on the Android evs.
Android
Applications - Android Application Architecture has the following components:
Services like Network Operation
Intent – To perform inter-communication between activities or services
Resource Externalization – such as strings and graphics
Notification signaling users – light, sound, icon, notification, dialog
etc.
Content Providers – They share data between applications
Extended Question:
C1. Which phone do you
use and what are its features?
C2. Sensors types
C3. What is difference
between android and J2ME
15.
Which Programming Language is used to develop an
application in Android?
Java
XML
You can
program android apps in C/C++ using NDK.
Extended Question:
D1. How
you can develop android app in C/C++? What is NDK?
16.
Which is the most popular among all this
languages
- The main
language supported is Java programming language.
- Java is the most popular language for app development, which makes it ideal even for new Android developers to quickly learn to create and deploy applications in the Android environment.
17.
Why cannot run standard Java byte code on
android?
That's
because Android uses Davik Virtual Machine and not traditional JVM.
The class file i.e the byte code for Android is first optimized even more to make it mobile friendly (Which usually has a custom format according to specifications of Dalvik VM), which differs from normal bytecode. Hence direct JAVA byte code won’t run.
The class file i.e the byte code for Android is first optimized even more to make it mobile friendly (Which usually has a custom format according to specifications of Dalvik VM), which differs from normal bytecode. Hence direct JAVA byte code won’t run.
18.
Can you code in Java 8 for Android application?
If no, why not?
Android does not
currently support all Java 8 language features. However, the following features
are now available when developing apps targeting the Android N Preview:- Default and static interface methods
- Lambda expressions (also available on API level 23 and lower)
- Repeatable annotations
- Method References (also available on API level 23 and lower)
- Type Annotations (also available on API level 23 and lower
Note: Type annotation
information is only available at compile time, and not during runtime.
19.
How Android app runs inside android mobile
- Since Android code is written in Java, they are also compiled first
and then executed but the JVM for which the byte codes are generated is
different than standard JVM.
- The Dalvik JVM is used to run Android app
20.
What is Dalvik
Virtual Machine(DVM) / Dalvik
Executable File
· Just like Java application run on HotSpot,Android
Application runs on the Dalvik Virtual Machine i.e; its Android's Virtual
Machine
·
It is an interpreter-only virtual machine which executes
files in Dalvik Executable (.dex) format.
·
Android uses DVM which requires a special byte code.
·
We need to convert Java class files into Dalvik
Executable files using an Android tool called "dx"
· In normal circumstances, developers will not be using
this tool directly and build tools will care for the generation of DVM
compatible files
·
Dalvik Executable files have .dex extension and are
zipped into a single .apk file on device
· .dex files can be created by
automatically translating compiled applications written in the Java programming
language
·
Android programs are compiled
into .dex (Dalvik Executable) files to execute with DVM
·
.dex files are light weight
when compared to .class files, and takes less memory and runs faster.
·
DEX files are used to
initialize and execute applications developed for the Android mobile OS
·
DVM (Dalvik Virtual Machine)
where an android application runs, can understand only .dex files.
·
It can't understand .class
files
·
Dalvik serves as a virtual
machine, and it is where every Android application runs.
· Through Dalvik, a device is
able to execute multiple virtual machines efficiently through better memory
management.
21.
What is APK
- APK - Android Package
- The APK file is compressed AndroidManifest.XML file with extension
.apk
- It is having application code(.dex files),resource files and other
files which are compressed into single .apk file
Sincere Thanks to Sources:
Find
More Here:
good blog.keep it up
ReplyDelete