3. Android overviewAndroid overview
It is an open source Linux-
based OS for handheld devices.
Main objective was for digital
camera.
Andy Rubin & co-member
developed Android in 2004 as
Android Inc.
Andy Rubin
4. July 2005-Google acquired Android Inc.
Sep 2008-version, Android 1.0 was released.
HTC Dream: first phone in which android was installed and used.
5. Android SDK overviewAndroid SDK overview
For the development of app an IDE is given: Android Studio,
Eclipse(SDK).
SDK consist of class library, android debug tool, emulator etc.
Emulator: is a virtual device used for testing our app which is also
called AVD(Android virtual Device).
testing .apk
IDE AVD
Devi
ce
6. Android apps are developed usually in java language using SDK.
And till now various versions of android was launched which works on
different API levels.
API: is an integer value; uniquely identifies the framework api revision
offered by android platform.
8. Android.widget packageAndroid.widget package
Added in API level 1
Contains UI elements to use on our screen/ Activity.
Contains the basics controls(textview,button,textfields).
It is the child of view group which is the parent of all the layouts.
ViewGroup
View View
ViewView View
ViewGroup
11. Intent (android.content)Intent (android.content)
It is an abstract description of an operation to be performed.
(starting a new activity, starting a service etc).
Syntax:
Intent i=new Intent(source, destinationClass);
startActivity(i);
(Intent)
Activity 1 Activity 2
12. MultimediaMultimedia
All the tasks like playing music, video, audio recording etc comes
under the category of android multimedia.
All the multimedia file are to be put in a folder named as “raw” &
image in drawable folder.
There are lots of predefined classes are given in android to access
various media operations(MediaPlayer, VideoView, MediaController
etc).
Eg. playing a song
13. Activity life cycleActivity life cycle
There are certain call back methods which are responsible for handling
the whole life cycle of any activity.
onCreate()
onStart()
onResume()
onPause()
onRestart()
onStop()
onDestroy()
15. Android Services(android.app.Service)Android Services(android.app.Service)
A service is an component that can perform long-running process in
the background and it does not provide any UI.
There are two types of services:
1.Started service: a service is “stared” when an application component
starts it by calling startServices().
Once it started, run in the background infinitely.
2.Bound service: a service is “bound” by calling bindService().
Used on the client server.
17. AndroidAndroid
Notification(android.app.Notification)Notification(android.app.Notification)
It is a message that we can
display to the user outside of the
application.
User can navigate the
notification by opening
notification drawer.
There are some predefined
classes for achieving
notification:
1.NotificationManager
//manages all the notification in
the app
2.Notification //helps in
building notification.
Methods:
1.setsmallIcon(“path”);
2.setTicker(“new msg rcvd”);
3.setContentTitle(“ab@gml”);
4.setContextText(“hello”);
19. Database(android.database.SQLite)Database(android.database.SQLite)
All the database query are done in hard coded in android.
There are two types of query:
1. Updation type (execSQL() )
2. selection type (rawQuery() )
Ex:
db.execSQL(“create table student(name varchar(10),…..)”);
db. rawQuery(“select * from student here name=“Rajeev” ”);