Vous êtes sur la page 1sur 55

Android Interview Question And Answer Latest For fresher

1)How do you declare 4 components of android in mainfestfile? <activity> <service> <receiver> <provider> 2)What are intent filters? Intents filter are used to register activity, services, broadcast receiver as being capable of performing an action on a particular kind of action 3)How many ways data stored in android? !hared preferences Internal storage "#ternal storage !$lite database %etwork connetion 4)User interface types? &iews %otifications 5)Types of notification in android? 'ost notification !tatus bar notification (ialog notification 6)How do you find any iew element into your pro!ram? Findviewbyid ")What is handler class do in android? )andler allows yo to send and process message and runnable ob*ects associated with a thread+s message $ueue

8)Describe the APK format. The APK file is compressed the AndroidManifest.xml file, application code (.dex files), resource files, and other files. A project is compiled into a single .apk file. 9)What is an action? The Intent ender desires something or doing some task 10)What is activity? A single screen in an application, !ith supporting "a#a code. 11)What is intent in Android? A class (Intent) !ill descri$es !hat a caller desires to do. The caller !ill send this intent to Android%s intent resol#er, !hich finds the most suita$le acti#it& for the intent. '.g. opening a P() document is an intent, and the Ado$e *eader apps !ill $e the perfect acti#it& for that intent(class).

12)What is a Stic y !ntent? send tick&+roadcast() performs a send+roadcast (Intent) kno!n as stick&, i.e. the Intent &ou are sending sta&s around after the $roadcast is complete, so that others can ,uickl& retrie#e that data through the return #alue of register*ecei#er (+roadcast*ecei#er, Intent)ilter). In all other !a&s, this $eha#es the same as send+roadcast(Intent). 1")#$am%&e for stic y broadcast -hen &ou call register*ecei#er() for that action .. e#en !ith a null +roadcast*ecei#er .. &ou get the Intent that !as last $roadcast for that action. /ence, &ou can use this to find the state of the $atter& !ithout necessaril& registering for all future state changes in the $atter&. 1')(o) the nine*%atch !ma+e different from a re+,&ar bitma%? or Different bet)een nine* %atch !ma+e vs re+,&ar -itma% !ma+e It is one of a resi0a$le $itmap resource !hich is $eing used as $ackgrounds or other images on the de#ice. The 1inePatch class allo!s dra!ing a $itmap in nine sections. The four corners are unscaled2 the middle of the image is scaled in $oth axes, the four edges are scaled into one axis. 1.)What Pro+rammin+ &an+,a+es does Android s,%%ort for a%%&ication deve&o%ment? Android applications supports using "a#a Programming 3anguage. !hich is coded in "a#a and complied using Android (K. 1/)What is a reso,rce? A user defined " 41, 5M3, $itmap, or other file, injected into the application $uild process, !hich can later $e loaded from code. 10)(o) )i&& yo, record a %hone ca&& in Android? or (o) to hand&e on A,dio Stream for a ca&& in Android? Permissions.P*46' 748T94I1976A33 : -ill Allo!s an application to monitor, modif&, or a$ort outgoing calls. o through that !e can monitor the Phone calls. 18)What1s the difference bet)een c&ass2 fi&e and activity in android? 6lass . The 6lass file is complied from .ja#a file. Android !ill use this .class file to produce the executa$le apk. )ile . It is a $lock of resources, sr$itrar& information. It can $e an& file t&pe. Acti#it& . An acti#it& is the e,ui#alent of a )rame;-indo! in 98I toolkits. It is not a file or a file t&pe it is just a class that can $e extended in Android for loading 8I elements on #ie!. 19)Does Android s,%%ort the -&,etooth seria& %ort %rofi&e? A. <es. =>)3an an a%%&ication be started on %o)er,%? A. <es. 21)What is APK format. The APK file is compressed AndroidManifest.xml file !ith extension .apk, -hich ha#e application code (.dex files), resource files, and other files !hich is compressed into single .apk file. 22)(o) to 4rans&ate in android The 9oogle translator translates the data of one language into another language $& using 5MPP to transmit data. <ou can t&pe the message in 'nglish and select the language !hich is understood $&

the citi0ens of the countr& in order to reach the message to the citi0ens. 2")What is an action? A description of something that an Intent sender desires. 2')What are the advanta+es of Android? The follo!ing are the ad#antages of Android: ? The customer !ill $e $enefited from !ide range of mo$ile applications to choose, since the monopol& of !ireless carriers like 4range and AT@T !ill $e $roken $& 9oogle Android. ? )eatures like !eather details, li#e * feeds, opening screen, icon on the opening screen can $e customi0ed ? Inno#ati#e products like the location.a!are ser#ices, location of a near$& con#enience store etc., are some of the additi#e facilities in Android.

Q. What is android?
Android is a stack of software for mobile devices which has ,perating !ystem, middleware and some key applications 'he application e#ecutes within its own process and its own instance of (alvik &irtual -achine -any &irtual -achines run efficiently by a (&- device (&- e#ecutes .ava language byte code which later transforms into de# format files Android gives you a world/class platform for creating apps and games for Android users everywhere, as well as an open marketplace for distributing to them instantly Q 0hat are the key components of Android Architecture1 -ainly Android Architecture have 2 key components3

Linu# 4ernel Libraries Android Framework Android Applications

#$ What are the ad anta!es of %ndroid?

-ultitasking 5 6ups, Android phones can run many applications, it means you can browse, Facebook

while listened to the song

"ase of %otification 5 Any !-!, "mail, or even the latest articles from an 7!! 7eader, there will
always be a notification on the )ome !creen Android phone, do not miss the L"( indicator is blinking, so you will not miss a single !-!, "mail or even -isscall

"asy access to thousands of applications via the 8oogle Android Android App -arket 5 0hen you
love to install applications or games, through 8oogle+s Android App -arket, Agan can download applications for free 'here are many thousands of applications and games that are ready for download on Android phones 6ou

9hone options are diverse 5 'alk Android phone, it will feel :different+ than the I,!, if the I,! is limited
to the i9hone from Apple, then Android is available on mobile phones from various manufacturers, from !ony "ricsson, -otorola, )'; to !amsung And each handset manufacturer also presents an Android phone in the style of each, such as -otorola with its -otoblur, !ony "ricsson with its 'imescape !o 6ou can freely choose the Android phone in accordance with the :brand+ favorite

;an install a modified 7,- 5 not satisfied with the standard view of Android, do not worry there are
many custom 7,- that can be used in your mobile phones Android

0idget 5 absolutely right, with the widgets on the homescreen, 6ou can easily access a variety of
settings $uickly and easily

8oogle -aniac 5 If you are a loyal user of 8oogle services ranging from 8mail to 8oogle 7eader
Android phone has integrated with 8oogle services, so you can $uickly check e/mail from 8mail / !ee more at3 http3<<mobilecon info<advantages/and/disadvantages/android/mobile/ phone html=sthash (8v44r>; dpuf

-ultitasking 5 6ups, Android phones can run many applications, it means you can browse, Facebook
while listened to the song

"ase of %otification 5 Any !-!, "mail, or even the latest articles from an 7!! 7eader, there will
always be a notification on the )ome !creen Android phone, do not miss the L"( indicator is blinking, so you will not miss a single !-!, "mail or even -isscall

"asy access to thousands of applications via the 8oogle Android Android App -arket 5 0hen you
love to install applications or games, through 8oogle+s Android App -arket, Agan can download applications for free 'here are many thousands of applications and games that are ready for download on Android phones 6ou

9hone options are diverse 5 'alk Android phone, it will feel :different+ than the I,!, if the I,! is limited
to the i9hone from Apple, then Android is available on mobile phones from various manufacturers, from !ony "ricsson, -otorola, )'; to !amsung And each handset manufacturer also presents an Android phone in the style of each, such as -otorola with its -otoblur, !ony "ricsson with its 'imescape !o 6ou can freely choose the Android phone in accordance with the :brand+ favorite

;an install a modified 7,- 5 not satisfied with the standard view of Android, do not worry there are
many custom 7,- that can be used in your mobile phones Android

0idget 5 absolutely right, with the widgets on the homescreen, 6ou can easily access a variety of
settings $uickly and easily

8oogle -aniac 5 If you are a loyal user of 8oogle services ranging from 8mail to 8oogle 7eader
Android phone has integrated with 8oogle services, so you can $uickly check e/mail from 8mail / !ee more at3 http3<<mobilecon info<advantages/and/disadvantages/android/mobile/ phone html=sthash (8v44r>; dpuf

Android phones can run man& applications, it means &ou can $ro!se, )ace$ook !hile listened to the song. . ee more at: http:;;mo$ilecon.info;ad#antages.and.disad#antages.android.mo$ile. phone.htmlAsthash.(9#KKr86.dpuf
-ultitasking3 0ith Android, you can $uickly and seamlessly switch between apps and pick up whatever you

were doing .uggling multiple tasks at once on a mobile device has never been easier It have simple and powerful !(4 Also allows multitasking Licensing, (istribution or (evelopment fee is not re$uired "asy to Import third party .ava library !upporting platforms are 5 Linu#, -ac ,s, 0indows Innovative products like the location/aware services, location of a nearby convenience store etc , are some of the additive facilities in Android ;omponents can be reused and replaced by the application framework ,ptimi?ed (&- for mobile devices !QLite enables to store the data in a structured manner !upports 8!- telephone and @luetooth, 0iFi, A8 and "(8" technologies 'he development is a combination of a device emulator, debugging tools, memory profiling and plug/in for "clipse I(" 'he customer will be benefited from wide range of mobile applications to choose, since the monopoly of wireless carriers like A'B' and ,range will be broken by 8oogle Android 'hereCs no other software $uite like Android 8oogle engineered Android, and 8oogle+s own apps run best on it And with millions of apps, games, songs, and videos on 8oogle 9lay, Android is great for fun, and for getting things done

Multitasking B <ups, Android phones can run man& applications, it means &ou can $ro!se, )ace$ook !hile listened to the song. . ee more at: http:;;mo$ilecon.info;ad#antages.and. disad#antages.android.mo$ile.phone.htmlAsthash.(9#KKr86.dpuf
C. -hat is the disadvantages of Android1

Given that Android is an open-source platform, and the fact that different Android operating systems have been released on different mobile devices, theres no clear cut policy to how applications can adapt with various O versions and upgrades. One app that runs on this particular version of Android O may or may not run on another version. Another disadvantage is that since mobile devices such as phones and tabs come in different si!es and forms, it poses a challenge for developers to create apps that can ad"ust correctly to the right screen si!e and other varying features and specs.
Q 0hat is activity1 An activity is a single, focused thing that the user can do Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your >I

#$ What are the e&ceptions in %ndroid?


#nflate$%ception & 'his e%ception is thrown by an inflater on error conditions. urface.OutOf(esource$%ception& When a surface is not created or re-si!ed, this e%ception is thrown. urface)older.*ad urface'ype$%ception& 'his e%ception is thrown from the loc+,anvas-. method, when invo+ed on a urface whose is /(0A,$1'23$13/ )1*/00$( Window4anager.*ad'o+en$%ception& 'his e%ception is thrown at the time of trying to add view an invalid Window4anager.5ayout3aramsto+en.

Q 0hat are the different methods of the Activity life cycle1 )ere are !even main methods3 void on;reateDE void on!tartDE void on7estartDE void on7esumeDE void on9auseDE void on!topDE void on(estroyDE

#$ (oes Android support the @luetooth serial port profile1 6es Q 0hat dialog bo#es are supported in android1 Android supports 2 dialog bo#es3 Alert(ialog3 An alert dialog bo# supports F to A buttons and a list of !electable elements, including check bo#es and radio buttons Among the other dialog bo#es, the most suggested dialog bo# is the alert dialog bo# 9rogress(ialog3 'his dialog bo# displays a progress wheel or a progress bar It is an e#tension of Alert(ialog and supports adding buttons (ate9icker(ialog3 'his dialog bo# is used for selecting a date by the user 'ime9icker(ialog3 'his dialog bo# is used for selecting time by the user Q 0hat is the A94 format1 'he A94 file is compressed the Android-anifest #ml file, application code D de# filesE, resource files, and other files A pro*ect is compiled into a single apk file #$ What is $ap' e&tension? 'he e#tension for an Android package file, which typically contains all of the files related to a single Android application 'he file itself is a compressed collection of an Android-anifest #ml file, application code D de# filesE, resource files, and other files A pro*ect is compiled into a single apk file #$ 0hat is de# e#tension1 Android programs are compiled into de# D(alvik "#ecutableE files, which are in turn ?ipped into a single apk file on the device de# files can be created by automatically translating compiled applications written in the .ava programming language

$%plain the Architecture of Android ?

Q 0hat is a service1 A !ervice is an application component representing either an applicationCs desire to perform a longer/running operation while not interacting with the user or to supply functionality for other applications to use "ach service class must have a corresponding <Service>declaration in its packageCs Android-anifest #ml !ervices can be started with Context.startService()and Context.bindService(). (or e&ample) a service might play background music as the user attends to other matters, or it might fetch data over the network or calculate something and provide the result to activities that need it "ach service e#tends the !ervice base class Q (escribe a

real time scenario where android can be used?

5ets ta+e a situation that you are in a country where no one understands the language you spea+ and you can not read or write. )owever, you have mobile phone with you.With a mobile phone with android, the Google translator translates the data of one language into another language by using 6433 to transmit data. 2ou can type the message in $nglish and select the language which is understood by the citi!ens of the country in order to reach the message to the citi!ens. #$ 0hat is intent1 An intent is an abstract description of an operation to be performed It can be used with startActivity to launch anActivity, broadcastIntent to send it to any interested BroadcastReceiver components,

and startSerrvice to communicate with a background Service An Intent provides a facility for performing late run time binding between the code in different applications Its most significant use is in the launching of activities, where it can be thought of as the glue between activities It is basically a passive data structure holding an abstract description of an action to be performed Q 0hat is an Implicit Intent1 In an implicit intent, the main power of the android design, we *ust declare an intent and leave it to the platform to find an activity that can respond to the intent )ere, we do not declare the target component and hence is typically used for activating components of other applications seamlessly Q 0hat is an "#plicit Intent1 In an e#plicit intent, we actually specify the activity that is re$uired to respond to the intent In other words, we e#plicitly designate the target component 'his is typically used for application internal messages Q 0hat+s the difference between file, class and activity in android1 (ile 5 It is a block of arbitrary information, or resource for storing information It can be of any type *lass 5 Its a compiled form of .ava file Android finally used this class files to produce an e#ecutable apk %cti ity 5 An activity is the e$uivalent of a Frame<0indow in 8>I toolkits It is not a file or a file type it is *ust a class that can be e#tended in Android for loading >I elements on view

#+ 0hat is an Android -anifest file1 "very application must have an Android-anifest #ml file Dwith precisely that nameE in its root directory 'he manifest presents essential information about the application to the Android system, information the system must have before it can run any of the applicationCs code Among other things, the manifest does the following3 It names the .ava package for the application 'he package name serves as a uni$ue identifier for the application It describes the components of the application G the activities, services, broadcast receivers, and content providers that the application is composed of It names the classes that implement each of the components and publishes their capabilities Dfor e#ample, which Intent messages they can handleE 'hese declarations let the Android system know what the components are and under what conditions they can be launched It determines which processes will host application components It declares which permissions the application must have in order to access protected parts of the A9I and interact with other applications It also declares the permissions that others are re$uired to have in order to interact with the applicationCs components It lists the Instrumentation classes that provide profiling and other information as the application is running 'hese declarations are present in the manifest only while the application is being developed and testedH theyCre removed before the application is published It declares the minimum level of the Android A9I that the application re$uires It lists the libraries that the application must be linked against

Q 0hat language does Android support for application development1 Android applications are written using the .ava programming language

#$ )ow

to (emove 7es+top icons and Widgets?

9ress and )old the icon or widget 'he phone will vibrate and on the bottom of the phone you will see an option to remove 0hile still holding the icon or widget drag it to the remove button ,nce remove turns red drop the item and it is gone #$ What is the 8uardian app for Android1 'he 8uardian app for Android delivers all the best content from guardian co uk to your phone or tablet 7ead the latest news, sport, comment and reviews, watch video, listen to broadcast and browse stunning picture galleries while on the move Q 0hat is -ono for Android1 -ono for Android is a software development kit that allows developers to use the ;= language to create mobile applications for Android based devices -ono for Android e#poses two sets of A9Is, the core %"' A9Is that ;= developers are familiar with as well as a ;= binding to AndroidCs native A9Is e#posed through the -ono Android I namespace 6ou can use -ono for Android to develop applications that are distributed through the Android Application !tores or to deploy software to your personal hardware or the Android simulator Q 0hat is included in -ono for Android1 -ono for Android consists of the core -ono runtime, the -ono for Android bindings to the native Android A9Is, a &isual !tudio JFKF plugin to develop Android applications and an !(4 that contains the tools to build, debug and deploy your applications ,ur &isual !tudio JFKF plugin allows developers to use &isual !tudio JFKF to develop, debug and deploy their applications to an Android simulator, an Android device, or the Android Application !tore

#$ 0hat do I need to develop -ono for Android applications1 -ono for Android on 0indows provides a plugin for &isual!tudio JFKF 9rofessional or better 0e also support -ono for Android development using -ono(evelop on 0indows for users that do not own a copy of &isual !tudio JFKF 9rofessional or better -ono for Android on -ac developers can use -ono(evelop ,n all platforms, -ono for Android re$uires the Android !(4 Dwhich re$uires .ava .(4E

#$ %re the %ndroid releases a aila,le in a -./?


%o, Android is not yet available in a 7,- format ;urrently Android is installed by using a clean !( ;ard,and booted from there It is booted by running a special application called C)aret e#eC residing on your !( ;ard which will terminate the 0indows kernel and boot into Linu#<Android It canCt easily be run from 7,because3 DaE itCs too e#perimental to risk putting in 7,- and then killing a device DbE 0in-o does some hardware initiali?ation that isnCt documented, but is needed before Android can run

C. /o! do I turn off, or re$oot AndroidD


In earlier releases, &ou had to pull the $atter& or press the reset $utton, in ne!er releases, &ou can hold do!n the %end call%

$utton and see a menu. C. -hat is context in androidD Interface to glo$al information a$out an application en#ironment. This is an a$stract class !hose implementation is pro#ided $& the Android s&stem. It allo!s access to application.specific resources and classes, as !ell as up.calls for application.le#el operations such as launching acti#ities, $roadcasting and recei#ing intents, etc. C. -hat is 1otification in androidD A class that represents ho! a persistent notification is to $e presented to the user using the NotificationMana er. TheNotification.Bui!der has $een added to make it easier to construct 1otifications. 8. What is

AsyncTask in android?

Async'as+ enables proper and easy use of the /# thread. 'his class allows to perform bac+ground operations and publish results on the /# thread without having to manipulate threads and9or handlers.An asynchronous tas+ is defined by a computation that runs on a bac+ground thread and whose result is published on the /# thread. An asynchronous tas+ is defined by : generic types, called 3arams, 3rogress and (esult, and ; steps, called on3re$%ecute,do#n*ac+ground, on3rogress/pdate and on3ost$%ecute. 8. 7oes android support "ar applications? <ou can%t install jar files on Andriod de#ices $ut &ou can include jar as li$rar& in &our application.

#$ What is locali0ation and how to achie e?


Locali?ation is a way of representing the products in different languages Android is an operating system which runs in many regions, so to reach different users locali?ation is a must Locali?ation in Android can be achieved by incorporating different languages in the application which you are using 'o do this knowledge of .ava, L-L elements, Activity lifecycle and general principles of internationali?ation and locali?ation are re$uired

#$ What are the different 1tora!e /ethods in android?


Android provides many options for storage of persistent data It provides the solution according to your need 'he storageCs which have been provided in Android are as follows3/

!hared 9references3 !tore private primitive data in key/value pairs Internal !torage3 !tore private data on the device memory "#ternal !torage3 !tore public data on the shared e#ternal storage !QLite (atabases3 !tore structured data in a private database %etwork ;onnection3 !tore data on the web with your own network server

Q 0hat is activity life cyle in android1

Activities in the system are managed as an activity stack. When a new activity is started, it is placed on the top of the stac+ and becomes the running activity -- the previous activity always remains below it in the stac+, and will not come to the foreground again until the new activity e%its.An activity has essentially four states& #f an activity in the foreground of the screen -at the top of the stac+., it is active or running. #f an activity has lost focus but is still visible -that is, a new non-full-si!ed or transparent activity has focus on top of your activity., it is paused. A paused activity is completely alive -it maintains all state and member information and remains attached to the window manager., but can be +illed by the system in e%treme low memory situations. #f an activity is completely obscured by another activity, it is stopped. #t still retains all state and member information, however, it is no longer visible to the user so its window is hidden and it will often be +illed by the system when memory is needed elsewhere. #f an activity is paused or stopped, the system can drop the activity from memory by either as+ing it to finish, or simply +illing its process. When it is displayed again to the user, it must be completely restarted and restored to its previous state. 'he following diagram shows the important state of an Activity.

C. -hat is 4rientationD 4rientation, !hich can $e set using set4rientation(), dictates if the 3inear3a&out is represented as a ro! or as a column. Ealues are set as either /4*IF41TA3 or E'*TI6A3.

8. -hat is the importance of 5M3.$ased la&outsD 'he use of L-L/based layouts provides a consistent and somewhat standard means of setting 8>I definition format In common practice, layout details are placed in L-L files while other items are placed in source files

Q 0hat is a 'oast %otification1 A toast notification is a message that pops up on the surface of the window It only fills the amount of space re$uired for the message and the userCs current activity remains visible and interactive 'he notification automatically fades in and out, and does not accept interaction events Q 0hat is a ;ontent 9rovider1 ;ontent 9roviders are the only way to share data across Android applications 'hey store and retrieve data thus making it accessible to all ;ontent 9roviders give a uniform interface to access the data Android platform provides default implementations of content providers for data types like audio, video, images, contact information etc ;ontent providers manage access to a structured set of data 'hey encapsulate the data, and provide mechanisms for defining data security ;ontent providers are the standard interface that connects data in one process with code running in another process Q 0hat is the ,pen )andset Alliance1 'he ,)A is a consortium of M2 technology and mobile companies that have *oined hands to accelerate innovation in mobile technology and at the same time offer the end users a better, cost/effective and richer mobile e#perience -embers of this include 8oogle, )';, !ony, (ell, Intel, -otorola, Qualcomm, 'e#as Instruments, !amsung, L8, '/-obile, %vidia 'he ,)A was started on N %ovember JFFO by 8oogle and A2 other companies Android is the main software of the alliance Q 0hat is the difference between !ervice and 'hread1 !ervice is like an Activity but has no interface 9robably if you want to fetch the weather for e#ample you wonCt create a blank activity for it, for this you will use a !ervice It is also known as @ackground !ervice because it performs tasks in background A 'hread is a concurrent unit of e#ecution 6ou need to know that you cannot update >I from a 'hread 6ou need to use a )andler for this Q 0hat is A%71 A%7 is stand for Application %ot 7esponding 'his is actually a dialog that appears to the user whenever an application have been unresponsive for a long period of time 1ee %2- ms!+

Q 0hat is adb1 Android (ebug @ridge DadbE is a versatile command line tool that lets you communicate with an emulator instance or connected Android/powered device It is a client/server program that includes three components3

A client, which runs on your development machine 6ou can invoke a client from a shell by issuing an adb command ,ther Android tools such as the A(' plugin and ((-! also create adb clients A server, which runs as a background process on your development machine 'he server manages communication between the client and the adb daemon running on an emulator or device A daemon, which runs as a background process on each emulator or device instance 6ou can find the adb tool in <sdk><platform/tools< Q 0hat is the importance of settings permissions in app development1 9ermissions allow certain restrictions to be imposed primarily to protect data and code 0ithout these, codes could be compromised, resulting to defects in functionality Additional finer/grained security features are provided through a PpermissionP mechanism that enforces restrictions on the specific operations that a particular process can perform, and per/>7I permissions for granting ad/hoc access to specific pieces of data Q 0hat is the proper way of setting up an Android/powered device for app development1 'he following are steps to be followed prior to actual application development in an Android/powered device3 (eclare your application as Qdebug/gableR in your Android -anifest 'urn on Q>!@ (ebuggingR on your device !et up your system to detect your device Q 0hat is a Fragment1 A "ra ment represents a behavior or a portion of user interface in an Activity 6ou can combine multiple fragments in a single activity to build a multi/pane >I and reuse a fragment in multiple activities 6ou can think of a fragment as a modular section of an activity, which has its own lifecycle, receives its own input events, and which you can add or remove while the activity is running Dsort of like a Psub activityP that you can reuse in different activitiesE A fragment must always be embedded in an activity and the fragmentCs lifecycle is directly affected by the host activityCs lifecycle For e#ample, when the activity is paused, so are all fragments in it, and when the activity is destroyed, so are all fragments Q (o all mobile phones support the latest Android operating system1 !ome Android/powered phone allows you to upgrade to the higher Android operating system version )owever, 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 Q Is it possible to use or add a fragment without using a user interface1 3es, it is possible to do that, such as when you want to create a background behavior for a particular activity 6ou can do this by using addDFragment, stringE method to add a fragment from the activity

Q 0hat is (alvik &irtual -achine1 'he name of AndroidCs virtual machine 'he (alvik &- is an interpreter/only virtual machine that e#ecutes files in the (alvik "#ecutable D de#E format, a format that is optimi?ed for efficient storage and memory/mappable

e#ecution 'he virtual machine is register/based, and it can run classes compiled by a .ava language compiler that have been transformed into its native format using the included Pd#P tool 'he &- runs on top of 9osi#/ compliant operating systems, which it relies on for underlying functionality Dsuch as threading and low level memory managementE 'he (alvik core class library is intended to provide a familiar development base for those used to programming with .ava !tandard "dition, but it is geared specifically to the needs of a small mobile device

Q 0hat is Android 7untime1 Android includes a set of core libraries that provides most of the functionality available in the core libraries of the .ava programming language "very Android application runs in its own process, with its own instance of the (alvik virtual machine (alvik has been written so that a device can run multiple &-s efficiently 'he (alvik &e#ecutes files in the (alvik "#ecutable D de#E format which is optimi?ed for minimal memory footprint 'he &- is register/based, and runs classes compiled by a .ava language compiler that have been transformed into the de# format by the included Pd#P tool Q 0hat does A(' stand for1 A(' stands for %ndroid 4e elopment Tools 'he Android !(4 includes several tools and utilities to help you create, test, and debug your pro*ects Q 0hat is A&( in Android1 An Android &irtual (evice DA&(E is an emulator configuration that lets you model an actual device by defining hardware and software options to be emulated by the Android "mulator 6ou can create as many A&(s as you need, based on the types of device you want to model 'o thoroughly test your application, you should create an A&( for each general device configuration Dfor e#ample, different screen si?es and platform versionsE with which your application is compatible and test your application on each one %n %54 consists of+ A hardware profile3 (efines the hardware features of the virtual device For e#ample, you can define whether the device has a camera, whether it uses a physical Q0"7'6 keyboard or a dialing pad, how much memory it has, and so on A mapping to a system image3 6ou can define what version of the Android platform will run on the virtual device 6ou can choose a version of the standard Android platform or the system image packaged with an !(4 add/on ,ther options3 6ou can specify the emulator skin you want to use with the A&(, which lets you control the screen dimensions, appearance, and so on 6ou can also specify the emulated !( card to use with the A&( A dedicated storage area on your development machine3 the deviceCs user data Dinstalled applications, settings, and so onE and emulated !( card are stored in this area Q 0hat is AI(L1 AI(L DAndroid Interface (efinition LanguageE is similar to other I(Ls you might have worked with It allows you to define the programming interface that both the client and service agree upon in order to communicate with each other using inter/process communication DI9;E ,n Android, one process cannot normally access the memory of another process !o to talk, they need to decompose their ob*ects into primitives that the operating system can understand, and -arshall the ob*ects across that boundary for you 'he code to do that marshaling is tedious to write, so Android handles it for you with AI(L

Q 0hat data types are supported by AI(L1 AI(L supports following data types3 string List -ap char!e$uence

All primitive types in the .ava programming language Dsuch as int, long, char, boolean, and so onE

Q 0hat is the difference between Activities from ervices? An activity is a single, focused thing that the user can do. Almost all activities interact with the user, so the Activity class ta+es care of creating a window for you in which you can place your /#. *ut A ervice is an application component representing either an application<s desire to perform a longer-running operation while not interacting with the user or to supply functionality for other applications to use. Activities can be closed, or terminated anytime the user wishes. On the other hand, services are designed to run behind the scenes, and can act independently. 4ost services run continuously, regardless of whether there are certain or no activities being e%ecuted.

Q What is the importance of Android in the mobile mar+et? 7evelopers can write and register apps that will specifically run under the Android environment. 'his means that every mobile device that is Android enabled will be able to support and run these apps. With the growing popularity of Android mobile devices, developers can ta+e advantage of this trend by creating and uploading their apps on the Android 4ar+et for distribution to anyone who wants to download it.

Android interview $uestions and answers1


6ntroduction %ndroid+ Android is an operating system for mobile devices that includes middleware and key applications, and uses a modified version of the Linu# kernel It was initially developed by Android Inc It allows developers to write managed code in the .ava language, controlling the device via 8oogle/developed .ava libraries 'he Android !(4 includes a comprehensive set of development tools 'hese include a debugger, libraries, a handset emulator Dbased on Q"->E, documentation, sample code, and tutorials ;urrently supported development platforms include #MS/architecture computers running Linu# Dany modern desktop Linu# distributionE, -ac ,! L KF 2 M or later, 0indows L9 or &ista Android does not use established .ava standards, i e .ava !" and -" 'his prevents compatibility among .ava applications written for those platforms and those for the Android platform Android only reuses the .ava language synta#, but does not provide the full/class libraries and A9Is bundled with .ava !" or -" What is android? Android is a stack of software for mobile devices which has ,perating !ystem, middleware and some key applications 'he application e#ecutes within its own process and its own instance of (alvik &irtual -achine -any &irtual -achines run efficiently by a (&- device (&- e#ecutes .ava language1s byte code which later transforms into de# format files What are the ad anta!es of %ndroid? 'he following are the advantages of Android3 I 'he customer will be benefited from wide range of mobile applications to choose, since the monopoly of wireless carriers like A'B' and ,range will be broken by 8oogle Android I Features like weather details, live 7!! feeds, opening screen, icon on the opening screen can be customi?ed I Innovative products like the location/aware services, location of a nearby convenience store etc , are some of the additive facilities in Android ;omponents can be reused and replaced by the application framework I,ptimi?ed (&- for mobile devices I!QLite enables to store the data in a structured manner I!upports 8!- telephone and @luetooth, 0iFi, A8 and "(8" technologies I'he development is a combination of a device emulator, debugging tools, memory profiling and plug/in for "clipse I(" (eatures of %ndroid Application framework enabling reuse and replacement of components (alvik virtual machine optimi?ed for mobile devices Integrated browser based on the open source 0eb4it engine ,ptimi?ed graphics powered by a custom J( graphics libraryH A( graphics based on the ,pen8L "! K F specification Dhardware acceleration optionalE !QLite for structured data storage -edia support for common audio, video, and still image formats D-9"82, ) JS2, -9A, AA;, A-7, .98, 9%8, 8IFE 8!- 'elephony Dhardware dependentE

@luetooth, "(8", A8, and 0iFi Dhardware dependentE ;amera, 89!, compass, and accelerometer Dhardware dependentE 7ich development environment including a device emulator, tools for debugging, memory and performance
profiling, and a plugin for the "clipse I(" 7&plain a,out the e&ceptions of %ndroid? 'he following are the e#ceptions that are supported by Android I Inflate"#ception 3 0hen an error conditions are occurred, this e#ception is thrown I !urface ,ut,f7esource"#ception3 0hen a surface is not created or resi?ed, this e#ception is thrown I !urface)older @ad!urface'ype"#ception3 'his e#ception is thrown from the lock;anvasDE method, when invoked on a !urface whose is !>7FA;"T'69"T9>!)T@>FF"7! I 0indow-anager @ad'oken"#ception3 'his e#ception is thrown at the time of trying to add view an invalid 0indow-anager Layout9aramstoken 4escri,e the %89 format$ 'he A94 file is compressed the Android-anifest #ml file, application code D de# filesE, resource files, and other files A pro*ect is compiled into a single apk file What is $ap' e&tension? 'he e#tension for an Android package file, which typically contains all of the files related to a single Android application 'he file itself is a compressed collection of an Android-anifest #ml file, application code D de# filesE, resource files, and other files A pro*ect is compiled into a single apk file What is $de& e&tension Android programs are compiled into de# D(alvik "#ecutableE files, which are in turn ?ipped into a single apk file on the device de# files can be created by automatically translating compiled applications written in the .ava programming language What is an ad, ? Android (ebug @ridge, a command/line debugging application shipped with the !(4 It provides tools to browse the device, copy tools on the device, and forward ports for debugging What is an %pplication ? A collection of one or more activities, services, listeners, and intent receivers An application has a single manifest, and is compiled into a single apk file on the device What is a *ontent 8ro ider ? A class built on ;ontent9rovider that handles content $uery strings of a specific format to return data in a specific format !ee 7eading and writing data to a content provider for information on using content providers What is a 4al i' ? 'he name of Android+s virtual machine 'he (alvik &- is an interpreter/only virtual machine that e#ecutes files in the (alvik "#ecutable D de#E format, a format that is optimi?ed for efficient storage and memory/mappable e#ecution 'he virtual machine is register/based, and it can run classes compiled by a .ava language compiler that have been transformed into its native format using the included Qd#R tool 'he &- runs on top of 9osi#/ compliant operating systems, which it relies on for underlying functionality Dsuch as threading and low level memory managementE 'he (alvik core class library is intended to provide a familiar development base for those used to programming with .ava !tandard "dition, but it is geared specifically to the needs of a small mobile device What is an 44/1

(alvik (ebug -onitor !ervice, a 8>I debugging application shipped with the !(4 It provides screen capture, log dump, and process e#amination capabilities What is 4rawa,le? A compiled visual resource that can be used as a background, title, or other part of the screen It is compiled into an android graphics drawable subclass What is an 6ntent? A class DIntentE that contains several fields describing what a caller would like to do 'he caller sends this intent to Android+s intent resolver, which looks through the intent filters of all applications to find the activity most suited to handle this intent Intent fields include the desired action, a category, a data string, the -I-" type of the data, a handling class, and other restrictions What is an 6ntent (ilter ? Activities and intent receivers include one or more filters in their manifest to describe what kinds of intents or messages they can handle or want to receive An intent filter lists a set of re$uirements, such as data type, action re$uested, and >7I format, that the Intent or message must fulfill For Activities, Android searches for the Activity with the most closely matching valid match between the Intent and the activity filter For messages, Android will forward a message to all receivers with matching intent filters What is an 6ntent -ecei er? An application class that listens for messages broadcast by calling ;onte#t broadcastIntent What is a :ayout resource? An L-L file that describes the layout of an Activity screen What is a /anifest ? An L-L file associated with each Application that describes the various activies, intent filters, services, and other items that it e#poses What is a -esource A user/supplied L-L, bitmap, or other file, entered into an application build process, which can later be loaded from code Android can accept resources of many typesH see 7esources for a full description Application/ defined resources should be stored in the res< subfolders What is a 1er ice ? A class that runs in the background to perform various persistent actions, such as playing music or monitoring network activity What is a Theme ? A set of properties Dte#t si?e, background color, and so onE bundled together to define various default display settings Android provides a few standard themes, listed in 7 style Dstarting with Q'hemeTRE What is an U-6s? Android uses >7I strings both for re$uesting data De g , a list of contactsE and for re$uesting actions De g , opening a 0eb page in a browserE @oth are valid >7I strings, but have different values All re$uests for data must start with the string Qcontent3<<R Action strings are valid >7Is that can be handled appropriately by applications on the deviceH for e#ample, a >7I starting with Qhttp3<<R will be handled by the browser *an 6 write code for %ndroid usin! *;*<<? 6es, but need to use %(4 Android applications are written using the .ava programming language Android includes a set of core libraries

that provides most of the functionality available in the core libraries of the .ava programming language "very Android application runs in its own process, with its own instance of the (alvik virtual machine (alvik has been written so that a device can run multiple &-s efficiently 'he (alvik &- e#ecutes files in the (alvik "#ecutable D de#E format which is optimi?ed for minimal memory footprint 'he &- is register/based, and runs classes compiled by a .ava language compiler that have been transformed into the de# format by the included Qd#R tool Android only supports applications written using the .ava programming language at this time What is an action? A description of something that an Intent sender desires What is acti ity? A single screen in an application, with supporting .ava code What is intent? A class DIntentE describes what a caller desires to do 'he caller sends this intent to AndroidCs intent resolver, which finds the most suitable activity for the intent " g opening a 9(F file is an intent, and the Adobe 7eader is the suitable activity for this intent How is nine=patch ima!e different from a re!ular ,itmap? It is a resi?able bitmap resource that can be used for backgrounds or other images on the device 'he %ine9atch class permits drawing a bitmap in nine sections 'he four corners are unscaledH the four edges are scaled in one a#is, and the middle is scaled in both a#es What lan!ua!es does %ndroid support for application de elopment? Android applications are written using the .ava programming language What is a resource? A user/supplied L-L, bitmap, or other file, in*ected into the application build process, which can later be loaded from code How will you record a phone call in %ndroid? How to !et a handle on %udio 1tream for a call in %ndroid? 9ermissions 97,;"!!T,>'8,I%8T;ALL!3 Allows an application to monitor, modify, or abort outgoing calls What>s the difference ,etween file) class and acti ity in android? File / It is a block of arbitrary information, or resource for storing information It can be of any type ;lass / Its a compiled form of .ava file Android finally used this class files to produce an e#ecutable apk Activity / An activity is the e$uivalent of a Frame<0indow in 8>I toolkits It is not a file or a file type it is *ust a class that can be e#tended in Android for loading >I elements on view What is a 1tic'y 6ntent? send!ticky@roadcastDE performs a send@roadcast DIntentE that is Psticky,P i e the Intent you are sending stays around after the broadcast is complete, so that others can $uickly retrieve that data through the return value of register7eceiver D@roadcast7eceiver, IntentFilterE In all other ways, this behaves the same as send@roadcastDIntentE ,ne e#ample of a sticky broadcast sent via the operating system is A;'I,%T@A''"76T;)A%8"( 0hen you call register7eceiverDE for that action // even with a null @roadcast7eceiver // you get the Intent that was last broadcast for that action )ence, you can use this to find the state of the battery without necessarily registering for all future state changes in the battery

4oes %ndroid support the ?luetooth serial port profile? 6es *an an application ,e started on powerup? 6es How to -emo e 4es'top icons and Wid!ets A 9ress and )old the icon or widget 'he phone will vibrate and on the bottom of the phone you will see anoption to remove 0hile still holding the icon or widget drag it to the remove button ,nce remove turns red drop the item and it is gone

4escri,e a real time scenario where android can ,e used? Imagine a situation that you are in a country where no one understands the language you speak and you can not read or write )owever, you have mobile phone with you 0ith a mobile phone with android, the 8oogle translator translates the data of one language into another language by using L-99 to transmit data 6ou can type the message in "nglish and select the language which is understood by the citi?ens of the country in order to reach the message to the citi?ens How to select more than one option from list in android &ml file? 8ive an e#ample !pecify android id, layout height and width as depicted in the following e#ample

What lan!ua!es does %ndroid support for application de elopment? Android applications are written using the .ava programming language 4escri,e %ndroid %pplication %rchitecture$ Android Application Architecture has the following components3 U !ervices 5 like %etwork ,peration U Intent / 'o perform inter/communication between activities or services U 7esource "#ternali?ation / such as strings and graphics U %otification signaling users / light, sound, icon, notification, dialog etc U ;ontent 9roviders / 'hey share data between applications

*ommon Tric'y @uestions 7emember that the 8>I layer doesnCt re$uest data directly from the webH data is always loaded from a local database 'he service layer periodically updates the local database 0hat is the risk in blocking the -ain thread when performing a lengthy operation such as web access or heavy computation1 ApplicationT%otT7esponding e#ception will be thrown which will crash and restart the application 0hy is List &iew not recommended to have active components1 ;licking on the active te#t bo# will pop up the software keyboard but this will resi?e the list, removing focus from the clicked element

.pen 1ource

What is the %ndroid .pen 1ource 8roAect? 0e use the phrase QAndroid ,pen !ource 9ro*ectR or QA,!9R to refer to the people, the processes, and the source code that make up Android 'he people oversee the pro*ect and develop the actual source code 'he processes refer to the tools and procedures we use to manage the development of the software 'he net result is the source code that you can use to build cell phone and other devices Why did we open the %ndroid source code? 8oogle started the Android pro*ect in response to our own e#periences launching mobile apps 0e wanted to make sure that there would always be an open platform available for carriers, ,"-s, and developers to use to make their innovative ideas a reality 0e also wanted to make sure that there was no central point of failure, so that no single industry player could restrict or control the innovations of any other 'he single most important goal of the Android ,pen/!ource 9ro*ect DA,!9E is to make sure that the open/source Android software is implemented as widely and compatibly as possible, to everyone+s benefit 6ou can find more information on this topic at our 9ro*ect 9hilosophy page What 'ind of open=source proAect is %ndroid? 8oogle oversees the development of the core Android open/source platform, and works to create robust developer and user communities For the most part the Android source code is licensed under the permissive Apache !oftware License J F, rather than a QcopyleftR license 'he main reason for this is because our most important goal is widespread adoption of the software, and we believe that the A!LJ F license best achieves that goal 6ou can find more information on this topic at our 9ro*ect 9hilosophy and Licensing pages Why is Boo!le in char!e of %ndroid? Launching a software platform is comple# ,penness is vital to the long/term success of a platform, since openness is re$uired to attract investment from developers and ensure a level playing field )owever, the platform itself must also be a compelling product to end users 'hat+s why 8oogle has committed the professional engineering resources necessary to ensure that Android is a fully competitive software platform 8oogle treats the Android pro*ect as a full/scale product development operation, and strikes the business deals necessary to make sure that great devices running Android actually make it to market @y making sure that Android is a success with end users, we help ensure the vitality of Android as a platform, and as an open/source pro*ect After all, who wants the source code to an unsuccessful product1 8oogle+s goal is to ensure a successful ecosystem around Android, but no one is re$uired to participate, of course 0e opened the Android source code so anyone can modify and distribute the software to meet their own needs What is Boo!leCs o erall strate!y for %ndroid product de elopment? 0e focus on releasing great devices into a competitive marketplace, and then incorporate the innovations and enhancements we made into the core platform, as the ne#t version In practice, this means that the Android engineering team typically focuses on a small number of QflagshipR devices, and develops the ne#t version of the Android software to support those product launches 'hese flagship devices absorb much of the product risk and bla?e a trail for the broad ,"- community, who follow up with many more devices that take advantage of the new features In this way, we make sure that the Android platform evolves according to the actual needs of real/world devices How is the %ndroid software de eloped? "ach platform version of Android Dsuch as K N, K S, and so onE has a corresponding branch in the open/source tree At any given moment, the most recent such branch will be considered the Qcurrent stableR branch version 'his current stable branch is the one that manufacturers port to their devices 'his branch is kept suitable for

release at all times !imultaneously, there is also a Qcurrent e#perimentalR branch, which is where speculative contributions, such as large ne#t/generation features, are developed @ug fi#es and other contributions can be included in the current stable branch from the e#perimental branch as appropriate Finally, 8oogle works on the ne#t version of the Android platform in tandem with developing a flagship device 'his branch pulls in changes from the e#perimental and stable branches as appropriate 6ou can find more information on this topic at our @ranches and 7eleases Why are parts of %ndroid de eloped in pri ate? It typically takes over a year to bring a device to market, but of course device manufacturers want to ship the latest software they can (evelopers, meanwhile, don+t want to have to constantly track new versions of the platform when writing apps @oth groups e#perience a tension between shipping products, and not wanting to fall behind 'o address this, some parts of the ne#t version of Android including the core platform A9Is are developed in a private branch 'hese A9Is constitute the ne#t version of Android ,ur aim is to focus attention on the current stable version of the Android source code, while we create the ne#t version of the platform as driven by flagship Android devices 'his allows developers and ,"-s to focus on a single version without having to track unfinished future work *ust to keep up ,ther parts of the Android system that aren+t related to application compatibility are developed in the open, however It+s our intention to move more of these parts to open development over time When are source code releases made? 0hen they are ready !ome parts of Android are developed in the open, so that source code is always available ,ther parts are developed first in a private tree, and that source code is released when the ne#t platform version is ready In some releases, core platform A9Is will be ready far enough in advance that we can push the source code out for an early look in advance of the device+s releaseH however in others, this isn+t possible In all cases, we release the platform source when we feel the version has stabili?ed enough, and when the development process permits 7eleasing the source code is a fairly comple# process What is in ol ed in releasin! the source code for a new %ndroid ersion? 7eleasing the source code for a new version of the Android platform is a significant process First, the software gets built into a system image for a device, and put through various forms of certification, including government regulatory certification for the regions the phones will be deployed It also goes through operator testing 'his is an important phase of the process, since it helps shake out a lot of software bugs ,nce the release is approved by the regulators and operators, the manufacturer begins mass producing devices, and we turn to releasing the source code !imultaneous to mass production the 8oogle team kicks off several efforts to prepare the open source release 'hese efforts include final A9I changes and documentation Dto reflect any changes that were made during $ualification testing, for e#ampleE, preparing an !(4 for the new version, and launching the platform compatibility information Also included is a final legal sign/off to release the code into open source .ust as open source contributors are re$uired to sign a ;ontributors License Agreement attesting to their I9 ownership of their contribution, 8oogle too must verify that it is clear to make contributions !tarting at the time mass production begins, the software release process usually takes around a month, which often roughly places source code releases around the same time that the devices reach users How does the %.18 relate to the %ndroid *ompati,ility 8ro!ram? 'he Android ,pen/!ource 9ro*ect maintains the Android software, and develops new versions !ince it+s open/ source, this software can be used for any purpose, including to ship devices that are not compatible with other devices based on the same source 'he function of the Android ;ompatibility 9rogram is to define a baseline implementation of Android that is

compatible with third/party apps written by developers (evices that are QAndroid compatibleR may participate in the Android ecosystem, including Android -arketH devices that don+t meet the compatibility re$uirements e#ist outside that ecosystem In other words, the Android ;ompatibility 9rogram is how we separate QAndroid compatible devicesR from devices that merely run derivatives of the source code 0e welcome all uses of the Android source code, but only Android compatible devices G as defined and tested by the Android ;ompatibility 9rogram G may participate in the Android ecosystem How can 6 contri,ute to %ndroid? 'here are a number of ways you can contribute to Android 6ou can report bugs, write apps for Android, or contribute source code to the Android ,pen/!ource 9ro*ect 'here are some limits on the kinds of code contributions we are willing or able to accept For instance, someone might want to contribute an alternative application A9I, such as a full ;VV/based environment 0e would decline that contribution, since Android is focused on applications that run in the (alvik &- Alternatively, we won+t accept contributions such as 89L or L89L libraries that are incompatible with our licensing goals 0e encourage those interested in contributing source code to contact us via the A,!9 ;ommunity page prior to beginning any work 6ou can find more information on this topic at the 8etting Involved page How do 6 ,ecome an %ndroid committer? 'he Android ,pen !ource 9ro*ect doesn+t really have a notion of a QcommitterR All contributions G including those authored by 8oogle employees G go through a web/based system known as QgerritR that+s part of the Android engineering process 'his system works in tandem with the git source code management system to cleanly manage source code contributions ,nce submitted, changes need to be accepted by a designated Approver Approvers are typically 8oogle employees, but the same approvers are responsible for all submissions, regardless of origin 6ou can find more information on this topic at the !ubmitting 9atches page *ompati,ility What does Dcompati,ilityE mean? 0e define an QAndroid compatibleR device as one that can run any application written by third/party developers using the Android !(4 and %(4 0e use this as a filter to separate devices that can participate in the Android app ecosystem, and those that cannot (evices that are properly compatible can seek approval to use the Android trademark (evices that are not compatible are merely derived from the Android source code and may not use the Android trademark In other words, compatibility is a prere$uisite to participate in the Android apps ecosystem Anyone is welcome to use the Android source code, but if the device isn+t compatible, it+s not considered part of the Android ecosystem What is the role of %ndroid /ar'et in compati,ility? (evices that are Android compatible may seek to license the Android -arket client software 'his allows them to become part of the Android app ecosystem, by allowing users to download developers+ apps from a catalog shared by all compatible devices 'his option isn+t available to devices that aren+t compatible 0hat kinds of devices can be Android compatible1 'he Android software can be ported to a lot of different kinds of devices, including some on which third/party apps won+t run properly 'he Android ;ompatibility (efinition (ocument D;((E spells out the specific device configurations that will be considered compatible For e#ample, though the Android source code could be ported to run on a phone that doesn+t have a camera, the ;(( re$uires that in order to be compatible, all phones must have a camera 'his allows developers to rely on a consistent set of capabilities when writing their apps 'he ;(( will evolve over time to reflect market realities For instance, the K S ;(( only allows cell phones, but the J K ;(( allows devices to omit telephony hardware, allowing for non/phone devices such as tablet/style

music players to be compatible As we make these changes, we will also augment Android -arket to allow developers to retain control over where their apps are available 'o continue the telephony e#ample, an app that manages !-! te#t messages would not be useful on a media player, so Android -arket allows the developer to restrict that app e#clusively to phone devices If my device is compatible, does it automatically have access to Android -arket and branding1 Android -arket is a service operated by 8oogle Achieving compatibility is a prere$uisite for obtaining access to the Android -arket software and branding (evice manufacturers should contact 8oogle to obtain access to Android -arket 6f 6 am not a manufacturer) how can 6 !et %ndroid /ar'et? Android -arket is only licensed to handset manufacturers shipping devices For $uestions about specific cases, contact android/partnershipsWgoogle com How can 6 !et access to the Boo!le apps for %ndroid) such as /aps? 'he 8oogle apps for Android, such as 6ou'ube, 8oogle -aps and %avigation, 8mail, and so on are 8oogle properties that are not part of Android, and are licensed separately ;ontact android/partnershipsWgoogle com for in$uiries related to those apps 6s compati,ility mandatory? %o 'he Android ;ompatibility 9rogram is optional !ince the Android source code is open, anyone can use it to build any kind of device )owever, if a manufacturer wishes to use the Android name with their product, or wants access to Android -arket, they must first demonstrate that the device is compatible How much does compati,ility certification cost? 'here is no cost to obtain Android compatibility for a device 'he ;ompatibility 'est !uite is open/source and available to anyone to use to test a device How lon! does compati,ility ta'e? 'he process is automated 'he ;ompatibility 'est !uite generates a report that can be provided to 8oogle to verify compatibility "ventually we intend to provide self/service tools to upload these reports to a public database Who determines what will ,e part of the compati,ility definition? !ince 8oogle is responsible for the overall direction of Android as a platform and product, 8oogle maintains the ;ompatibility (efinition (ocument for each release 0e draft the ;(( for a new Android version in consultation with a number of ,"-s, who provide input on its contents How lon! will each %ndroid ersion ,e supported for new de ices? !ince Android+s code is open/source, we can+t prevent someone from using an old version to launch a device Instead, 8oogle chooses not to license the Android -arket client software for use on versions that are considered obsolete 'his allows anyone to continue to ship old versions of Android, but those devices won+t use the Android name and will e#ist outside the Android apps ecosystem, *ust as if they were non/compatible ;an a device have a different user interface and still be compatible1 'he Android ;ompatibility 9rogram focuses on whether a device can run third/party applications 'he user interface components shipped with a device Dsuch as home screen, dialer, color scheme, and so onE does not generally have much effect on third/party apps As such, device builders are free to customi?e the user interface as much as they like 'he ;ompatibility (efinition (ocument does restrict the degree to which ,"-s may alter the system user interface for areas that do impact third/party apps When are compati,ility definitions released for new %ndroid ersions? ,ur goal is to release new versions of Android ;ompatibility (efinition (ocuments D;((sE once the corresponding Android platform version has converged enough to permit it 0hile we can+t release a final draft

of a ;(( for an Android software version before the first flagship device ships with that software, final ;((s will always be released after the first device )owever, wherever practical we will make draft versions of ;((s available How are de ice manufacturersC compati,ility claims alidated? 'here is no validation process for Android device compatibility )owever, if the device is to include Android -arket, 8oogle will typically validate the device for compatibility before agreeing to license the -arket client software What happens if a de ice that claims compati,ility is later found to ha e compati,ility pro,lems? 'ypically, 8oogle+s relationships with Android -arket licensees allow us to ask them to release updated system images that fi# the problems *ompati,ility Test 1uite What is the purpose of the *T1? 'he ;ompatibility 'est !uite is a tool used by device manufacturers to help ensure their devices are compatible, and to report test results for validations 'he ;'! is intended to be run fre$uently by ,"-s throughout the engineering process to catch compatibility issues early What 'inds of thin!s does the *T1 test? 'he ;'! currently tests that all of the supported Android strong/typed A9Is are present and behave correctly It also tests other non/A9I system behaviors such as application lifecycle and performance 0e plan to add support in future ;'! versions to test QsoftR A9Is such as Intents as well Will the *T1 reports ,e made pu,lic? 6es 0hile not currently implemented, 8oogle intends to provide web/based self/service tools for ,"-s to publish ;'! reports so that they can be viewed by anyone ;'! reports can be shared as widely as manufacturers prefer How is the *T1 licensed? 'he ;'! is licensed under the same Apache !oftware License J F that the bulk of Android uses 4oes the *T1 accept contri,utions? 6es pleaseX 'he Android ,pen/!ource 9ro*ect accepts contributions to improve the ;'! in the same way as for any other component In fact, improving the coverage and $uality of the ;'! test cases is one of the best ways to help out Android *an anyone use the *T1 on e&istin! de ices? 'he ;ompatibility (efinition (ocument re$uires that compatible devices implement the :adb+ debugging utility 'his means that any compatible device G including ones available at retail G must be able to run the ;'! tests 1ome Tou!h @uestion 7emember that the 8>I layer doesnCt re$uest data directly from the webH data is always loaded from a local database 'he service layer periodically updates the local database 0hat is the risk in blocking the -ain thread when performing a lengthy operation such as web access or heavy computation1 ApplicationT%otT7esponding e#ception will be thrown which will crash and restart the application 0hy is List &iew not recommended to have active components1 ;licking on the active te#t bo# will pop up the software keyboard but this will resi?e the list, removing focus from the clicked element

(or senior employees ?eyond a certain le el of e&perience) the Ao, inter iew @uestions cease to ,e Fdifference ,etween a,stract class and interfaceF) and focus more on testin! your technical acumen) colla,oration and communication s'ills$ % list of such @uestions) typically as'ed durin! inter iews for senior positions is !i en ,elow+

"#plain the life cycle of an application development process you worked on previously 0hat the interviewer looks for is communication of re$uirements, planning, modeling, construction and deployment on the back end )ereCs a hypothetical pro*ect "#plain how you would go about it 'hey want to know how you would break your work down into tasks and how many weeks for each task ICm really looking to find out about planning methods, their skill set and how $uickly they can e#ecute )ow do you respond to re$uirement changes in the middle of a cycle1 0hat type of methodology have you used in the past1 0hat are its drawbacks1 0hat are different techni$ues for prototyping an application1 !imilar $uestion3 (o you feel there is value in wireframing an application1 0hy1 )ow do you manage conflicts in 0eb applications when there are different people managing data1 'ell me something you learned from a team member in the last year 0hat software testing procedures have you used to perform a QA1 .nce the codin! s'ills erified$ 1ample 6 Y 'he Activity life cycle is must Ask about the different phases of Activity Life cycle For e#ample3 when and how the activity comes to foreground1 Y ;heck the knowledge on Android-anifest file, For e#ample3 0hy do we need this file, 0hat is the role of this file in Android app development Y (ifferent 4inds of Intents Y Ask about different 4inds of conte#t Y Ask about different !torage -ethods in android Y 4inds of Log debugger and (ebugger ;onfiguration Y )ow to debug the application on real device Y )ow do you ensure that the app design will be consistent across the different screen resolutions

Y 'hread concepts also plus points as we deal with the treads more Y ;an you able to build custom views and how1 Y )ow to create fle#ible layouts, For e#ample to place "nglish, ;hinese fonts Y 0hat is locali?ation and how to achieve1 Y 0hat are Z/patch images Y )ow to avoid A%7 status Y )ow to do -emory management Y Ask about I9; Y 0hat is on;reateD@undle savedInstance!tateE, )ave you used savedInstance!tate when and why1 Y 'o check how updated the person is *ust ask about what are Fragments in an Activity If this is an Android specific *ob, *ust ask the obvious stuff !ample II Application lifecycle 0hen to use a service )ow to use a broadcast receiver and register it both in the manifest and in code Intent filters !tuff about what manifest attributes and tags mean

The types of fla!s to run an application FLA8TA;'I&I'6T%"0T'A!4 FLA8TA;'I&I'6T;L"A7T',9 etc )ow to do data intensive calculations using threads 9assing large ob*ects Dthat canCt be passed via intents and shouldnCt be seriali?edE via a service @inding to a service and the service lifecycle )ow to persist data Dboth savedInstance!tate and more permanent waysE

.ust go through http3<<developer android com<guide<topics<fundamentals html and see what sounds like itCs important )opefully youCre an android developer and know what all those things are, otherwise youCre *ust waiting your intervieweeCs time [9

=. What is Android? It is an open.sourced operating s&stem that is used primaril& on mo$ile de#ices, such as cell phones and ta$lets. It is a 3inux kernel.$ased s&stem thatGs $een e,uipped !ith rich components that allo!s de#elopers to create and run apps that can perform $oth $asic and ad#anced functions. >. What #s the Google Android 7?? The 9oogle Android (K is a toolset that de#elopers need in order to !rite apps on Android ena$led de#ices. It contains a graphical interface that emulates an Android dri#en handheld en#ironment, allo!ing them to test and de$ug their codes. :. What is the Android Architecture? Android Architecture is made up of H ke& components: . 3inux Kernel . 3i$raries . Android )rame!ork . Android Applications ;. 7escribe the Android 0ramewor+. The Android )rame!ork is an important aspect of the Android Architecture. /ere &ou can find all the classes and methods that de#elopers !ould need in order to !rite applications on the Android en#ironment. @. What is AA3'? AAPT is short for Android Asset Packaging Tool. This tool pro#ides de#elopers !ith the a$ilit& to deal !ith 0ip.compati$le archi#es, !hich includes creating, extracting as !ell as #ie!ing its contents. A. What is the importance of having an emulator within the Android environment? The emulator lets de#elopers Ipla&J around an interface that acts as if it !ere an actual mo$ile de#ice. The& can !rite and test codes, and e#en de$ug. 'mulators are a safe place for testing codes especiall& if it is in the earl& design phase. B. What is the use of an activity,reator? An acti#it&6reator is the first step to!ards the creation of a ne! Android project. It is made up of a shell script that !ill $e used to create ne! file s&stem structure necessar& for !riting codes !ithin the Android I('. C . 7escribe Activities.

Acti#ities are !hat &ou refer to as the !indo! to a user interface. "ust as &ou create !indo!s in order to displa& output or to ask for an input in the form of dialog $oxes, acti#ities pla& the same role, though it ma& not al!a&s $e in the form of a user interface. D. What are #ntents? Intents displa&s notification messages to the user from !ithin the Android ena$led de#ice. It can $e used to alert the user of a particular state that occurred. 8sers can $e made to respond to intents. =E. 7ifferentiate Activities from ervices. Acti#ities can $e closed, or terminated an&time the user !ishes. 4n the other hand, ser#ices are designed to run $ehind the scenes, and can act independentl&. Most ser#ices run continuousl&, regardless of !hether there are certain or no acti#ities $eing executed. ==. What items are important in every Android pro"ect? These are the essential items that are present each time an Android project is created: . AndroidManifest.xml . $uild.xml . $in; . src; . res; . assets; =>. What is the importance of 645-based layouts? The use of 5M3.$ased la&outs pro#ides a consistent and some!hat standard means of setting 98I definition format. In common practice, la&out details are placed in 5M3 files !hile other items are placed in source files. =:. What are containers? 6ontainers, as the name itself implies, holds o$jects and !idgets together, depending on !hich specific items are needed and in !hat particular arrangement that is !anted. 6ontainers ma& hold la$els, fields, $uttons, or e#en child containers, as examples. =;. What is Orientation? 4rientation, !hich can $e set using set4rientation(), dictates if the 3inear3a&out is represented as a ro! or as a column. Ealues are set as either /4*IF41TA3 or E'*TI6A3. =@. What is the importance of Android in the mobile mar+et? (e#elopers can !rite and register apps that !ill specificall& run under the Android en#ironment. This means that e#er& mo$ile de#ice that is Android ena$led !ill $e a$le to support and run these apps. -ith the gro!ing popularit& of Android mo$ile de#ices, de#elopers can take ad#antage of this trend $& creating and uploading their apps on the Android Market for distri$ution to an&one !ho !ants to do!nload it. =A. What do you thin+ are some disadvantages of Android? 9i#en that Android is an open.source platform, and the fact that different Android operating s&stems ha#e $een released on different mo$ile de#ices, thereGs no clear cut polic& to ho! applications can adapt !ith #arious 4 #ersions and upgrades. 4ne app that runs on this particular #ersion of Android 4 ma& or ma& not run on another #ersion. Another disad#antage is that since mo$ile de#ices such as phones and ta$s come in different si0es and forms, it poses a challenge for de#elopers to create apps that can adjust correctl& to the right screen si0e and other #ar&ing features and specs. =B. What is adb? Ad$ is short for Android (e$ug +ridge. It allo!s de#elopers the po!er to execute remote shell commands. Its $asic function is to allo! and control communication to!ards and from the emulator port. =C. What are the four essential states of an activity? . Acti#e B if the acti#it& is at the foreground . Paused B if the acti#it& is at the $ackground and still #isi$le . topped B if the acti#it& is not #isi$le and therefore is hidden or o$scured $& another acti#it&

. (estro&ed B !hen the acti#it& process is killed or completed terminated =D. What is AF(? A1* is short for Application 1ot *esponding. This is actuall& a dialog that appears to the user !hene#er an application ha#e $een unresponsi#e for a long period of time. >E. Which elements can occur only once and must be present? Among the different elements, the and elements must $e present and can occur onl& once. The rest are optional, and can occur as man& times as needed. >=. )ow are escape characters used as attribute? 'scape characters are preceded $& dou$le $ackslashes. )or example, a ne!line character is created using KLLnG >>. What is the importance of settings permissions in app development? Permissions allo! certain restrictions to $e imposed primaril& to protect data and code. -ithout these, codes could $e compromised, resulting to defects in functionalit&. >:. What is the function of an intent filter? +ecause e#er& component needs to indicate !hich intents the& can respond to, intent filters are used to filter out intents that these components are !illing to recei#e. 4ne or more intent filters are possi$le, depending on the ser#ices and acti#ities that is going to make use of it. >;. $numerate the three +ey loops when monitoring an activity . 'ntire lifetime B acti#it& happens $et!een on6reate and on(estro& . Eisi$le lifetime B acti#it& happens $et!een on tart and on top . )oreground lifetime B acti#it& happens $et!een on*esume and onPause >@. When is the on top-. method invo+ed? A call to on top method happens !hen an acti#it& is no longer #isi$le to the user, either $ecause another acti#it& has taken o#er or if in front of that acti#it&. >A. #s there a case wherein other Gualifiers in multiple resources ta+e precedence over locale? <es, there are actuall& instances !herein some ,ualifiers can take precedence o#er locale. There are t!o kno!n exceptions, !hich are the M66 (mo$ile countr& code) and M16 (mo$ile net!ork code) ,ualifiers. >B. What are the different states wherein a process is based? There are H possi$le states: . foreground acti#it& . #isi$le acti#it& . $ackground acti#it& . empt& process >C. )ow can the AF( be prevented? 4ne techni,ue that pre#ents the Android s&stem from concluding a code that has $een responsi#e for a long period of time is to create a child thread. -ithin the child thread, most of the actual !orkings of the codes can $e placed, so that the main thread runs !ith minimal periods of unresponsi#e times. >D. What role does 7alvi+ play in Android development? (al#ik ser#es as a #irtual machine, and it is !here e#er& Android application runs. Through (al#ik, a de#ice is a$le to execute multiple #irtual machines efficientl& through $etter memor& management. :E. What is the Android4anifest.%ml? This file is essential in e#er& application. It is declared in the root director& and contains information a$out the application that the Android s&stem must kno! $efore the codes can $e executed. :=. What is the proper way of setting up an Android-powered device for app development? The follo!ing are steps to $e follo!ed prior to actual application de#elopment in an Android.

po!ered de#ice: .(eclare &our application as Ide$ugga$leJ in &our Android Manifest. .Turn on I8 + (e$uggingJ on &our de#ice. . et up &our s&stem to detect &our de#ice. :>. $numerate the steps in creating a bounded service through A#75. M. create the .aidl file, !hich defines the programming interface =. implement the interface, !hich in#ol#es extending the inner a$stract tu$ class as !ell as implanting its methods. N. expose the interface, !hich in#ol#es implementing the ser#ice to the clients. ::. What is the importance of 7efault (esources? -hen default resources, !hich contain default strings and files, are not present, an error !ill occur and the app !ill not run. *esources are placed in speciall& named su$directories under the project res; director&. :;. When dealing with multiple resources, which one ta+es precedence? Assuming that all of these multiple resources are a$le to match the configuration of a de#ice, the KlocaleG ,ualifier almost al!a&s takes the highest precedence o#er the others. :@. When does AF( occur? The A1* dialog is displa&ed to the user $ased on t!o possi$le conditions. 4ne is !hen there is no response to an input e#ent !ithin O seconds, and the other is !hen a $roadcast recei#er is not done executing !ithin M> seconds. :A. What is A#75? AI(3, or Android Interface (efinition 3anguage, handles the interface re,uirements $et!een a client and a ser#ice so $oth can communicate at the same le#el through interprocess communication or IP6. This process in#ol#es $reaking do!n o$jects into primiti#es that Android can understand. This part is re,uired simpl& $ecause a process cannot access the memor& of the other process. :B. What data types are supported by A#75? AI(3 has support for the follo!ing data t&pes: .string .char e,uence .3ist .Map .all nati#e "a#a data t&pes like int,long, char and +oolean :C. What is a 0ragment? A fragment is a part or portion of an acti#it&. It is modular in a sense that &ou can mo#e around or com$ine !ith other fragments in a single acti#it&. )ragments are also reusa$le. :D. What is a visible activity? A #isi$le acti#it& is one that sits $ehind a foreground dialog. It is actuall& #isi$le to the user, $ut not necessaril& $eing in the foreground itself. ;E. When is the best time to +ill a foreground activity? The foreground acti#it&, $eing the most important among the other states, is onl& killed or terminated as a last resort, especiall& if it is alread& consuming too much memor&. -hen a memor& paging state has $een reach $& a foreground acti#it&, then it is killed so that the user interface can retain its responsi#eness to the user. ;=. #s it possible to use or add a fragment without using a user interface? <es, it is possi$le to do that, such as !hen &ou !ant to create a $ackground $eha#ior for a particular acti#it&. <ou can do this $& using add()ragment,string) method to add a fragment from the acti#it&. ;>. )ow do you remove icons and widgets from the main screen of the Android device? To remo#e an icon or shortcut, press and hold that icon. <ou then drag it do!n!ards to the lo!er part of the screen !here a remo#e $utton appears. ;:. What are the core components under the Android application architecture?

There are O ke& components under the Android application architecture: . ser#ices . intent . resource externali0ation . notifications . content pro#iders ;;. What composes a typical Android application pro"ect? A project under Android de#elopment, upon compilation, $ecomes an .apk file. This apk file format is actuall& made up of the AndroidManifest.xml file, application code, resource files, and other related files. ;@. What is a tic+y #ntent? A tick& Intent is a $roadcast from send tick&+roadcast() method such that the intent floats around e#en after the $roadcast, allo!ing others to collect data from it. ;A. 7o all mobile phones support the latest Android operating system? ome Android.po!ered phone allo!s &ou to upgrade to the higher Android operating s&stem #ersion. /o!e#er, not all upgrades !ould allo! &ou to get the latest #ersion. It depends largel& on the capa$ilit& and specs of the phone, !hether it can support the ne!er features a#aila$le under the latest Android #ersion. ;B. What is portable wi-fi hotspot? Porta$le -i.)i /otspot allo!s &ou to share &our mo$ile internet connection to other !ireless de#ice. )or example, using &our Android.po!ered phone as a -i.)i /otspot, &ou can use &our laptop to connect to the Internet using that access point. ;C. What is an action? In Android de#elopment, an action is !hat the intent sender !ants to do or expected to get as a response. Most application functionalit& is $ased on the intended action. ;D. What is the difference between a regular bitmap and a nine-patch image? In general, a 1ine.patch image allo!s resi0ing that can $e used as $ackground or other image si0e re,uirements for the target de#ice. The 1ine.patch refers to the !a& &ou can resi0e the image: H corners that are unscaled, H edges that are scaled in M axis, and the middle one that can $e scaled into $oth axes. @E. What language is supported by Android for application development? The main language supported is "a#a programming language. "a#a is the most popular language for app de#elopment, !hich makes it ideal e#en for ne! Android de#elopers to ,uickl& learn to create and deplo& applications in the Android en#ironment.

Introduction Android: Android is an operating system for mobile devices that includes middle-ware and key applications, and uses a modified version of the Linux kernel. It was initially developed by Android Inc..It allows developers to write managed code in the Java language, controlling the device via Google-developed Java libraries.. The Android SDK includes a comprehensive set of development tools . These include a debugger, libraries, a handset emulator (based on QEMU), documentation, sample code, and tutorials. Currently supported development platforms include x86-architecture computers running Linux (any modern desktop Linux distribution), Mac OS X 10.4.8 or later, Windows XP or Vista. Android does not use established Java standards, i.e. Java SE and ME. This prevents compatibility among Java applications written for those platforms and those for the Android platform. Android only reuses the Java language syntax, but does not provide the full-class libraries and APIs bundled with Java SE or ME What is android tell me the android development ? Android is a stack of software for mobile devices which has Operating System, middleware and some key applications. The application executes within its own process and its own instance of Dalvik Virtual Machine. Many Virtual Machines run efficiently by a DVM device. DVM executes Java languages byte code which later transforms into .dex format files. What are the features of Android?
SQLite enables to store the data in a structured manner. Supports GSM telephone and Bluetooth, WiFi, 3G and EDGE technologies The development is a combination of a device emulator, debugging tools, memory profiling and plug-in for Eclipse IDE. Components can be reused and replaced by the application framework. Optimized DVM for mobile devices

Which way AOSP relate to the Android Compatibility Program? The Android Open-Source Project maintains the Android software, and develops new versions. Since its open-source, this software can be used for any purpose, including to ship devices that are not compatible with other devices based on the same source. The function of the Android Compatibility Program is to define a baseline implementation of Android that is compatible with third-party written by developers. Devices that are Android compatible may participate in the Android ecosystem, including ; devices that dont meet the compatibility requirements exist outside that ecosystem. What is the Android Application Architecture ?

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

How can we involved in releasing the source code for a new Android version? Releasing the source code for a new version of the Android platform is a significant process. First, the software gets built into a system image for a device, and put through various forms of certification, including government regulatory certification for the regions the phones will be deployed. It also goes through operator testing. This is an important phase of the process, since it helps shake out a lot of software bugs. Once the release is approved by the regulators and operators, the manufacturer begins mass producing devices, and we turn to releasing the source code. Simultaneous to mass production the Google team kicks off several efforts to prepare the open source release. These efforts include final API changes and documentation (to reflect any changes that were made during qualification testing, for example), preparing an SDK for the new version, and launching the platform compatibility information. Also included is a final legal sign-off to release the code into open source. Just as open source contributors are required to sign a Contributors License Agreement attesting to their IP ownership of their contribution, Google too must verify that it is clear to make contributions. Starting at the time mass production begins, the software release process usually takes around a month, which often roughly places source code releases around the same time that the devices reach users. uses of android : Android is useful because:
It is simple and powerful SDK Licensing, Distribution or Development fee is not required Easy to Import third party Java library Supporting platforms are Linux, Mac Os, Windows

o er iew of the steps you must follow to set up the %ndroid 149+ K 9repare your development computer and ensure it meets the system re$uirements J Install the !(4 starter package from the table above DIf youCre on 0indows, download the installer for help with the initial setup E A Install the A(' 9lugin for "clipse Dif youCll be developing in "clipseE 2 Add Android platforms and other packages to your !(4 N "#plore the contents of the Android !(4 DoptionalE What are the advantages of Android? The following are the advantages of Android:
The customer will be benefited from wide range of mobile applications to choose, since the monopoly of wireless carriers like AT&T and Orange will be broken by Google Android. Features like weather details, live RSS feeds, opening screen, icon on the opening screen can be customized Innovative products like the location-aware services, location of a nearby convenience store etc., are some of the additive facilities in Android

How Can we write code for Android using C/C++? Yes, but need to use NDK

Android applications are written using the Java programming language. Android includes a set of core libraries that provides most of the functionality available in the core libraries of the Java programming language. Every Android application runs in its own process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run multiple VMs efficiently. The Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimized for minimal memory footprint. The VM is register-based, and runs classes compiled by a Java language compiler that have been transformed into the .dex format by the included dx tool. Android only supports applications written using the Java programming language at this time. What is the file features used in android? Android is rich in file features and it provides lots of variations in them as well. The file features are as follows: Intent filters: includes bundle of information which describes a desired action. Icons and Labels: includes information for small icon and a text label that can be displayed to users. These are set for an intent filter and are used to represent a component which fulfills the function advertised by the filter. Permissions: it is a restriction or limitation access to a part of code or data on the device. It is given as:android.permission.CALL_EMERGENCY_NUMBERS Libraries: it includes the basic packages for building and developing applications.

What is .apk extension ?

The extension for an Android package file, which typically contains all of the files related to a single Android application. The file itself is a compressed collection of an AndroidManifest.xml file, application code (.dex files), resource files, and other files. A project is compiled into a single .apk file. Layout resource An XML file that describes the layout of an Activity screen. Manifest An XML file associated with each Application that describes the various activies, intent filters, services, and other items that it exposes. Nine-patch / 9-patch / Ninepatch image A resizeable bitmap resource that can be used for backgrounds or other images on the device. See Nine-Patch Stretchable Image for more information. Query String A type of URI. See the URI entry. What is Android Runtime?

Android includes a set of core libraries that provides most of the functionality available in the core libraries of the Java programming language. Every Android application runs in its own process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run multiple VMs efficiently. The Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimized for minimal memory footprint. The VM is register-based, and runs classes compiled by a Java language compiler that have been transformed into the .dex format by the included dx tool. Describe of Android Market in compatibility?

Devices that are Android compatible may seek to license the Android Market client software. This allows them to become part of the Android app ecosystem, by allowing users to download developers apps from a catalog shared by all compatible devices. This option isnt available to devices that arent compatible. What kinds of devices can be Android compatible? The Android software can be ported to a lot of different kinds of devices, including some on which third-party apps wont run properly. The Android Compatibility Definition Document (CDD) spells out the specific device configurations that will be considered compatible. For example, though the Android source code could be ported to run on a phone that doesnt have a camera, the CDD requires that in order to be compatible, all phones must have a camera. This allows developers to rely on a consistent set of capabilities when writing their apps. The CDD will evolve over time to reflect market realities. For instance, the 1.6 CDD only allows cell phones, but the 2.1 CDD allows devices to omit telephony hardware, allowing for non-phone devices such as tablet-style music players to be compatible. As we make these changes, we will also augment Android Market to allow developers to retain control over where their apps are available. To continue the telephony example, an app that manages would not be useful on a media player, so Android Market allows the developer to restrict that app exclusively to phone devices. If my device is compatible, does it automatically have access to Android Market and branding? Android Market is a service operated by Google. Achieving compatibility is a prerequisite for obtaining access to the Android Market software and branding. Device manufacturers should contact Google to obtain access to Android Market.

Features of Android
Application framework enabling reuse and replacement of components Dalvik virtual machine optimized for mobile devices Integrated browser based on the open source WebKit engine Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional) SQLite for structured data storage Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF) GSM Telephony (hardware dependent) Bluetooth, EDGE, 3G, and WiFi (hardware dependent) Camera, GPS, compass, and accelerometer (hardware dependent) Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE. How long does compatibility take? The process is automated. The Compatibility Test Suite generates a report that can be provided to Google to verify compatibility. Eventually we intend to provide self-service tools to upload these reports to a public database. Who determines what will be part of the compatibility definition? Since Google is responsible for the overall direction of Android as a platform and product, Google maintains the Compatibility Definition Document for each release. We draft the CDD for a new Android version in consultation with a number of OEMs, who provide input on its contents.

What is Android?
Android is a stac+ of software for mobile devices which includes an Operating ystem, middleware and some +ey applications. 'he application e%ecutes within its own process and its own instance of 7alvi+ Hirtual 4achine. 4any Hirtual 4achines run efficiently by a 7H4 device. 7H4 e%ecutes Iava languages byte code which later transforms into .de% format files.

What are the advantages of Android?


#t is simple and powerful 7?. 5icensing, 7istribution or 7evelopment fee is not reGuired. $asy to #mport third party Iava library. upporting platforms are J 5inu%, 4ac Os, Windows. #nnovative products li+e the location-aware services, location of a nearby convenience store etc., are some of the additive facilities in Android. ,omponents can be reused and replaced by the application framewor+. Optimi!ed 7H4 for mobile devices. 85ite enables to store the data in a structured manner. upports G 4 telephone and *luetooth, Wi0i, :G and $7G$ technologies. 'he development is a combination of a device emulator, debugging tools, memory profiling and plug-in for $clipse #7$. 'he customer will be benefited from wide range of mobile applications to choose, since the monopoly of wireless carriers li+e A'K' and Orange will be bro+en by Google Android.

Describe Android Application Architecture.


Android Application Architecture has the following components& ervices J li+e Fetwor+ Operation #ntent - 'o perform inter-communication between activities or services (esource $%ternali!ation - such as strings and graphics Fotification signaling users - light, sound, icon, notification, dialog etc. ,ontent 3roviders - 'hey share data between applications )ow will you record a phone call in Android? )ow to get a handle on Audio tream for a call in Android? 3ermissions.3(O,$ 1O/'GO#FG1,A55 & Allows an application to monitor, modify, or abort outgoing calls.

What is activity?
'he building bloc+ of the user interface is the activity. 'hey<re in a long-running conversation with the user and may remain active, even when idle, as long as the conversation continues. #n terms of des+top development, an Activity is eGuivalent to a 0orm.

Describe the APK format.


'he -Android 3ac+aging ?ey. A3? file is compressed format of the Android4anifest.%ml file, application code -.de% files., resource files, and other files. A pro"ect is compiled into a single .ap+ file.

What are the different phases of the Activity life cycle?


As an activity transitions from state to state, it is notified of the change by calls to the following protected methods& =. void on,reate-*undle saved#nstance tate. >. void on tart-. :. void on(estart-. ;. void on(esume-. @. void on3ause-. A. void on top-. B. void on7estroy-. 'a+en together, these seven methods define the entire lifecycle of an activity.

What is intent?
A class -#ntent. describes what a caller desires to do. 'he caller sends this intent to Androids intent resolver, which finds the most suitable activity for the intent. $.g. opening a 370 file is an intent, and the Adobe (eader is the suitable activity for this intent.

What is an E plicit !ntent?


#n an e%plicit intent, we actually specify the activity that is reGuired to respond

to the intent. #n other words, we e%plicitly designate the target component. 'his is typically used for application internal messages.

What is an !mplicit !ntent?


#n an implicit intent, the main power of the android design, we "ust declare an intent and leave it to the platform to find an activity that can respond to the intent. )ere, we do not declare the target component and hence is typically used for activating components of other applications seamlessly

What is an Android"anifest file?


Applications declare their components in a manifest file that<s bundled into the Android pac+age, the .ap+ file that also holds the application<s code, files, and resources. 'he manifest is a structured 645 file and is always named Android4anifest.%ml for all applications. #t is also used for naming any libraries the application needs to be lin+ed against -besides the default Android library. and identifying any permission the application e%pects to be granted.

What language does Android support for application development?


Android applications are written using the Iava programming language.

What#s the difference bet$een a file% a class and an activity in android?


0ile - #t is a bloc+ of arbitrary information, or resource for storing information. #t can be of any type. ,lass - #ts a compiled form of .Iava file . Android finally used this .class files to produce an e%ecutable ap+ Activity - An activity is the eGuivalent of a 0rame9Window in G/# tool+its. #t is not a file or a file type it is "ust a class that can be e%tended in Android for loading /# elements on view.

What is the significance of the .de files?


Android programs are compiled into .de% -7alvi+ $%ecutable. files, which are in turn !ipped into a single .ap+ file on the device. .de% files can be created by automatically, translating compiled applications written in the Iava programming language.

What does ADT stand for?


A7' stands for Android Development Tools 'he Android 7? includes several tools and utilities to help you create, test, and debug your pro"ects.

What are the different tools in Android? E plain them?


'he Android 7? and Hirtual 7evice 4anager-

#t is used to create and manage Android Hirtual 7evices -AH7. and 7? pac+ages. 'he AH7 hosts an emulator running a particular build of Android, letting you specify the supported 7? version, screen resolution, amount of 7 card storage available, and available hardware capabilities -such as touch screens and G3 .. 'he Android $mulatorAn implementation of the Android virtual machine designed to run within a virtual device on your development computer. /se the emulator to test and debug your Android applications. 7alvi+ 7ebug 4onitoring ervice -774 . /se the 774 perspective to monitor and control the 7alvi+ virtual machines on which you<re debugging your applications. Android Asset 3ac+aging 'ool -AA3'. ,onstructs the distributable Android pac+age files -.ap+.. Android 7ebug *ridge,-adb. Android 7ebug *ridge, is a command-line debugging application shipped with the 7?. #t provides tools to browse the device, copy tools on the device, and forward ports for debugging.

What is Dalvik &irtual "achine?


'he name of Android<s virtual machine. 'he 7alvi+ H4 is an interpreter-only virtual machine that e%ecutes files in the 7alvi+ $%ecutable -.de%. format, a format that is optimi!ed for efficient storage and memory-mappable e%ecution. 'he virtual machine is register-based, and it can run classes compiled by a Iava language compiler that have been transformed into its native format using the included Ld%L tool. 'he H4 runs on top of 3osi%-compliant operating systems, which it relies on for underlying functionality -such as threading and low level memory management.. 'he 7alvi+ core class library is intended to provide a familiar development base for those used to programming with Iava tandard $dition, but it is geared specifically to the needs of a small mobile device.

What is Android 'untime?


Android includes a set of core libraries that provides most of the functionality available in the core libraries of the Iava programming language. $very Android application runs in its own process, with its own instance of the 7alvi+ virtual machine. 7alvi+ has been written so that a device can run multiple H4s efficiently. 'he 7alvi+ H4 e%ecutes files in the 7alvi+ $%ecutable -.de%. format which is optimi!ed for minimal memory footprint. 'he H4 is register-based, and runs classes compiled by a Iava language compiler that have been transformed into the .de% format by the included Ld%L tool.

What is the (pen )andset Alliance?


'he O)A is a consortium of C; technology and mobile companies that have "oined hands to accelerate innovation in mobile technology and at the same

time offer the end users a better, cost-effective and richer mobile e%perience. 4embers of this include Google, )',, ony, 7ell, #ntel, 4otorola, 8ualcomm, 'e%as #nstruments, amsung, 5G, '-4obile, Fvidia. 'he O)A was started on @ Fovember >EEB by Google and :; other companies. Android is the main software of the alliance.

What is &ie$*roup?
A HiewGroup is a special view that can contain other views -called children.. 'he view group is the base class for layouts and views containers. 'his class also defines the class HiewGroup.5ayout3arams which serves as the base class for layouts parameters.

What is a +ervice?
A ervice is an application component representing either an application<s desire to perform a longer-running operation while not interacting with the user or to supply functionality for other applications to use. ervices run without a dedicated G/#, but, li+e Activities and *roadcast (eceivers, they still e%ecute in the main thread of the application<s process. A ervice could be, facility for an application to e%pose some of its functionality to other applications.

What is the difference bet$een +ervice and Thread?


ervice is li+e an Activity but has no interface. 3robably if you want to fetch the weather for e%ample you won<t create a blan+ activity for it, for this you will use a ervice. #t is also +nown as *ac+ground ervice because it performs tas+s in bac+ground. A 'hread is a concurrent unit of e%ecution. 2ou need to +now that you cannot update /# from a 'hread. 2ou need to use a )andler for this.

What is a ,ontent Provider?


,ontent 3roviders are the only way to share data across Android applications. 'hey store and retrieve data thus ma+ing it accessible to all. ,ontent 3roviders give a uniform interface to access the data. Android platform provides default implementations of content providers for data types li+e audio, video, images, contact information etc.

What is a Toast -otification?


A toast notification is a message that pops up on the surface of the window. #t only fills the amount of space reGuired for the message and the user<s current activity remains visible and interactive. 'he notification automatically fades in and out, and does not accept interaction events.

What are the other -otifications?


A tatus *ar Fotification& #t is used for persistent reminders that come from the bac+ground and reGuest the user<s response. A 7ialog Fotification& #t is /sed for Activity-related notifications.

What is the importance of 645-based layouts? 'he use of 645-based layouts provides a consistent and somewhat standard means of setting G/# definition format. #n common practice, layout details are placed in 645 files while other items are placed in source files.

What are containers?


,ontainers, as the name itself implies, holds ob"ects and widgets together, depending on which specific items are needed and in what particular arrangement that is wanted. ,ontainers may hold labels, fields, buttons, or even child containers, as e%amples.

. What is (rientation?
Orientation, which can be set using setOrientation-., dictates if the 5inear5ayout is represented as a row or as a column. Halues are set as either )O(#MOF'A5 or H$('#,A5.

What do you think are some disadvantages of Android?


Given that Android is an open-source platform, and the fact that different Android operating systems have been released on different mobile devices, theres no clear cut policy to how applications can adapt with various O versions and upgrades. One app that runs on this particular version of Android O may or may not run on another version. Another disadvantage is that since mobile devices such as phones and tabs come in different si!es and forms, it poses a challenge for developers to create apps that can ad"ust correctly to the right screen si!e and other varying features and specs.

What is adb?
Adb is short for Android 7ebug *ridge. #t allows developers the power to e%ecute remote shell commands. #ts basic function is to allow and control communication towards and from the emulator port.

What are the four essential states of an activity?


Active J if the activity is at the foreground. 3aused J if the activity is at the bac+ground and still visible. topped J if the activity is not visible and therefore is hidden or obscured by another activity. 7estroyed J when the activity process is +illed or completed terminated.

What is A-'?
AF( is short for Application Fot (esponding. 'his is actually a dialog that appears to the user whenever an application have been unresponsive for a

long period of time.

Which elements can occur only once and must be present?


Among the different elements, the and elements must be present and can occur only once. 'he rest are optional, and can occur as many times as needed.

)o$ are escape characters used as attribute?


$scape characters are preceded by double bac+slashes. 0or e%ample, a newline character is created using NOOn

What is the importance of settings permissions in app development?


3ermissions allow certain restrictions to be imposed primarily to protect data and code. Without these, codes could be compromised, resulting to defects in functionality.

!s there a case $herein other /ualifiers in multiple resources take precedence over locale?
2es, there are actually instances wherein some Gualifiers can ta+e precedence over locale. 'here are two +nown e%ceptions, which are the 4,, -mobile country code. and 4F, -mobile networ+ code. Gualifiers.

What is the proper $ay of setting up an Android0po$ered device for app development?
'he following are steps to be followed prior to actual application development in an Android-powered device& -7eclare your application as PdebuggableQ in your Android 4anifest. 'urn on P/ * 7ebuggingQ on your device. et up your system to detect your device.

What are the steps in creating a bounded service through A!D1.


=. create the .aidl file, which defines the programming interface >. implement the interface, which involves e%tending the inner abstract tub class as well as implanting its methods. :. e%pose the interface, which involves implementing the service to the clients.

What data types are supported by A!D1?


A#75 has support for the following data types& string char eGuence

5ist 4ap all native Iava data types li+e int, long, char and *oolean

What is a 2ragment?
A fragment is a part or portion of an activity. #t is modular in a sense that you can move around or combine with other fragments in a single activity. 0ragments are also reusable.

!s it possible to use or add a fragment $ithout using a user interface?


2es, it is possible to do that, such as when you want to create a bac+ground behavior for a particular activity. 2ou can do this by using add-0ragment, string. method to add a fragment from the activity.

)o$ do you remove icons and $idgets from the main screen of the Android device?
'o remove an icon or shortcut, press and hold that icon. 2ou then drag it downwards to the lower part of the screen where a remove button appears.

Do all mobile phones support the latest Android operating system?


ome Android-powered phone allows you to upgrade to the higher Android operating system version. )owever, not all upgrades would allow you to get the latest version. #t depends largely on the capability and specs of the phone, whether it can support the newer features available under the latest Android version.

What is portable Wi02i hotspot?


3ortable Wi-0i )otspot allows you to share your mobile internet connection to other wireless device. 0or e%ample, using your Android-powered phone as a Wi0i )otspot, you can use your laptop to connect to the #nternet using that access point.

What is the difference bet$een a regular bitmap and a nine0patch image?


#n general, a Fine-patch image allows resi!ing that can be used as bac+ground or other image si!e reGuirements for the target device. 'he Fine-patch refers to the way you can resi!e the image& ; corners that are unscaled, ; edges that are scaled in = a%is, and the middle one that can be scaled into both a%es.

What is Android? Android is a software stac+ for mobile devices that includes an Poperating systemQ, PmiddlewareQ and P+ey applicationsQ. What is the APK format?
'he A3? file is compressed the Android4anifest.%ml file, application code -.de% files., resource files, and other files. A pro"ect is compiled into a single .ap+ file.

What is .apk e tension? 'he e%tension for an Android pac+age file, which typically contains all of the files related to a single Android application. 'he file itself is a compressed collection of an Android4anifest.%ml file, application code -.de% files., resource files, and other files. A pro"ect is compiled into a single .ap+ file. )o$ to 'emove Desktop icons and Widgets? 3ress and )old the icon or widget. 'he phone will vibrate and on the bottom of the phone you will see anoption to remove. While still holding the icon or widget drag it to the remove button. Once remove turns red drop the item and it
is gone.

Describe a real time scenario $here android can be used? #magine a situation that you are in a country where no one understands the language you spea+ and you can not read or write. )owever, you have mobile phone with you. )o$ to select more than one option from list in android ml file? Give an e%ample. pecify android id, layout height and width as depicted in the following e%ample. What languages does Android support for application development? Android applications are written using the Iava programming language. What is the Android (pen +ource Pro3ect? We use the phrase PAndroid Open ource 3ro"ectQ or PAO 3Q to refer to the people, the processes, and the source code that ma+e up Android. Why did $e open the Android source code? Google started the Android pro"ect in response to our own e%periences launching mobile apps. We wanted to ma+e sure that there would always be an open platform available for carriers, O$4s, and developers to use to ma+e their
innovative ideas a reality. We also wanted to ma+e sure that there was no central point of failure, so that no single industry player could restrict or control the innovations of any other. 'he single most important goal of the Android Open- ource 3ro"ect -AO 3. is to ma+e sure that the open-source Android software is implemented as widely and compatibly as possible, to everyones benefit.

What is an action? A description of something that an #ntent sender desires. What is an activity? A single screen in an application, with supporting Iava code. An activity is a single,
focused thing that the user can do. Almost all activities interact with the user, so the Activity class ta+es care of creating a window for you in which you can place your /# with set,ontentHiew-Hiew..

What is a service? A ervice is an application component representing either an applications desire to perform a longer-running operation while not interacting with the user or to supply functionality for other applications to use.
$ach service class must have a corresponding RserviceS declaration in its pac+ages Android4anifest.%ml. ervices can be started with,onte%t.start ervice-. and ,onte%t.bind ervice-.. 0or $%ample, a service might play bac+ground music as the user attends to other matters, or it might fetch data over the networ+ or calculate something and provide the result to activities that need it. $ach service e%tends the ervice base class.

What is A&D? An Android Hirtual 7evice -AH7. is an emulator configuration that lets you model an actual device by defining hardware and software options to be emulated by the Android $mulator. What is DD"+? Android ships with a debugging tool called the 7alvi+ 7ebug 4onitor erver -774 ., which provides port-forwarding services, screen capture on the device, thread and heap information on the device, logcat, process, and radio state information, incoming call and 4 spoofing, location data spoofing, and more. What is AD4? Android 7ebug *ridge -adb. is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device. #t is a client-server program that includes three components& A client, which runs on your development machine. 2ou can invo+e a client from a shell by issuing an adb command. Other Android tools such as the A7' plugin and 774 also create adb clients. A server, which runs as a bac+ground process on your development machine. 'he server manages communication between the client and the adb daemon running on an emulator or device. A daemon, which runs as a bac+ground process on each emulator or device instance. What is ,onte t? #nterface to global information about an application environment. #t allows access
to application-specific resources and classes, as well as up-calls for application-level operations such as launching activities, broadcasting and receiving intents, etc.

2eatures of Android platform? Fe%t generation platform for developing application for handheld device. 0ree K open source. 0amiliar K ine%pensive development tools. 3owerful library. (ich, secure application integration. $asy to publish. 0ree mar+et for publishing application to customer. Growing platform, new feature are added with every new version. Describe Android Application Architectur ?

Android Application Architecture has the following components&


ervices J li+e F

#ntent J 'o perform inter-communetwor+ Operation ication between


activities or services

(esource $%ternali!ation J such as strings and graphics Fotification signaling users J light, sound, icon, notification, dialog etc Will it $ork on my phone? 'he app will wor+ on all phones and tablets running Android version =.A and above. )o$ much does it cost? 'he app is free and ad-supported. )o$ do ! save the app to my +D card? 0rom the device<s ettings menu, go to Applications S 4anage applications S 'he Guardian. /nder the data header, choose L4ove to 7 cardL. Types of Dialogs? 7ialog, Alert7ialog, ,haracter3ic+er7ialog, 7ate3ic+er7ialog, 3rogress7ialog, 'ime3ic+er7ialog 1ist of 1ayout 2ile? What 0rame5ayout 5inear5ayout (elative5ayout 'able5ayout 4ultiple5ayout is a 4roadcast receivers?

A broadcast receiver is a component that does nothing but receive and react to broadcast announcements.

0or e%ample, announcements that the time!one has changed, that the battery is low or that the user changed a language preference. All receivers e%tend the *roadcast(eceiver base class.
*roadcast receivers do not display a user interface. )owever, they may start an activity in response to the information they receive,

or they may use the Fotification4anager to alert the user li+e-flashing the bac+light, vibrating the device, playing a sound.. What is a content provider? A content provider ma+es a specific set of the applications data available to other applications. 'he content provider e%tends the ,ontent3rovider base class to implement a standard set of methods that enable other applications to retrieve and store data of the type it controls. )owever, applications do not call these methods directly. (ather they use a ,ontent(esolver ob"ect and call its methods instead.

What is intent in Android? A class -#ntent. will describes what a caller desires to do. 'he caller will send this intent to Androids intent resolver, which finds the most suitable activity for the intent. $.g. opening a 370 document is an intent, and the Adobe (eader apps will be the perfect activity for that intent-class.. What is a +ticky !ntent? send tic+y*roadcast-. performs a send*roadcast -#ntent. +nown as stic+y, i.e. the #ntent you are sending stays around after the broadcast is complete, so that others can Guic+ly retrieve that data through the return value of register(eceiver -*roadcast(eceiver, #ntent0ilter.. #n all other ways, this behaves the same as send*roadcast-#ntent.. E ample for sticky broadcast? When you call register(eceiver-. for that action T even with a null *roadcast(eceiver T you get the #ntent that was last broadcast for that action. )ence, you can use this to find the state of the battery without necessarily registering for all future state changes in the battery. What is a resource? A user-supplied 645, bitmap, or other file, in"ected into the application build process, which can later be loaded from code. What &irtual "achine Android runs on? 7alvi+ virtual machine )o$ do you define the user interface? 645 0ormat is the best. )o$ the nine0patch !mage different from a regular bitmap? or Different bet$een nine0patch !mage vs regular 4itmap !mage ? #t is one of a resi!able bitmap resource which is being used as bac+grounds or other images on the device. 'he Fine3atch class allows drawing a bitmap in nine sections. 'he four corners are unscaledU the middle of the image is scaled in both a%es, the four edges are scaled into one a%is. What Programming languages does Android support for application development? Android applications supports using Iava 3rogramming 5anguage. which is coded in Iava and complied using Android 7?. )o$ $ill you record a phone call in Android? or )o$ to handle on Audio +tream for a call in Android? Permissions.P'(,E++5(6T*(!-*5,A11+& Will Allows an application to monitor, modify, or abort outgoing calls. o through that we can monitor the 3hone calls. What7s the difference bet$een class% file and activity in android? ,lass 8 'he ,lass file is complied from ."ava file. Android will use this .class file to produce the e%ecutable ap+.

2ile 8 #t is a bloc+ of resources, srbitrary information. #t can be any file type. Activity & An activity is the eGuivalent of a 0rame9Window in G/# tool+its. #t is not a file or a file type it is "ust a class that can be e%tended in Android for loading /# elements on view. )o$ to Translate in android? 'he Google translator translates the data of one language into another language by using 6433 to transmit data. 2ou can type the message in $nglish and select the language which is understood by the citi!ens of the country in order to reach the message to the citi!ens. )o$ to 'emove Desktop icons and Widgets? 3ress and )old the icon or widget. 'he phone will vibrate and on the bottom of the phone you will see anoption to remove. While still holding the icon or widget drag it to the remove button. Once remove turns red drop the item and it is gone Describe a real time scenario $here android can be used? #magine a situation that you are in a country where no one understands the language you spea+ and you can not read or write. )owever, you have mobile phone with you. )o$ to select more than one option from list in android ml file? 0or $%ample. pecify android id, layout height and width as depicted in the following e%ample. What is the Android (pen +ource Pro3ect? We use the phrase PAndroid Open ource 3ro"ectQ or PAO 3Q to refer to the people, the processes, and the source code that ma+e up Android. Why did $e open the Android source code? Google started the Android pro"ect in response to our own e%periences launching mobile apps. We wanted to ma+e sure that there would always be an open platform available for carriers, O$4s, and developers to use to ma+e their innovative ideas a reality. We also wanted to ma+e sure that there was no central point of failure, so that no single industry player could restrict or control the innovations of any other. 'he single most important goal of the Android Open- ource 3ro"ect -AO 3. is to ma+e sure that the open-source Android software is implemented as widely and compatibly as possible, to everyones benefit. What kind of open0source pro3ect is Android? Google oversees the development of the core Android open-source platform, and wor+s to create robust developer and user communities. 0or the most part the Android source code is licensed under the permissive Apache oftware 5icense >.E, rather than a PcopyleftQ license. 'he main reason for this is because our most important goal is widespread adoption of the software, and we believe that the A 5>.E license best achieves that goal.

What does 9compatibility: mean? We define an PAndroid compatibleQ device as one that can run any application written by third-party developers using the Android 7? and F7?. We use this as a filter to separate devices that can participate in the Android app ecosystem, and those that cannot. 7evices that are properly compatible can see+ approval to use the Android trademar+. 7evices that are not compatible are merely derived from the Android source code and may not use the Android trademar+. #n other words, compatibility is a prereGuisite to participate in the Android apps ecosystem. Anyone is welcome to use the Android source code, but if the device isnt compatible, its not considered part of the Android ecosystem. !f my device is compatible% does it automatically have access to Android "arket and branding? Android 4ar+et is a service operated by Google. Achieving compatibility is a prereGuisite for obtaining access to the Android 4ar+et software and branding. 7evice manufacturers should contact Google to obtain access to Android 4ar+et. !s compatibility mandatory? Fo. 'he Android ,ompatibility 3rogram is optional. ince the Android source code is open, anyone can use it to build any +ind of device. )owever, if a manufacturer wishes to use the Android name with their product, or wants access to Android 4ar+et, they must first demonstrate that the device is compatible. )o$ much does compatibility certification cost? 'here is no cost to obtain Android compatibility for a device. 'he ,ompatibility 'est uite is open-source and available to anyone to use to test a device. )o$ long does compatibility take? 'he process is automated. 'he ,ompatibility 'est uite generates a report that can be provided to Google to verify compatibility. $ventually we intend to provide self-service tools to upload these reports to a public database. Who determines $hat $ill be part of the compatibility definition? ince Google is responsible for the overall direction of Android as a platform and product, Google maintains the ,ompatibility 7efinition 7ocument for each release. We draft the ,77 for a new Android version in consultation with a number of O$4s, who provide input on its contents. )o$ long $ill each Android version be supported for ne$ devices? ince Androids code is open-source, we cant prevent someone from using an old version to launch a device. #nstead, Google chooses not to license the Android 4ar+et client software for use on versions that are considered obsolete. 'his allows anyone to continue to ship old versions of Android, but those devices wont use the Android name and will e%ist outside the Android apps ecosystem, "ust as if they were non-compatible. ,an a device have a different user interface and still be compatible?

'he Android ,ompatibility 3rogram focuses on whether a device can run thirdparty applications. 'he user interface components shipped with a device -such as home screen, dialer, color scheme, and so on. does not generally have much effect on third-party apps. As such, device builders are free to customi!e the user interface as much as they li+e. 'he ,ompatibility 7efinition 7ocument does restrict the degree to which O$4s may alter the system user interface for areas that do impact third-party apps. When are compatibility definitions released for ne$ Android versions? Our goal is to release new versions of Android ,ompatibility 7efinition 7ocuments -,77s. once the corresponding Android platform version has converged enough to permit it. While we cant release a final draft of a ,77 for an Android software version before the first flagship device ships with that software, final ,77s will always be released after the first device. )owever, wherever practical we will ma+e draft versions of ,77s available. )o$ are device manufacturers7 compatibility claims validated? 'here is no validation process for Android device compatibility. )owever, if the device is to include Android 4ar+et, Google will typically validate the device for compatibility before agreeing to license the 4ar+et client software.

=. What are the +ey components of Android Architecture?


Android Architecture consists of 2 key components3 / Linu# 4ernel / Libraries / Android Framework / Android Applications

2$ What are the ad anta!es of ha in! an emulator within the %ndroid en ironment?
/ 'he emulator allows the developers to work around an interface which acts as if it were an actual mobile device / 'hey can write, test and debug the code / 'hey are safe for testing the code in early design phase

3$ Tell us somethin! a,out acti ity*reator?


/ An activity;reator is the initial step for creation of a new Android pro*ect / It consists of a shell script that is used to create new file system structure re$uired for writing codes in Android I("

4$ What do you 'now a,out 6ntents?


/ %otification messages to the user from an Android enabled device can be displayed using Intents 'he users can respond to intents / 'here are two types of Intents / "#plicit Intent, Implicit Intent

5$ What is an 7&plicit 6ntent?


/ "#plicit intent specifies the particular activity that should respond to the intent / 'hey are used for application internal messages

6$ What is an 6mplicit 6ntent?


/ In case of Implicit Intent, an intent is *ust declared / It is for the platform to find an activity that can respond to it / !ince the target component is not declared, it is used for activating components of other applications

"$ What do intent filters do?


/ 'here can be more than one intents, depending on the services and activities that are going to use them / "ach component needs to tell which intents they want to respond to / Intent filters filter out the intents that these components are willing to respond to

G$ Where are lay out details placed? Why?


/ Layout details are placed in L-L files / L-L/based layouts provide a consistent and standard means of setting 8>I definition format

H$ What do containers hold?


/ ;ontainers hold ob*ects and widgets in a specified arrangement / 'hey can also hold labels, fields, buttons, or child containers

1I$ What is .rientation?


/ ,rientation decides if the LinearLayout should be presented in row wise or column wise fashion / 'he values are set using set,rientationDE / 'he values can be ),7I\,%'AL or &"7'I;AL

11$ What is it important to set permissions in app de elopment?


/ ;ertain restrictions to protect data and code can be set using permissions / In absence of these permissions, codes could get compromised causing defects in functionality

12$ What is %64:?


/ AI(L is the abbreviation for Android Interface (efinition Language / It handles the interface re$uirements between a client and a service to communicate at the same level through interprocess communication / 'he process involves breaking down ob*ects into primitives that are Android understandable

13$ What data types are supported ,y %64:?


AI(L supports following data types3 /string /List /-ap /char!e$uence and /all native .ava data types like int,long, char and @oolean

14$ Tell us somethin! a,out nine=patch ima!e$


/ 'he %ine/patch in the image name refers to the way the image can be resi?ed3 2 corners that are unscaled, 2 edges that are scaled in K a#is, and the middle one that can be scaled into both a#es / A %ine/patch image allows resi?ing that can be used as background or other image si?e re$uirements for the target device

15$ Which dialo! ,o&es are supported ,y android?


Android supports 2 dialog bo#es3 a E Alert(ialog3 Alert dialog bo# supports F to A buttons and a list of selectable elements which includes check bo#es and radio buttons b E 9rogress(ialog3 'his dialog bo# is an e#tension of Alert(ialog and supports adding buttons It displays a progress wheel or bar c E (ate9icker(ialog3 'he user can select the date using this dialog bo#

d E 'ime9icker(ialog3 'he user can select the time using this dialog bo#

16$ What is 4al i' 5irtual /achine?


/ It is AndroidCs virtual machine / It is an interpreter/only virtual machine which e#ecutes files in (alvik "#ecutable D de#E format 'his format is optimi?ed for efficient storage and memory/mappable e#ecution

Vous aimerez peut-être aussi