ANDROID-B.C.17-20-SECOND-INTERNAL-MARCH2020
1. Android is a stack of software for mobile devices
that are an operating system, middleware and key Applications. It is a
Linux-based operating system designed for smartphones. It is an open source
operating system.
2. An emulator is
hardware or software that enables one computer system (called the host) to
behave like another computer system.
3. ADT is a plugin for the Eclipse
IDE which provides a suitable environment to develop an android application
where creation, compilation and debugging are possible.
4. The View class is a superclass for all
GUI components in Android. For instance, the TextView class which is
used to display text labels in Android apps is a subclass of View.
The ViewGroup class is a subclass of
the View class. ViewGroup instances work as containers
for View instances to group View instances together
5.
A toggle button allows the user to change a setting between two states. You can
add a basic toggle button to your layout with the ToggleButton object
6.
Android ProgressBar is a graphical view indicator that shows some
progress. Android progress bar displays a bar representing the
completing of the task. Progress bar in android is useful
since it gives the user an idea of time to finish its task.
7.
A toast provides simple feedback about an operation in a small popup. It only
fills the amount of space required for the message and the current activity
remains visible and interactive. Toasts automatically disappear after a
timeout.
8.
Intent is a meassage passing mechanism.
9. Android service is a component that is used to
perform operations on the background such as playing music, handle network
transactions, interacting content providers etc. It doesn't has any UI (user
interface). The service runs in the background indefinitely
even if application is destroyed.
10. Broadcast receiver is an Android component
which allows you to send or receive Android system or
application events. All the registered application are notified by the Android runtime
once event happens. It works similar to the publish-subscribe design pattern
and used for asynchronous inter-process communication
11. SQLite is an open-source relational database i.e.
used to perform database operations on android devices
such as storing, manipulating or retrieving persistent data from the database.
It is embedded in android bydefault. So, there is no need to
perform any database setup or administration task.
12. JSON (JavaScript Object Notation) is a
lightweight data-interchange format. It is easy for humans to read and write.
It is easy for machines to parse and generate.
SectionB
13. open source, Storage, Media Support, Streaming ,
Multitouch, web browser, video calling, multitasking, Accessibility, voice
based features etc.(Expand any five feature)
14.
JVM
|
DVM
|
1.
Support multiple
operating
System
2.
Compiles Java Byte
code
3.
It forms separate
classes in separate .class byte code file
4.
Based on Stack
based
5.
Runs on more
memory
6.
Executable format
is .jar
7.
It has different
constant pools
8.
JVM runs .class
byte code directly.
|
1.
Only support Android
OS
2.
Compiles Dalvik
bytecode
3.
Forms multiple
class in one .dex file
4.
Register based
5.
Less memory
6.
Executable format
is .apk
7.
It has common
constant pool
8.
.class byte codes
are optimized to .odex format before executing in DVM
|
15. layout_width
Layout_height
Layout_marginTop
Layout_marginBottom
Layout_marginLeft etc(explain with example
,any five)
16. Spinner definition+example program
17.
Attribute
|
Description
|
android:id
|
It is used to uniquely
identify the control
|
android:src
|
It is used to specify
the source file of image
|
android:background
|
It is used to set the
background color for an image button control.
|
android:padding
|
It is used to set the
padding from left, right, top and bottom of image button.
|
android:baseline
|
It is used to set
offset of the baseline within the view.
|
18.
Android
Activity Lifecycle is controlled
by 7 methods of android.app.Activity class. The android Activity is the
subclass of ContextThemeWrapper class.
An activity is
the single screen in android. It is like window or frame of Java.
By the help of
activity, you can place all your UI components or widgets in a single screen.
Method
|
Description
|
onCreate
|
called when activity is
first created.
|
onStart
|
called when activity is becoming
visible to the user.
|
onResume
|
called when activity will
start interacting with the user.
|
onPause
|
called when activity is not
visible to the user.
|
onStop
|
called when activity is no
longer visible to the user.
|
onRestart
|
called after your activity
is stopped, prior to start.
|
onDestroy
|
called before the activity
is destroyed.
|
19. Use delete() method
The delete() method expects three parameters databasename,
a where clause and an argument array for the where clause
To delete all records from a table pass null for the where
clause and where clause argument array.
write example
20. SMS Telephony
21. mediaplayer example
22. Linux kernel
At the bottom of the layers is Linux - Linux 3.6 with
approximately 115 patches. This provides a level of abstraction between the
device hardware and it contains all the essential hardware drivers like camera,
keypad, display etc. Also, the kernel handles all the things that Linux is
really good at such as networking and a vast array of device drivers, which
take the pain out of interfacing to peripheral hardware.
Libraries
On top of Linux kernel there is a set of libraries
including open-source Web browser engine WebKit, well known library libc,
SQLite database which is a useful repository for storage and sharing of
application data, libraries to play and record audio and video, SSL libraries
responsible for Internet security etc.
Android Libraries
This category encompasses those Java-based libraries
that are specific to Android development
Android Runtime
This is the third section of the architecture and
available on the second layer from the bottom. This section provides a key
component called Dalvik Virtual Machine which is a kind of
Java Virtual Machine specially designed and optimized for Android.
Application Framework
The Application Framework layer provides many
higher-level services to applications in the form of Java classes. Application
developers are allowed to make use of these services in their applications.
The Android framework includes the following key
services −
- Activity Manager − Controls all aspects of the application lifecycle and
activity stack.
- Content Providers − Allows applications to publish and share data with other
applications.
- Resource Manager − Provides access to non-code embedded resources such as
strings, color settings and user interface layouts.
- Notifications Manager − Allows applications to display alerts and notifications to
the user.
- View System − An extensible set of views used to create application user
interfaces.
Applications
You will find all the Android application at the top
layer. You will write your application to be installed on this layer only.
Examples of such applications are Contacts Books, Browser, Games etc
23.
Android Layout Types
There are number of Layouts provided by
Android which you will use in almost all the Android applications to provide
different view, look and feel.
Sr.No
|
Layout
& Description
|
1
|
LinearLayout is a view group that aligns
all children in a single direction, vertically or horizontally.
|
2
|
RelativeLayout is a view group that
displays child views in relative positions.
|
3
|
TableLayout is a view that groups views
into rows and columns.
|
4
|
AbsoluteLayout enables you to specify
the exact location of its children.
|
5
|
The FrameLayout is a placeholder on
screen that you can use to display a single view.
|
write example programs of any three
24.Create insert and
delete in SQLITE
25.
JSON objects are
surrounded by curly braces {}.
JSON objects are written
in key/value pairs.
Keys must be strings, and
values must be a valid JSON data type (string, number, object, array, boolean
or null).
Keys and values are
separated by a colon.
Each key/value pair is
separated by a comma.
You can access the object
values by using dot (.) notation:
Example
myObj = { "name":"John", "age":30, "car":null };
x = myObj.name;
x = myObj.name;
Arrays in JSON are
almost the same as arrays in JavaScript.
In JSON, array values
must be of type string, number, object, array, boolean or null.
In JavaScript, array
values can be all of the above, plus any other valid JavaScript expression,
including functions, dates, and undefined.
var myObj, x;
myObj = {
"name":"John",
"age":30,
"cars":[ "Ford",
"BMW", "Fiat" ]
};
A common use
of JSON is to exchange data to/from a web server.
When receiving
data from a web server, the data is always a string.
Parse the data
with
JSON.parse()
, and the data
becomes a JavaScript object.
var txt = '{"name":"John", "age":30,
"city":"New York"}'
var obj = JSON.parse(txt);
Comments
Post a Comment