Android Notes
Android Notes
Transport Layer
Wireless Datagram Protocol (WDP).
The WDP allows WAP to be bearer-independent
Motorola DynaTAC 8000X was the first commercially available cell phone.
Motorola DynaTAC 8000X also called The Brick
First-generation mobile phones were just too expensive.
First-generation mobile phones Designed and Developed by the handset manufacturers.
First Generation Manufacturers didnt want to expose the internal workings of their
handsets, so they usually developed the phone software in-house
As a developer, if you werent part of this inner circle, you had no opportunity to write
applications for the phones
The handset manufacturers
o didnt have the motivation / resources to build every application users wanted.
o Needed some way to provide a portal for entertainment and information services
without allowing direct access to the handset.
Hence Internet was selected as Best Option to provide entertainment and information
services
Internet model allows users to choose between freeware, shareware, and paid software.
The Open Handset Alliance (OHA) was formed in November 2007
The OHA is a business alliance comprised of many of the largest and most successful
mobile companies on the planet
OHA members
o chip makers,
o Handset manufacturers
o software developers
o service providers
Andy Rubin has been credited as the father of the Android platform
Andy Rubin company, Android Inc.,was acquired by Google in 2005.
Googles involvement in the Android project has been so extensive that the line between
who takes responsibility for the Android platform (the OHA or Google) has blurred.
Google hosts the Android open source project
Google provides online Android documentation, tools, forums, and the Software
Development Kit (SDK) for developers
Manufacturers: Designing the Android
Android is hailed as the first complete, open, and free mobile platform
o Complete
Secure OS and Rich Application Development Opportunities
o Open
Provided through Open Source Licensing
Provides Unprecedented Access to Handset Features for developing apps
o Free
Application Development is Free. No royalty fees, No Licensing, No
Membership Fees, No certification fees, No testing, No Signing in
The Android mascot is a little green robot.
Androids SDKs are named alphabetically after sweets.
Android is licensed under GNU General Public License Version 2 (GPLv2).
Android framework is distributed under the Apache Software License ASL/Apache2)
Apache Software License (ASL/Apache2), allows distribution of both open- and closed-
source derivations of the source code.
There are no upfront costs to developing Android applications.
Latest Version of Android is ___________________________________________
The Android SDK and tools are freely available.
Eclipse IDE to design and develop Android applications.
Android applications can be developed on operating systems:
o Windows XP (32-bit) or Vista (32-bit or 64-bit)
o Mac OS X 10.5.8 or later (x86 only)
o Linux (tested on Linux Ubuntu 8.04 LTS, Hardy Heron)
Android applications are written in a well-respected programming language: Java.
OpenGL Embedded Systems (OpenGL ES) Library in Android for Graphics
SQLite - Library in Android for Database
All Android applications use the same libraries.
Androids vigorous application security model helps protect the user and the system from
malicious software.
Android Market
Android Platform
It is an Operating System :Used to develop mobile Applications
The handset runs a Linux operating system upon which Android applications are
executed in a secure fashion.
Each Android application runs in its own virtual machine (
Android applications are managed codehence fewer instances of device corruption (also
called bricking the phone, or rendering it useless).
Android Architecture
Android Studio
Installation
So let's launch Android Studio.exe,Make sure before launch Android Studio,
Our Machine should required installed Java JDK. To install Java JDK,take a
references of Android environment setup
Once you launched Android Studio, its time to mention JDK7 path or later
version in android studio installer.
Below the image initiating JDK to android SDK
Need to check the components, which are required to create applications,
below the image has selected Android Studio, Android SDK, Android
Virtual Machine and performance(Intel chip).
Need to specify the location of local machine path for Android studio and
Android SDK, below the image has taken default location of windows 8.1
x64 bit architecture.
Need to specify the ram space for Android emulator by default it would take
512MB of local machine RAM.
At final stage, it would extract SDK packages into our local machine, it
would take a while time to finish the task and would take 2626MB of Hard
disk space.
After done all above steps perfectly, you must get finish button and it gonna
be open android studio project with Welcome to android studio message as
shown below
You can start your application development by calling start a new android
studio project. in a new installation frame should ask Application name,
package information and location of the project.
After entered application name, it going to be called select the form factors
your application runs on, here need to specify Minimum SDK, in our tutorial,
I have declared as API23: Android 6.0(Mashmallow)
The next level of installation should contain selecting the activity to mobile,
it specifies the default layout for Applications
At the final stage it going to be open development tool to write the
application code.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity">
<TextView android:text="@string/hello_world"
android:layout_width="550dp"
android:layout_height="wrap_content" />
</RelativeLayout>
Android Abbreviations
Sr.No Abbreviation Full Form
1. ADB Android Debug Bridge
2. ADC Android Developer Challenge
3. ADT Android Development Tools
4. API Application Programming Interface
5. APIs Application Programming Interfaces
6. ART Android Run Time
7. ASL Apache Software License
8. AVD Android Virtual Device
9. BREW Binary Runtime Environment for Wireless
10. DVM Dalvik Virtual Machine
11. DDMS Dalvik Debug Monitor Server
12. EMS Enhanced Messaging Service
13. GPLv2 General Public License Version 2
14. HAL Hardware Abstraction Layer
15. IDE Integrated Development Environments
16. Java ME Java Micro Edition
17. JDK Java Development Kit
18. JNI Java Native Interface
19. LBS Location Based Services
20. MMS Multimedia Messaging Service
21. NDK Native Development Kit
22. OHA Open Handset Alliance
23. OpenGL Open Graphics Library
24. OpenGL ES OpenGL Embedded Systems
25. RIM Research in Motion
26. SDK Software Development Kit
27. SMS Short Message Service
28. SSL Secure Socket Layer
29. URI. Uniform Resource Identifiers
30. VM Virtual Machine
31. WAP Wireless Application Protocol
32. WML Wireless Markup Language
33. WAE Wireless Application Environment
34. WSP Wireless Session Protocol
35. WTLS Wireless Transport Layer Security
36. TLS Transport Layer Security
Android
11. 11. Android SDK documentation is divided into how many sections?
A.7* B. 5 C.8 D. 4
12. 12. Who holds all rights of any Android software developed by a developer with the SDK
A. Developer* B. Google C. OHA D. Andy Rubi
13. 13What are the layouts available in android?
A. Linear Layout B. Frame Layout C. Table Layout D. Relative Layout
E. ALL*
17. The first commercially available smartphone running the android was by which
company?
A HTC ** B. Samsung C. Motorola D. LG
1) Which of the following is not an Android component (i.e. a point from which the
system can enter your application)?
a. Service b. Activity c. Layout d. Content Provider
2) During an Activity life-cycle, what is the first callback method invoked by the
system?
a. onStop() b. onStart() c. onCreate() d. onRestore()
5. Which file specifies the minimum required Android SDK version your application
supports?
a. main.xml b. R.java c. strings.xml d. AndroidManifest.xml
20. Android is not actually owned by Google. Who owns the Android platform?
A. Oracle Technology B. Dalvik C. Open Handset Alliance D. Google
21. What was the first phone released that ran the Android OS?
A. Google gPhone B. T-Mobile G1 C. Motorola Droid D. HTC Hero
Prepared by
(Rahul K Ghotekar)
25. Android releases since 1.5 has been given nicknames derived how?
A. Adjective and strange animal B. Food
C. Something that starts w/ A -> something that starts w/ B D. American states
27. Which among these are NOT a part of Androids native libraries?
A. Webkit B. Dalvik C. OpenGL D. SQLite
29. What operating system is used as the base of the Android stack?
A. Linux B. Windows C. Java D. XML
31. What is the name of program that converts Java byte code into Dalvik byte code?
A. Android Interpretive Compiler (AIC) B. Dalvik Converter
C. Dex compiler D. Mobile Interpretive Compiler (MIC)
34. The XML file that contains all the text that your application uses.
A. stack.xml B. text.xml C. strings.xml D. string.java
35. What runs in the background and doesnt have any UI components?
A. Intents B. Content Providers C. Services D. Applications
Prepared by
(Rahul K Ghotekar)
1. What is an activity in Android?
Answer : A
4. What is Android?
A. Same as services
B. Background activity
C. Broadcast Receiver
D. Independent dis-patchable unit is called a thread
Answer : D
A. Interface class
B. A class that does not have a name but have functionalities in it
C. Java class
D. Manifest file
Answer : B
A. Chrome
B. Firefox
C. Open-source Webkit
D. Opera
Answer :C
A. Multitasking
B. Bluetooth
C. Video calling
D. All of the above
Answer :D
Answer :D
A. Apple
B. Google
C. Android Inc.
D. Nokia
Answer :C.
Answer :D
Answer :C
Answer :C
A. 4.1
B. 4.2
C. 4.3
D. All of these
Answer: D
A. Windows
B. Linux
C. Macintosh
D. Unix
Answer: B
A. LG Optimus Pad
B. HTC Flyer
C. Samsung Galaxy tab
D. Motorola zoom
Answer: C
Answer: C
A. Andy Rubin
B. Steve Perlman
C. Hugo Barra
D. Eric Schmidt
Answer: A
Answer: D
21. Android was founded in
A. 2005
B. 2008
C. 2007
D. 2003
Answer: D
22. The first commercially available smartphone running the Android was by which company?
A. HTC
B. LG
C. Samsung
D. Motorola
Answer: A
23. Android is the most successful mobile operating system with the highest market share
A. True
B. False
Answer: A
A. Cupcake
B. Gingerbread
C. Lollypop
D. Muffin
Answer: D
26. Android does not make any assumption about devices screen size, resolution or chipset
A. True
B. False
Answer: A
A. GNUs GPs
B. Apache/MIT
C. OSS
D. Sourceforge
Answer: B
A. Google
B. Dalvic
D. Oracle technologies
Answer: C
29. What was the first phone release with the Android Operatingb system?
A. Google gphone
B. Motorola droid
C. T-Mobile G1
D. HTC Hero
Answer: C
A. 2003
B. 2005
C. 2008
D. 2007
Answer: D
B. False
Answer: A
32. Android releases since 1.5 have been given names derived after?
A. Sweets/food
B. American states
C. Strange animal
D. None of these
Answer: A
A. Webkit
B. Dalvik
C. sqlite
D. OpenGL
Answer: B
A. Portability
B. Security
C. Networking
D. All of these
Answer: D
A. Linux
B. Windows
C. Java
C. XML
Answer: A
36. If you want share the data accross the all applications ,you should go for?
A. Shared Preferences
B. Internal Storage
C. SQLite Databases
D. content provider
Answer: D
A. OHA
B. HTC
C. Google
D. Microsoft
Answer: C
38. Under Android SDK License agreement , Android grants you permission to use Google brands, logos,
or trade names
A. True
B. False
Answer: B
39. Google may change the Android SDK anytime, without notice, without regard to backward
compatibility.
A. True
B. False
Answer: A
40. Who holds all rights of any Android software developed by a developer with the SDK
A. Developer
B. Google
C. OHA
D. Andy Rubin
Answer: A
41. Any harm that comes from developing with the Android SDK is Googles fault.
A. True
B. False
Answer: B
A.7
B. 5
C.8
D. 4
Answer: A
43. Among the following mentioned tabs, which is not the tab related to Android Documentation?
A. SDK tab
B. Home tab
C. Audio tab
D. Videos tab
Answer: C
A. WML
B. HTML
C.XML
D. None of the above
Answer: B
47.If you want share the data accross the all applications ,you should go for?
A. Shared Preferences
B. Internal Storage
C. SQLite Databases
D. content provider
Answer:D
48. To create an emulator you need a AVD, What does AVD stand for
50. There can be only one activity running at any given time
A. True
B. False
Answer: A
50. There can be only one activity running at any given time
A. True
B. False
Answer: A
Answer: B
52) During an Activity life-cycle, what is the first callback method invoked by the system?
a. onStop() b. onStart() c. onCreate() d. onResume()
Answer: C
53) Which configuration file holds the permission to use the internet?
A. Layout file B. Property file C. Java source file D. Manifest file
Answer: D
Answer: C
55). What Eclipse plugin is required to develop Android application?
a. J2EE b. Android Software Development Kit
c. Android Development Tools d. Web Development Tools
Answer: C
58) Which is not a lifecycle callback related to the activity life cycle ?
59) To navigate transitions between stages of the activity lifecycle,how many callbacks are
provided by the Activity class
A. 5 B. 6 C. 8 D. 7
Answer:6
60. Which Activity callback in the the Activity lifecycle of Android makes the activity visible to
the user
A. onStart() B. onResume() C.onPause() D. onCreate()
Answer: A
61. . Which Activity callback in the the Activity lifecycle of Android the user starts interacting
with the application.
A. onResume() B.onRestore() C.onstart() D.onCreate()
Answer: A
67. For the development of Android applications the software required is__________
A. JDK B. Java IDE C. Android SDK D. All of the above
Answer: D
68. The Android development tools are integrated into the Eclipse IDE
A. False B. True
Answer: B
70. By default your device is enabled to install Android applications other than available from
Android market.
A. True B. False
Answer: B
71. The development settings that should be enabled on the Android device to develop
applications
A. USB Debugging B. Stay Awake C. Allow Mock Location D. All of the above
Answer: D
72. With the up gradation of Android SDK which notes are released by Google?
A. An overview of changes
B. An API Diff Report
C. Release Notes
D. All of the above
Answer: D
74. Under the Android License Agreement user can make derivative works from SDK .
A. True B. False
Answer: B
75. Once the contract is done between the developer and Google, you can distribute the SDK on
any device
A. True B. False
Answer: B
76. Which section in Android SDK documentation provides information about best practices for
Android application design and development?
A. Home tab B. Dev Guide tab C. SDK tab D. Resources tab
Answer: B.
77. The access to Android technical articles is provided under Which section in Android SDK
documentation
A. SDK tab B. Reference tab C. Resources tab D. None of the above
Answer: C
81. The client Server tool used to enable developers to debug Android code on the emulator is
A. Dalvik Debug Monitor Server
B. Android Debug Bridge
C. Android Emulator
D. Android SDK and AVD Manager
Answer: B