tag:blogger.com,1999:blog-90067128150884811382024-03-13T15:08:12.916-07:00Android Interview Question Answer for Fresher and ExperienceThis blog is dedicated to fresher and experience interviewee who are looking for job or job change.It will be helpful to crack interview for android. Rakesh Tiwarihttp://www.blogger.com/profile/13263358702361959168noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-9006712815088481138.post-59242070561646644362015-06-04T05:41:00.000-07:002015-06-04T05:42:10.584-07:00Android Interview Question and Answer for Fresher and Experience<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";"><b>Ques 1.What is android ?</b> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";"><b>Ans.</b> </span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">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 language byte code which later transforms into
.dex format files.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";"><b>Ques </b></span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">2.Explain the
Architecture of Android ? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">-> <b>Applications</b>
(Home Contacts Browser Phone etc) <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">-> <b>Application
Framework</b> (Activity Manager Window Manager Content Providers View System
Package manager <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Telephony
manager Resource manager Notification manager Location manager) <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">-> <b>System
Libraries</b> (Like SurfaceManager SQLite webkit SSL SGL OpenGL|ES Media
Framework Free Type libc etc) & Android Runtime( Core Libraries and DVM). <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">-> <b>Linux
Kernel</b> (which composed of drivers like display camera Flash Memory
Binder(IPC) Keypad Wi-Fi Audio Power
Management etc.) <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";"><b>Ques 3.What are the advantages
of Android ?<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif";">Ans. </span></b><span style="font-family: "Times New Roman","serif";"> </span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Following are the advantages of Android:
<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">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.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Features like
weather details live RSS feeds opening screen icon on the opening screen can be
customized. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Innovative
products like the location-aware services location of a nearby convenience
store etc. are some of the additive facilities in Android. Components can be
reused and replaced by the application framework. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Optimized DVM
for mobile devices<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">SQLite enables
to store the data in a structured manner.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Supports GSM
telephone and Bluetooth WiFi 3G and EDGE technologies<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The development
is a combination of a device emulator debugging tools memory profiling and
plug-in for Eclipse IDE. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";"><b>Ques 4. </b></span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">What are the
components of Android ?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><b>Ans.</b></span><span style="font-family: "Times New Roman","serif";"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Activities</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">: It displays
the UI and handles the user interaction to the smart-phone screen.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Services</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">: It handle
background processing without display any UI associated with an application.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Broadcast
Receivers</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">:
It provide communication between Android OS and applications.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Content
Providers</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">:
It handle data processing and database management issues.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";"><b>Ques 5.</b></span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> What is an
activity ?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">A single screen
in an application with supporting Java code. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">An activity
presents a visual user interface for one focused endeavor the user can
undertake. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">For example an
activity might present a list of menu items users can choose from or it might
display photographs along with their captions. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">An activity is
implemented as a subclass of Activity class as follows:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">public class
MainActivity extends Activity { }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";"><b>Ques 6.</b></span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> What is life
cycle of Activity ? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><b>Ans. </b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: Symbol; font-size: 11.5pt; mso-bidi-font-family: Symbol;">· </span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onCreate() This is the first callback and called when the activity is
first created.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: Symbol; font-size: 11.5pt; mso-bidi-font-family: Symbol;">· </span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onStart() This callback is called when the activity becomes visible
to the user.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: Symbol; font-size: 11.5pt; mso-bidi-font-family: Symbol;">· </span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onResume() This is called when the user starts interacting with the
application.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: Symbol; font-size: 11.5pt; mso-bidi-font-family: Symbol;">· </span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onPause() The paused activity does not receive user input and cannot
execute any code and called when the
current activity is being paused and the previous activity is being resumed.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: Symbol; font-size: 11.5pt; mso-bidi-font-family: Symbol;">· </span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onStop() This
callback is called when the activity is no longer visible.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: Symbol; font-size: 11.5pt; mso-bidi-font-family: Symbol;">· </span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onDestroy() This callback is called before the activity is destroyed by the
system.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onRestart() This callback is called when the activity
restarts after stopping it.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";"><b>Ques 7.</b></span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> What is service
? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.</span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">A service is an application
component that can run some long running task in the background without the
need for a user interface. Some other application component can start the
service and this service will then keep on running even if the user switches to
another application. It can declare the service as private in the manifest file
and block access from other applications.</span> <span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">A service runs in the main thread of its
hosting process—the service does not create its own thread and does not run in
a separate process.</span> <span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">To
ensure your app is secure always use an explicit intent when starting or
binding your Service and do not declare intent filters for the service.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">For example 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.Each service extends the Service base class.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">public class
MyService extends Service { }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">A service can
essentially take two states:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Started:</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> A service is started when an application
component such as an activity starts it by calling startService(). Once started
a service can run in the background indefinitely even if the component that
started it is destroyed.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Bound:</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> A service is bound when an application
component binds to it by calling bindService(). A bound service offers a
client-server interface that allows components to interact with the service
send requests get results and even do so across processes with interprocess
communication (IPC).<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 8.</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> What is life
cycle of service ? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">startService(Intent
Service)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.75in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">This you must
call to start un-bounded serviec<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onCreate()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.75in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">This method is
Called when the service is first created<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onStartCommand(Intent
intent int flags int startId)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.75in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">This method is
called when service is started<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onBind(Intent
intent)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.75in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">This method you
must call if you want to bind with activity<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onUnbind(Intent
intent)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.75in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">This method is
Called when the service will un-binded from activity<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onRebind(Intent
intent)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.75in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">This method is
called when you want to Re-bind service after calling un-bind method <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onDestroy()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.75in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">This method is
called when The service is no longer used and is being destroyed <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 9.</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> What is
broadcast receiver ? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Broadcast
Receivers simply respond to broadcast messages from other applications or from
the system.</span><span style="font-family: "Times New Roman","serif";"> </span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">A broadcast
receiver is implemented as a subclass of BroadcastReceiver class and each
message is broadcasted as an Intent object. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">public class
MyReceiver extends BroadcastReceiver { }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 10.</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> What is content
provider ? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">A content
provider component supplies data from one application to others on request.
Such requests are handled by the methods of the ContentResolver class. The data
may be stored in the file system the database or somewhere else entirely. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">A content
provider is implemented as a subclass of ContentProvider class and must
implement a standard set of APIs that enable other applications to perform
transactions. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">public class
MyContentProvider extends
ContentProvider { } <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 11.</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> What are the
addition components of Android? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Fragments</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">: Represents a
behavior or a portion of user interface in an Activity. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Views</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">: UI elements
that are drawn onscreen including buttons lists forms etc.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Layouts</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">: View
hierarchies that control screen format and appearance of the views.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Intents</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">: Messages
wiring components together.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Resources</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">: External
elements such as strings constants and drawables pictures.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Manifest</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">: Configuration
file for the application.<b><o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques </span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">12.What are
fragments in Android Activity ? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. Fragment
represents a behavior or a portion of user interface in an Activity. And it is
a self-contained component with its own UI and lifecycle.<b><o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 13.</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> What is life
cycle of fragment ? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">. Android
fragments have their own life cycle very similar to an android activity. This
section briefs different stages of its life cycle.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Phase I:</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> When a fragment
gets created it goes through the following states:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onAttach()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onCreate()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onCreateView()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onActivityCreated()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Phase II:</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> When the
fragment becomes visible it goes through these states:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onStart()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onResume()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Phase III:</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> When the
fragment goes into the background mode it goes through these states:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onPaused()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onStop()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Phase IV:</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> When the
fragment is destroyed it goes through the following states:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onPaused()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onStop()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onDestroyView()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onDestroy()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">onDetach()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 14.</span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> <b>Difference
between Activity and FragmentActivity ? <o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">. Fragment is a
part of an activity which contributes its own UI to that activity. Fragment can
be thought like a sub activity. Where as the complete screen with which user
interacts is called as activity. An activity can contain multiple
fragments.Fragments are mostly a sub part of an activity.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">An activity may
contain 0 or multiple number of fragments based on the screen size. A fragment
can be reused in multiple activities so it acts like a reusable component in
activities.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">A fragment can't
exist independently. It should be always part of an activity. Where as activity
can exist without any fragment in it.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Following are
important points about fragment:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">A fragment has
its own layout and its own behavior with its own lifecycle callbacks.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">You can add or
remove fragments in an activity while the activity is running.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">You can combine
multiple fragments in a single activity to build a multi-pane UI.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">A fragment can
be used in multiple activities.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Fragment life
cycle is closely related to the lifecycle of its host activity.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">when the
activity is paused all the fragments available in the acivity will also be
stopped.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">A fragment can
implement a behavior that has no user interface component.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Fragments were
added to the Android API in Honeycomb version of Android which API version 11.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 15.</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> What is
view ? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">View is the base class for widgets which
are used to create interactive UI components like buttons text fields etc.<b><o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 16.</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> What is layout ?
</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. A layout
may contain any type of widgets such as buttons labels textboxes and so on.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 17.</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> What is intent
?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.</span><span style="font-family: "Times New Roman","serif";"> </span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Intent is an object carrying an
intent i.e. message that is passed between components (such as activities
content providers broadcast receivers services etc. except for content
Provider) within the application or outside the application. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">It is mainly
used to:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Start the service<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Launch an
activity<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Display a web
page<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Display a list
of contacts<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Broadcast a
message<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Dial a phone
call etc.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques </span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">18.How many type
of Intent ? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. Two types
of Intent:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.75in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">implicit and <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.75in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">explicit<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Explicit Intent</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">: Explicit
Intent specifies the component. In such case intent provides the external
targeted activity or class to be invoked.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">// Explicit
Intent by specifying its class name<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Intent i = new
Intent(this TargetActivity.class);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">i.putExtra(key1 Name);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">i.putExtra(key2 Emil);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">// Starts
TargetActivity<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">startActivity(i);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Implicit Intent</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">: <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Implicit Intent
doesn't specifiy the component. In such case intent provides information of
available components provided by the system that is to be invoked.</span><span style="font-family: "Times New Roman","serif";"> </span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Implicit intents are often used to
activate components in other applications<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">// Implicit
Intent by specifying a URI<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Intent i = new
Intent(Intent.ACTION_VIEW <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Uri.parse(http://www.example.com));<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">// Starts
Implicit Activity<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">startActivity(i);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 19.</span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> <b>What is
resource ? <o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.</span><span style="font-family: "Times New Roman","serif";"> </span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Resources like static content
that code uses such as bitmaps colors layout definitions user interface strings
animation instructions and more. These resources are always maintained
separately in various sub-directories under res/ directory of the project.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 20.</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> What is
manifest ? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.</span><span style="font-family: "Times New Roman","serif";"> </span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The components and settings of an
Android application are described in the AndroidManifest.xml file. Before
running any application code has to mention required permission activity
services receiver etc in manifest file.</span><span style="font-family: "Times New Roman","serif";">
</span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">This
file is read by the Android system during installation of the application. The
Android system evaluates this configuration file and determines the
capabilities of the application.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 21.</span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> <b>What is
viewGroup ?<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.</span><span style="font-family: "Times New Roman","serif"; font-size: 9.0pt;"> </span><span style="font-family: "Times New Roman","serif";">The <b>ViewGroup</b> is
a subclass of <b>View</b> and provides invisible container that hold
other Views or other ViewGroups and define their layout properties.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 22.</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> What are the
types of layout ? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. There are
number of Layouts provided by Android which you will use in almost all the
Android applications to provide different view look and feel.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Linear Layout: </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">LinearLayout is
a view group that aligns all children in a single direction vertically or
horizontally.<b><o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Relative Layout:
</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">RelativeLayout
is a view group that displays child views in relative positions.<b><o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Table Layout</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">: TableLayout is
a view that groups views into rows and columns.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Absolute Layout</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> :AbsoluteLayout
enables you to specify the exact location of its children.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Frame Layout</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> :The
FrameLayout is a placeholder on screen that you can use to display a single
view.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">List View</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> :ListView is a
view group that displays a list of scrollable items.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Grid View</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> : GridView is a
ViewGroup that displays items in a two-dimensional scrollable grid.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 23.</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> Explain about
the exceptions of Android ? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The following
are the exceptions that are supported by Android<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">InflateException
: When an error conditions are occurred this exception is thrown<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Surface.OutOfResourceException:
When a surface is not created or resized this exception is thrown <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">SurfaceHolder.BadSurfaceTypeException:
This exception is thrown from the lockCanvas() method when invoked on a Surface
whose is SURFACE_TYPE_PUSH_BUFFERS <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">WindowManager.BadTokenException:
This exception is thrown at the time of trying to add view an invalid
WindowManager.LayoutParamstoken. <b> </b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 24.</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> Describe the
APK format <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">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. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 25.</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> What is .apk
extension ?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">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. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 26.</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> What is .dex
extension?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Android programs
are compiled into .dex (Dalvik Executable) files which are in turn zipped into
a single .apk file on the device. .dex files can be created by automatically
translating compiled applications written in the Java programming language. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Is the
innovative web software and mobile application development company which
provides services across the country by expert team of software engineers at
reasonable cost. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 27.</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> How to Remove
Desktop icons and Widgets ?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Press and Hold
the icon or widget. The 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 <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques </span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">28. Describe a
real time scenario where android can be used ?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans .</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Imagine a
situation that you are in a country where no one understands the language you
speak and you can not read or write. However you have mobile phone with you. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 29.</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> What languages
does Android support for application development ? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Android
applications are written using the Java programming language. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques 30.</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> What is the
Android Open Source Project ?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">We use the
phrase Android Open Source Project or AOSP to refer to the people the processes
and the source code that make up Android. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">31. What is the
latest Facebook SDK version?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Facebook Android
SDK 3.22<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">32. What is the
latest PayPal SDK version?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">PayPal Android
SDK Release 2.8.4 one month ago<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 33. What is the
latest Twitter SDK version?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans<b> <o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Twitter twitter4j
Android SDK Release Latest version: 1.1.1 one month ago<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques </span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">34. Why did we
open the Android source code?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Google started
the Android project in response to our own experiences launching mobile apps.
We wanted to make sure that there would always be an open platform available
for carriers OEMs and developers to use to make their innovative ideas a
reality. We 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. The single most important goal of the Android Open-Source Project
(AOSP) is to make sure that the open-source Android software is implemented as
widely and compatibly as possible to everyone’s benefit. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques </span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">35. Why cannot
you run standard Java bytecode on Android?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Android uses
Dalvik Virtual Machine (DVM) which requires a special bytecode. We need to
convert Java class files into Dalvik Executable files using an Android tool
called dx. In normal circumstances developers will not be using this tool
directly and build tools will care for the generation of DVM compatible files. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 36. Can you
deploy executable JARs on Android? Which packaging is supported by Android?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">No. Android
platform does not support JAR deployments. Applications are packed into Android
Package (.apk) using Android Asset Packaging Tool (aapt) and then deployed on
to Android platform. Google provides Android Development Tools for Eclipse that
can be used to generate Android Package. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques </span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">37. Android application
can only be programmed in Java?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">False. You can
program Android apps in C/C++ using NDK . <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 38. What is an
action?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The Intent
Sender desires something or doing some task <b><o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 39. What are
Dalvik Executable files?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Dalvik
Executable files have .dex extension and are zipped into a single .apk file on
the device. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 40. How does
Android system track the applications?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Android system
assigns each application a unique ID that is called Linux user ID. This ID is
used to track each application. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 41. When does
Android start and end an application process?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Android starts
an application process when application's component needs to be executed. It
then closes the process when it's no longer needed (garbage collection). <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 42. How can two
Android applications share same Linux user ID and share same VM?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The applications
must sign with the same certificate in order to share same Linux user ID and
share same VM. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 43. What is an
Intent?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">class (Intent)
which describes what a caller desires to do. The caller will send this intent
to Android's intent resolver which finds the most suitable activity for the
intent. E.g. opening a PDF document is an intent and the Adobe Reader apps will
be the perfect activity for that intent (class). <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 44. <b>What is
a Sticky Intent?<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Sticky Intent is
also a type of Intent which allows a communication between a function and a
service sendStickyBroadcast() performs a sendBroadcast(Intent) known as sticky
i.e. the Intent you are sending stays around after the broadcast is complete so
that others can quickly retrieve that data through the return value of
registerReceiver(BroadcastReceiver IntentFilter). In all other ways this
behaves the same as sendBroadcast(Intent). One example of a sticky broadcast
sent via the operating system is ACTION_BATTERY_CHANGED. When you call
registerReceiver() for that action -- even with a null BroadcastReceiver -- you
get the Intent that was last broadcast for that action. Hence you can use this
to find the state of the battery without necessarily registering for all future
state changes in the battery. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 45. <b>How the
nine-patch Image different from a regular bitmap? Alternatively what is the
difference between nine-patch Image vs regular Bitmap Image? <o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans .It is one
of a resizable bitmap resource which is being used as backgrounds or other
images on the device. The NinePatch class allows drawing a bitmap in nine
sections. The four corners are unscaled; the middle of the image is scaled in
both axes the four edges are scaled into one axis. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 46.</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> <b>What is a
resource? <o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. user
defined JSON XML bitmap or other file injected into the application build
process which can later be loaded from code.<b><o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 47.<b>Does
Android support the Bluetooth serial port profile?Does Android support the
Bluetooth serial port profile? <o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Yes. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 48. <b>How to
Translate in Android? <o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The Google
translator translates the data of one language into another language by using
XMPP to transmit data. You can type the message in English and select the
language which is understood by the citizens of the country in order to reach
the message to the citizens. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 49. <b>What
dialog boxes are supported in Android ?Android supports 4 dialog boxes:<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 10.0pt;">Ans.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">AlertDialog: An
alert dialog box supports 0 to 3 buttons and a list of selectable elements
including check boxes and radio buttons. Among the other dialog boxes the most
suggested dialog box is the alert dialog box. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">ProgressDialog:
This dialog box displays a progress wheel or a progress bar. It is an extension
of AlertDialog and supports adding buttons. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">DatePickerDialog:
This dialog box is used for selecting a date by the user. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">TimePickerDialog:
This dialog box is used for selecting time by the user. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 50.Features of
Android: <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Application
framework enabling reuse and replacement of components <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Dalvik virtual
machine optimized for mobile devices <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Integrated
browser based on the open source WebKit engine <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Optimized
graphics powered by a custom 2D graphics library; 3D graphics based on the
OpenGL ES 1.0 specification (hardware acceleration optional) <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">SQLite for
structured data storage <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Media support
for common audio video and still image formats (MPEG4 H.264 MP3 AAC AMR JPG PNG
GIF) <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">GSM Telephony
(hardware dependent) <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Bluetooth EDGE
3G and WiFi (hardware dependent) <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Camera GPS
compass and accelerometer (hardware dependent) <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Rich development
environment including a device emulator tools for debugging memory and
performance profiling and a plugin for the Eclipse IDE. <b><o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><br /></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><br /></span></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><span style="margin-left: auto; margin-right: auto;"><a href="https://play.google.com/store/apps/details?id=com.rakesht.android.interview" target="_blank"><img alt="Android Interview Question Answer" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh36B31E0RHMuOVmEkDSVteTOKFQgV6IgO46SYfysOb9l-_dIkgXOmBwzVdg1t1nHVoauSuW9AROG9KNVkWOh4dxXFbHfTgQrpscoqNyWJR5l9Qgdp5yorCEQeC51MvS-X0RjXrYy5m0AU/s1600/interview+cracker+for+android-.png" title="Android Interview Question Answer" /></a></span></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="https://play.google.com/store/apps/details?id=com.rakesht.android.interview" target="_blank">Android Interview Question Answer</a></td></tr>
</tbody></table>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><br /></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><br /></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 51.What is an
Application ?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. 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. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 52.What is a
Content Provider ?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. A class
built on ContentProvider that handles content query strings of a specific
format to return data in a specific format. See Reading and writing data to a
content provider for information on using content providers. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 53. What is a
Dalvik ?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. The name of
Android’s virtual machine. The Dalvik VM is an interpreter-only virtual machine
that executes files in the Dalvik Executable (.dex) format a format that is
optimized for efficient storage and memory-mappable execution. The virtual
machine is register-based and it can run classes compiled by a Java language
compiler that have been transformed into its native format using the included dx
tool. The VM runs on top of Posix-compliant operating systems which it relies
on for underlying functionality (such as threading and low level memory
management). The Dalvik core class library is intended to provide a familiar
development base for those used to programming with Java Standard Edition but
it is geared specifically to the needs of a small mobile device. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 54.What is an
DDMS ? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. Dalvik
Debug Monitor Service a GUI debugging application shipped with the SDK. It
provides screen capture log dump and process examination capabilities. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 55.What is
Drawable? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. 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.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 56. Android
latest Version? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. Android
5.1(Android L)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 57.How many
ways data stored in Android? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">1.SharedPreferences
<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">2.Internal
Storage <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">3.External
Storage <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">4.SQLite
Database <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">5.Network
connection <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 58. <b>Types of
Android applications? <o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">1.Foreground <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">2.Background <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">3.Intermittent <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">4.Widget <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 59. <b>Android
Development Tools? <o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. The Android
SDK and Virtual Device Manager Used to create and manage Android Virtual
Devices (AVD) and SDK packages. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The Android
Emulator An implementation of the Android virtual machine designed to run
within a virtual device on your development computer. Use the emulator to test
and debug your Android applications. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Dalvik Debug
Monitoring Service(DDMS) Use the DDMS perspective to monitor and control the
Dalvik virtual machines on which your debugging your application. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Android Asset
Packaging Tool(AAPT) Constructs the destributable Android packages files
(.apk). <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Android Debug
Bridge(ADB) A client-server application that provedes a link to a running
emulator.It lets you copy files install compiled application packages(.apk)and
run shell commands. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 60.<b>Implicit
Intents and Late Runtime Binding? <o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. An implicit
Intent is mechanism that lets anonymous application components service action
request. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">That means you
can ask the system to launch an Activity that can perform a given action
without knowing which application or Activity will do so. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 61. What are
Native Android Actions? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. Native
Android applications also use Intents to launch Activities and sub Activities <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">ACTION-ANSWER
Opens an Activity that handles immediately initiates a call using the number
supplied in the Intent URI. Genereally it's considered better from to use
ACTION_DIAL if possible. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">ACTION_DELETE
Starts an Activity hat lets you delete the data specified at that Intent's data
URI. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">ACTION_DIAL
Brings up a dialer application with the number to dial pre-populated from the
Intent URI. By default this is handled by the native Android phone dialer. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">ACTION_EDIT
Requests an Activity that can edit that data at the specified Intent URI. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">ACTION_INSERT <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">ACTION_PICK <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">ACTION_SEARCH <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">ACTION_SENDTO <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">ACTION_SEND <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">ACTION_VIEW <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">ACTION_WEB_SEARCH
<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 62.<b>What is
Pending Intent? <o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.The
PendingIntent class provides a mechanism for creating Intents that can be fired
by another application at a later time. A pending Intent is commonly used to
package an Intent will be fired in response to a future eventsuch as a widget
View being clicked or a Notification being selected from the notification
panel. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 63. <b>What is
Adapter? <o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. Adapter are
bridging classes that bind data to Views(such as List Views) used in the user
interface. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The adapter is
responsible for creating for creating the child Views used to represent each
item within <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">the parent View
and providing access to the underlying data. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 64.What is
In-app Billing?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">. In-app Billing
on Google Play provides a straightforward simple interface for sending In-app
Billing requests and managing In-app Billing transactions using Google Play.</span><span style="font-family: "Times New Roman","serif";"> </span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Google Play app then conveys
billing requests and responses between your application and the Google Play
server.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">In practice your
application never directly communicates with the Google Play server. Instead
your application sends billing requests to the Google Play application over
interprocess communication (IPC) and receives responses from the Google Play
app. Your application does not manage any network connections between itself
and the Google Play server.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">In-app Billing
can be implemented only in applications that you publish through Google Play.
To complete in-app purchase requests the Google Play app must be able to access
the Google Play server over the network.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">In-app billing
Version 3 is the latest version supported on devices running Android 2.2 or
higher that have the latest version of the Google Play store installed.<b><o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 65. What are
the steps to implement In-app Billing?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">. To implement
In-app Billing in your application you need to do the following:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Add the In-app
Billing library to your project.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Update your
AndroidManifest.xml file.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Create a
ServiceConnection and bind it to IInAppBillingService.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Send In-app
Billing requests from your application to IInAppBillingService.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Handle In-app
Billing responses from Google Play.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">To give your app
the necessary permission:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><uses-permission
android:name=com.android.vending.BILLING /><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 66. What is Web
Service?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">. A web service
is a standard for exchanging information between different types of
applications irrespective of language and platform. For example an android
application can interact with java or .net application using web services.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 67. Describe
Android XML parsing using SAX parser ?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">. Android
provides the facility to parse the xml file using SAX DOM etc. parsers. The SAX
parser cannot be used to create the XML file It can be used to parse the xml
file only.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Advantage of SAX
Parser over DOM<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">It consumes less
memory than DOM.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 68. Describe
Android XML parsing using DOM parser ?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">. We can parse
the xml document by dom parser also. It can be used to create and parse the xml
file.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Advantage of DOM
Parser over SAX<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">It can be used
to create and parse the xml file both but SAX parser can only be used to parse
the xml file.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Disadvantage of
DOM Parser over SAX<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">It consumes more
memory than SAX.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 69. Describe
Android XMLPullParser ?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Android
recommends to use XMLPullParser to parse the xml file than SAX and DOM because
it is fast.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The
org.xmlpull.v1.XmlPullParser interface provides the functionality to parse the
XML document using XMLPullParser.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Events of
XmlPullParser<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The next()
method of XMLPullParser moves the cursor pointer to the next event. Generally
we use four constants (works as the event) defined in the XMLPullParser
interface.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">START_TAG :An
XML start tag was read.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">TEXT :Text
content was read; the text content can be retrieved using the getText() method.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">END_TAG : An end
tag was read.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">END_DOCUMENT :No
more events are available<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 70. Describe
about Android JSON Parser ? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">. JSON
(Javascript Object Notation) is a programming language . It is minimal textual
and a subset of JavaScript. It is an alternative to XML.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Android provides
support to parse the JSON object and array.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Advantage of
JSON over XML<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 1.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">JSON is faster
and easier than xml for AJAX applications.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 1.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Unlike XML it is
shorter and quicker to read and write.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 1.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">It uses array.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 71. What is
SOAP?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">. SOAP stands for Simple Object Access
Protocol<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">SOAP is a
communication protocol<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">SOAP is for
communication between applications<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">SOAP is a format
for sending messages<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">SOAP
communicates via Internet<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">SOAP is platform
independent<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">SOAP is language
independent<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">SOAP is based on
XML<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">SOAP is simple
and extensible<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">SOAP allows you
to get around firewalls<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">SOAP is a W3C
recommendation<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 72. Why SOAP?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">. It is
important for application development to allow Internet communication between
programs.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Today's
applications communicate using Remote Procedure Calls (RPC) between objects
like DCOM and CORBA but HTTP was not designed for this. RPC represents a
compatibility and security problem; firewalls and proxy servers will normally
block this kind of traffic.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">A better way to
communicate between applications is over HTTP because HTTP is supported by all
Internet browsers and servers. SOAP was created to accomplish this.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">SOAP provides a
way to communicate between applications running on different operating systems
with different technologies and programming languages.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 73. What is
WSDL?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">. WSDL stands
for Web Services Description Language<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">WSDL is written
in XML<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">WSDL is an XML
document<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">WSDL is used to
describe Web services<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">WSDL is also
used to locate Web services<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">WSDL is a W3C
recommendation<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The WSDL
Document Structure<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">A WSDL document
describes a web service using these major elements:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.75in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Element</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> <b>Description</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><types> A container for data type definitions used
by the web service<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><message> A typed definition of the data being
communicated<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><portType> A set of operations supported by one
or more endpoints<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><binding> A protocol and data format specification for a
particular port type<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 74. What is
difference between Service and Intent service?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">When to use?<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The Service can
be used in tasks with no UI but shouldn't be too long. If you need to perform
long tasks you must use threads within Service.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The
IntentService can be used in long tasks usually with no communication to Main
Thread. If communication is required can use Main Thread handler or broadcast
intents. Another case of use is when callbacks are needed (Intent triggered
tasks).</span> <span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">This
is a subclass of Service that uses a worker thread to handle all start requests
one at a time. This is the best option if you don't require that your service
handle multiple requests simultaneously. All you need to do is implement
onHandleIntent() which receives the intent for each start request so you can do
the background work.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">How to trigger?<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The Service is
triggered by calling method startService().<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The IntentService
is triggered using an Intent it spawns a new worker thread and the method
onHandleIntent() is called on this thread.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Triggered From<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The Service and
IntentService may be triggered from any thread activity or other application
component.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Runs On<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The Service runs
in background but it runs on the Main Thread of the application.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The
IntentService runs on a separate worker thread.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Limitations /
Drawbacks<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The Service may
block the Main Thread of the application.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The
IntentService cannot run tasks in parallel. Hence all the consecutive intents
will go into the message queue for the worker thread and will execute
sequentially.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">When to stop?<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">If you implement
a Service it is your responsibility to stop the service when its work is done
by calling stopSelf() or stopService(). (If you only want to provide binding
you don't need to implement this method).<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The
IntentService stops the service after all start requests have been handled so
you never have to call stopSelf().<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 75. What is
database version?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. Database
version specify the current database version which is used.It can be increased
through change the database schema using onUpgrade() method or drop the
existing database and recreate it using onCreate() method.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 76. What is
difference between version code and version number in android manifest?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">version
code(android:versionCode)-</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Version code represents the version of the
application code relative to other versions(means previous .apk release
version).For example at the first release of .apk of app is 1 then after
modification or add any new feature in your app at that time release .apk
version code will be 2.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Version
Name(android:versionName)-</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> It is a string value that represent the release version of application code system
does not use this value for any internal purpose.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">For example: 1.0
or 1.0.0 formate<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">VersionName 1.0
> VersionCode 1<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">VersionName 1.1
> VersionCode 2<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">VersionName 1.2
> VersionCode 3<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">VersionName 2.0
> VersionCode 4<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 77.What is minSdkVersion
targetSdkVersion and maxSdkVersion?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">.
minSdkVersion(android:minSdkVersion) — The minimum version of the Android
platform on which the application will run specified by the platform's API
Level identifier.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">targetSdkVersion(android:targetSdkVersion)
— Specifies the API Level on which the application is designed to run. In some
cases this allows the application to use manifest elements or behaviors defined
in the target API Level rather than being restricted to using only those
defined for the minimum API Level.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">maxSdkVersion(android:maxSdkVersion)
— The maximum version of the Android platform on which the application is
designed to run specified by the platform's API Level identifier. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 78. what is
difference between intent and intent filter in android?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. Intent:Intent
is an object carrying an intent i.e. message that is passed between components
(such as activities content providers broadcast receivers services etc. except
for contentProvider) within the application or outside the application. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Intent-filter:
Intent filter specifies the type of intents it accepts based on the intent's
action data and category.Each intent filter is defined by an
<intent-filter> element in the app's manifest file.An intent filter is
not a secure way to prevent other apps from starting your components. Although
intent filters restrict a component to respond to only certain kinds of
implicit intents<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 79. what is
Admob?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. AdMob is a
leading global mobile advertising network that helps app developers monetize
and promote their mobile and tablet apps with ads.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 80. Difference
between Log and System.out.println?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. if we want
to trace the android project<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">we can do it
using Log class<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">there is some
methods like <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Log.e(TAGMESSAGE)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Log.v(TAGMESSAGE)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Log.w(TAGMESSAGE)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Log.d(TAGMESSAGE)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Log.i(TAGMESSAGE)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Its a static
method of Utils package. put it line by line and u can watch it in the LogCat..<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">thats at enjoy
with android.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">System.out.println()
in android will not run well because there is no Terminal that the app is
corrected to.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">You would be
better off using Log.(d)(v)(e)(i)(w) because there is something actively
monitoring LogCat.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">System.out.println()
will print to LogCat but only after an additional set of System instructions
making it not as efficient.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 81. What is
Google Wallet?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. Google
Wallet is a mobile payment system developed by Google that allows its users to
store debit cards credit cards loyalty cards and gift cards among other things
as well as redeeming sales promotions on their mobile phone.Google Wallet can
use near field communication (NFC) to make secure payments fast and convenient
by simply tapping the phone on any PayPass-enabled terminal at checkout.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 82. What is
AAPT?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. AAPT(Android
Asset Packaging Tool):</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">which is used to list add and remove files in an APK
file package resources crunching PNG files etc.This tool allows you to view
create and update Zip-compatible archives (zip jar apk). It can also compile
resources into binary assets.The apk file for each app contains all of the
information necessary to run your application on a device or emulator such as
compiled .dex files (.class files converted to Dalvik byte code) a binary
version of the AndroidManifest.xml file compiled resources (resources.arsc) and
uncompiled resource files for your application.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 83. What is
difference between sqlite and shared preferences in android?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">. Storing app
data is an essential requirement of most applications. Android lets your store
data using Shared Preferences and Sqlite database. You can use either of them
based on your requirement.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Shared
Preferences<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Shared
Preferences stores data as key-pairs only. Key is required to read data from
it. Reading and storing data in it is very simple .But it’s difficult to store
and read large structured data . It saves
primitives data type like string int booleans floats long etc. It is
best to use Shared Preferences when only small amount of data needs to be
stored eg few app settings user login /password etc.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Sqlite Database<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">It stores
structured data as a database. The data can be queried and hence this makes it
possible to search database. Reading data from sqlite database is slower and
more expensive than shared preferences. SQLite database is useful for just
about anything and very flexible. It is best to use Sqlite when the data to be
stored is large structured and required
searching .eg storing complete user details storing data fetched by http request etc.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 84. Difference
between service and intentService When to use?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The Service can
be used in tasks with no UI but shouldn't be too long. If you need to perform
long tasks you must use threads within Service.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The
IntentService can be used in long tasks usually with no communication to Main
Thread. If communication is required can use Main Thread handler or broadcast
intents. Another case of use is when callbacks are needed (Intent triggered
tasks).<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">How to trigger?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The Service is
triggered by calling method startService().<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The
IntentService is triggered using an Intent it spawns a new worker thread and
the method onHandleIntent() is called on this thread.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Triggered From<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The Service and
IntentService may be triggered from any thread activity or other application
component.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Runs On<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The Service runs
in background but it runs on the Main Thread of the application.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The
IntentService runs on a separate worker thread.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Limitations /
Drawbacks<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The Service may
block the Main Thread of the application.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The
IntentService cannot run tasks in parallel. Hence all the consecutive intents
will go into the message queue for the worker thread and will execute
sequentially.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">When to stop?<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">If you implement
a Service it is your responsibility to stop the service when its work is done
by calling stopSelf() or stopService(). (If you only want to provide binding
you don't need to implement this method).<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The
IntentService stops the service after all start requests have been handled so
you never have to call stopSelf().<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><br /></span></b></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcpnOnQkTR-OxiQs4hoa8rwx9lZkRm6kvGxn1i-RBNA8uYeZQ_v9exuFrEhHONhNBcME_icBzYbMCy_PhpV5bZv3w5okDUN0cVpWy_xArQipv6nImVWsdCtJI04OYKjI4TmFLJvLYDmEc/s1600/interview+cracker+for+android.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Android Interview QA" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcpnOnQkTR-OxiQs4hoa8rwx9lZkRm6kvGxn1i-RBNA8uYeZQ_v9exuFrEhHONhNBcME_icBzYbMCy_PhpV5bZv3w5okDUN0cVpWy_xArQipv6nImVWsdCtJI04OYKjI4TmFLJvLYDmEc/s1600/interview+cracker+for+android.png" title="Android Interview QA" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Android Interview QA</td></tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><br /></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 85</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">. <b>What is
GCM?<o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">. Google Cloud Messaging (GCM) for Android is
a service that allows to send data from third party server (on which app is
running) to user’s Android-powered device which installed GCM integrated app
and also to receive messages from devices on the same connection. The GCM
service handles all aspects of queuing of messages and delivery to the target
Android application running on the target device and it is completely free.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">It is light weight
message containing up to 4kb of payload data. GCM is completely free no matter
how big your messaging needs are and there are so far no quotas.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">GCM connection
servers take messages from a 3rd-party application server (written by you) and
send them to a GCM-enabled Android application (the client app also written by
you) running on a device.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Need Google
Account if the device is running a version lower than Android 4.0.4<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 86. What are
the steps to process of GCM?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Android device
sends SENDER_ID to GCM server for registration.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">After successful
registration GCM server return registration ID to Android Device.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">After getting
registration ID android device send registration ID to web server.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Store GCM
registration ID in our database at server.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Whenever PUSH
notification needed get RegID from our database and send request to GCM with
RegID and message.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">After got Push
notification request GCM send Push notification to Android device.<b><o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 87. Key points
to integrate GCM (Google Cloud Messaging) in Android App?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">. 1. <b>Crating Google API Project</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Open the Google
Developers Consol.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Click on create
project input project name once project is created a page appears that displays
project ID and project Number like project number:</span><span style="font-family: "Times New Roman","serif";"> </span><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">670330092345 later it will use in
project code to as GCM Sender ID.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">2. <b>Enabling
the GCM Service</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">To enable the
GCM service:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">In the sidebar
on the left select APIs & auth.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">In the displayed
list of APIs turn the Google Cloud Messaging for Android toggle to ON.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">3. <b>Obtaining
an API Key</b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">To obtain an API
key:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">In the sidebar
on the left select APIs & auth > Credentials.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Under Public API
access click Create new key.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">In the Create a
new key dialog click Server key.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">In the resulting
configuration dialog supply your server's IP address. For testing purposes you
can use 0.0.0.0/0.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Click Create.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">In the refreshed
page copy the API key. You will need the API key later on to perform
authentication in your application server.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Once finish
these steps have to decide which type GCM connection server want to use HTTP or
XMPP(CSS).<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">GCM HTTP: <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Downstream only:
cloud-to-device.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">3rd-party app
servers send messages as HTTP POST requests and wait for a response. This
mechanism is synchronous and causes the sender to block before sending another
message.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">JSON messages
sent as HTTP POST.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">CCS: <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Upstream and
downstream (device-to-cloud cloud-to-device).<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">3rd-party app
servers connect to Google infrastructure using a persistent XMPP connection and
send/receive messages to/from all their devices at full line speed. CCS sends
acknowledgment or failure notifications (in the form of special ACK and NACK
JSON-encoded XMPP messages) asynchronously.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">JSON messages
encapsulated in XMPP messages.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 88. What are
the permissions to use in manifest file to integrate GCM?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.
<uses-permission android:name=android.permission.INTERNET /><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">permission so
that Android application can send the registration ID to the 3rd party server.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><uses-permission
android:name=android.permission.ACCESS_NETWORK_STATE /><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Network State
Permissions to detect Internet status<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><uses-permission
android:name=android.permission.GET_ACCOUNTS /><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">permission as
GCM requires a Google account (necessary only if if the device is running a
version lower than Android 4.0.4)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><uses-permission
android:name=android.permission.WAKE_LOCK /><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">permission so
the application can keep the processor from sleeping when a message is
received. Optional—use only if the app wants to keep the device from sleeping.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><uses-permission
android:name=com.google.android.c2dm.permission.RECEIVE /><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.75in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">permission so
the Android application can register and receive messages.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><permission
android:name=com.example.gcm.permission.C2D_MESSAGE<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">android:protectionLevel=signature
/><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">permission to
prevent other Android applications from registering and receiving the Android
application's messages. The permission name must exactly match this
pattern—otherwise the Android application will not receive the messages.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><uses-permission
android:name=com.example.gcm.permission.C2D_MESSAGE /><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 89.How to
integrate PayPal with Android Application?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans<b>.</b> To
integrate the MPL into an Android app you need to:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Download the
Android Mobile Payments Library SDK from PayPal and include PayPal_MPL.jar and
the other necessary MPL components in your Android app.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Obtain an AppID
(for testing purposes use the PayPal Sandbox AppID).<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Specify the
PayPal environment you're addressing (for example ENV_SANDBOX or ENV_LIVE) and
the business' PayPal Account as the receiver.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Calculate the
price of the item(s) or service to be purchased and input that value into your
MPL call.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Set the Payment
Type (for example PAYMENT_TYPE_SERVICE or PAYMENT_TYPE_PERSONAL).<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Make the MPL
payment call.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">When you make
the call the customer is presented with an in-app PayPal log in screen and the
payment processing is completed within your app (there is no browser or webview
involved).<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">When the payment
flow is complete MPL returns control to your app.<b><o:p></o:p></b></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 90. How to
inject PayPal jar file in android app?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">To add the library .jar file to an
eclipse project:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Right-click your
project in eclipse and select Properties.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Select Java
Build Path.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Select the
Libraries tab.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Select the Add
Jars button.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Choose
PayPal_MPL.jar from your folder structure and click OK.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 91.What are the
permission need in manifest to integrate PayPal?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><uses-permission
android:name=android.permission.INTERNET /><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"><uses-permission
android:name=android.permission.READ_PHONE_STATE /><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 92. What are
the programming steps to integrate Paypal with andoriud app?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Initialize the
library with the initWithAppID method.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">public void
initLibrary() {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">PayPal pp = PayPal.getInstance();<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">if (pp == null)
{ // Test to see if the library is
already initialized<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">// This main
initialization call takes your Context AppID and target server<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">pp =
PayPal.initWithAppID(this APP-80W284485P519543T PayPal.ENV_NONE);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">// Required
settings:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">// Set the
language for the library<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">pp.setLanguage(en_US);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">// Some Optional
settings:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">// Sets who pays
any transaction fees. Possible values are:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">//
FEEPAYER_SENDER FEEPAYER_PRIMARYRECEIVER FEEPAYER_EACHRECEIVER and
FEEPAYER_SECONDARYONLY<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">pp.setFeesPayer(PayPal.FEEPAYER_EACHRECEIVER);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">// true =
transaction requires shipping<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">pp.setShippingEnabled(true);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">_paypalLibraryInit
= true;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Implement the
getPayButton method.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Add a delegate
to handle the response returned by the library.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The handler will
call one of three types (paymentSucceeded paymentCanceled paymentFailed) based
on the result.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">public void
PayPalActivityResult(int requestCode int resultCode Intent intent) {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">switch
(resultCode) {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">// The payment
succeeded<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">case
Activity.RESULT_OK:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">String payKey =
intent.getStringExtra(PayPalActivity.EXTRA_PAY_KEY);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">this.paymentSucceeded(payKey);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">break;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">// The payment
was canceled<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">case
Activity.RESULT_CANCELED:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">this.paymentCanceled();<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">break;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">// The payment
failed get the error from the EXTRA_ERROR_ID and EXTRA_ERROR_MESSAGE<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">case
PayPalActivity.RESULT_FAILURE:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">String errorID =
intent.getStringExtra(PayPalActivity.EXTRA_ERROR_ID);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">String
errorMessage = intent.getStringExtra(PayPalActivity.EXTRA_ERROR_MESSAGE);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">this.paymentFailed(errorID
errorMessage);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 93. What are
the steps to integrate Facebook using Facebook SDK in android app?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Create a
Development Key Hash<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Go to Facebook
login after login click on profile pick
will get drop-down list click on Developer
Setting and generate 28 character App ID
by putting Package Name App Name and Key Hashes.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Download the
Facebook SDK and unzip it and import the Facebook SDK in Eclipse by follow
steps:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Go to Eclipse's
File > Import Menu<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Select General
> Existing Projects into Workspace<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Browse to the
folder where you unzipped the SDK and click Open<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Uncheck'Copy
projects into workspace' so sample projects retains a correct reference to the
neighboring SDK<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Click Finish to
import the SDK.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">To add the SDK
to an existing Android Project in Eclipse</span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> link your project to the
Facebook SDK library project you imported.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">View the
properties for your project<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Click Android
tab.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Click Add<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Choose
FacebookSDK project from the workspace.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Then add your
Facebook App ID into your project's strings file:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Open your
res/values/strings.xml file<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Add a new string
entry with the name facebook_app_id and value as your Facebook App ID<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Update your
Android Manifest:<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Open your
AndroidManifest.xml file<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">In the
Permissions tab add a new uses-permission: android.permission.INTERNET<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">In the
Application tab add new meta-data with the name com.facebook.sdk.ApplicationId
and the value @string/facebook_app_id<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 94. What are
the steps to integrate Twitter using Twitter SDK in android app? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">First of all
have to register in twitter and register your application and get application
id provided by twitter.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">To register
application have to provide Application Name Description and Website(optional).<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">In the
permission select Read and Write option.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Go to
Application Setting tab and note down the API Key and API Secret to use in
application.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">[ private static
String CONSUMER_KEY = Your API Key here;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">private static
String CONSUMER_SECRET = Your API Secret here;]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Download twitter
SDK(Twitter4j) and add with project by right click on project.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">View the
properties for your project<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Click Android
tab.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Click Add<o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Choose Twitter
SDK project from the workspace.<b> </b><o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 95. What’s so
special about Android? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Unlike the
proprietary iPhone operating system (now known as iOS) which is under the
complete control of Apple — and the same goes for Research in Motion’s
BlackBerry OS or Microsoft’s Windows Phone platform — Google released Android
as an open-source OS under the auspices of the Open Handset Alliance leaving
phone manufacturers (relatively) free to tweak Android as they see fit for a
given handset. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">That’s one thing
that’s special about Android. Another thing is that it just happens to be a
really good OS the first one in the post-iPhone wireless era to really give
Apple a run for its money. Android may not be as sleek or polished as iOS
(that’s my humble opinion at least) but it’s fast and powerful with an
intuitive user interface that’s packed with options and flexibility. It’s also
being constantly improved courtesy of the big brains at Google making the
Android experience sleeker by the day. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 96. Are Android
phones called Droids? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Not necessarily.
Droid is a brand name used by Verizon Wireless for its Android-based phones —
the Droid X the Droid Eris the Droid Incredible and so on. The HTC Evo 4G on
Sprint is not a Droid per se but it’s still an Android smartphone. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 97. Why would I
(potentially) choose an Android phone over an iPhone? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Well for a
variety of reasons — although I should point out that I’m actually a fan of
both operating systems. (Sorry to disappoint the smartphone flame warriors out
there.) <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">One reason to go
the Google way is that Android phones boast tight integration with Google
services like Gmail Google Calendar Google Contacts and Google Voice — perfect
for anyone who uses Google for all their e-mails contacts and events. Indeed
one of the coolest things about Android phones is that the first time you fire
one up you enter your Google user name and password and voila: All your Google
messages contacts and other info start syncing into your new handset
automatically no desktop syncing needed. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Android is also
far more open when it comes to applications. Whereas Apple takes a walled garden
approach to its App Store Google won’t restrict you from installing apps that
aren’t featured in its official Android Marketplace. iPhone users on the other
hand must jailbreak their phones if they want to install apps that weren’t
approved by Apple for inclusion in the App Store. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Last but not
least because Android is open to all manufacturers a wide variety of Android
phones are available to choose from — big and small souped-up and pared-down
some with slide-out keyboards (good luck convincing Steve Jobs to put a
slide-out QWERTY on the iPhone) and some that are all-touchscreen all the time.
Indeed in the past few months a new Android phone has debuted practically every
week while we only get a single new iPhone each year. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 98. What are
the downsides of Android? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Well if you ask
me the Android OS isn’t quite as forgiving to wireless beginners as the iPhone
is. Setting up your e-mail contacts and calendar on Android is a breeze (if
you’re all about Gmail that is) but when it comes to say your music and videos
you’re on your own with Android which lacks an official media syncing client
for the desktop. With the iPhone you do all your syncing on easy-to-use iTunes
which also lets you manage your e-mail accounts contacts apps and photos. Then
again you can only use iTunes for syncing the iPhone while Android users have a
variety of third-party options. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">That’s just one
example but in general Android gives you more options and choices about how you
manage your phone and your mobile content — great for experienced and advanced
users but potentially intimating for new mobiles. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">On the other
hand while beginners might appreciate the (usually) smooth user-friendly
experience that Apple has devised for the iPhone advanced users may (and often
do) get frustrated by Apple’s tight control over what they can and can't do on
the iPhone. It’s a trade-off plain and simple and your choice of platform
depends on what’s right for you. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 99. What is
Mono for Android? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Mono for Android
is a software development kit that allows developers to use the C# language to
create mobile applications for Android-based devices.Mono for Android exposes
two sets of APIs the core .NET APIs that C# developers are familiar with as
well as a C# binding to Android's native APIs exposed through the
Mono.Android.* namespace.You can use Mono for Android to develop applications
that are distributed through the Android Application Stores or to deploy
software to your personal hardware or the Android simulator. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 100. What is
included in Mono for Android? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Mono for Android
consists of the core Mono runtime the Mono for Android bindings to the native
Android APIs a Visual Studio 2010 plugin to develop Android applications and an
SDK that contains the tools to build debug and deploy your applicationsOur
Visual Studio 2010 plugin allows developers to use Visual Studio 2010 to
develop debug and deploy their applications to an Android simulator an Android
device or the Android Application Store. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Our MonoDevelop
IDE also ships an addin to support Mono for Android development. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 3pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 101. What do I
need to develop Mono for Android applications? <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. </span></b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Mono for Android
on Windows provides a plugin for Visual Studio 2010 Professional or better. We
also support Mono for Android development using MonoDevelop on Windows for
users that do not own a copy of Visual Studio 2010 Professional or better.Mono
for Android on Mac developers can use MonoDevelop.On all platforms Mono for
Android requires the Android SDK (which requires Java JDK). <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 102. What are
the features of Android 5.0 Lollipop (API level 21) ?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans.<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Android Runtime
(ART) with ahead-of-time (AOT) compilation and improved garbage collection (GC)
replacing Dalvik that uses just-in-time (JIT) compilation.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Support for
64-bit CPUs<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">OpenGL ES 3.1
and Android Extension Pack (AEP) on supported GPU configurations<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Vector drawables
which scale without losing definition<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Support for
print previews<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Material design
bringing a restyled user interface<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Refreshed lock
screen no longer supporting widgets<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Refreshed
notification tray and quick settings pull-down<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Project Volta
for battery life improvements<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Searches can be
performed within the system settings for quicker access to particular settings<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Lock screen
provides shortcuts to application and notification settings<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Guest logins and
multiple user accounts are available on more devices such as phones.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Audio input and
output through USB devices<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Addition of 15
new languages: Basque Bengali Burmese Chinese (Hong Kong) Galician Icelandic
Kannada Kyrgyz Macedonian Malayalam Marathi Nepali Sinhala Tamil and Telugu<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Tap and Go
allows users to quickly migrate to a new Android device using NFC and Bluetooth
to transfer Google Account details configuration settings user data and
installed applications.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">A
flashlight-style application is included working on supported devices with a
camera flash.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">User-customizable
priorities for application notifications<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 6pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;"> 103. What are
the features of Android 4.4 KitKat (API level 19) ?<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ans. <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Full-screen
Immersive Mode<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Now you can
switch to full-screen to see more and simply swipe from the top or bottom edge
of the screen to get the buttons back.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Ok Google<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">If you're
familiar with Google Glass then you'll know saying 'Ok Glass' will activate
voice control. Well the same is now true for your smartphone except you say 'Ok
Google'. This will let you voice search send a text get directions or play a
song - as long as you're on the homescreen on in Google Now.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Improved multi-tasking<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Multi-tasking is
pretty good in Android already but Google says it's even better in KatKat<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Low-power audio
playback<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Android 4.4
allows for more hours of audio playback up to 60 hours on Nexus 5 according to
Google. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Calls and messages<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The new phone
app orders your contacts based on the ones to interact with most and you can
also search for contacts or nearby places in the search bar.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Printing<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Now you can
print photos documents and web pages directly from your phone or tablet. You
can print to any printer connected to Google Cloud Print HP ePrint printers and
others that have apps in the Google Play Store.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Chrome web view<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Applications
that embed web content now use Chrome to render web components accurately and
quickly.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Device
management built-in<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">If should lose
your precious smartphone or tablet you can find or remote wipe it with Google's
Android Device Manager.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Downloads app
redesign<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Google has given
the Downloads app a redesigned adding a new sorting options plus list and grid
views for all the files you've er downloaded.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Easy home screen
switching<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">If you love
customising to the extent that you have installed one or more home screen
replacements you can switch between them easily in 'Home' section of the
settings menu.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Email app
refresh<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">The Email app
has also had a makeover with a new look nested folders contact photos and
better navigation.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Full-screen
wallpapers with preview<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Wallpapers now
display through the status bar and navigation bar. When picking a new wallpaper
you can preview what it will look like.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">HDR+ photography<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">If you're
getting the Nexus 5 its HDR+ mode snaps a burst of photos and combines them to
give you the best possible single shot.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Infrared
blasting<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Android now
supports applications for remote control of TVs and other nearby devices if you
have an infrared (IR) transmitter.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Location in
Quick Settings<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">There is now a
new tile for location settings in the Quick Settings drop down menu.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Location modes
and monitoring<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">If you make your
battery last longer by constantly switching GPS Wi-Fi and mobile data on and
off then there's an easier way in KitKat. You can choose between 'high
accuracy' and 'battery-saving' location modes in the settings menu. You can
also see which apps have recently requested your location.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Music and
movie-seeking and artwork on the lock screen<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">From the lock
screen you can jump to a specific part of a song or video with a long press on
the play or pause buttons. Artwork is now fills the lockscreen too.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Secure app
sandboxes<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Application
sandboxes have been hardened with Security-Enhanced Linux.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">Step counting
built-in<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt;">If you don't
want to spend money on a fitness gadget then the Nexus 5 can act as a pedometer
to count your steps. Google says updated hardware and software make this a more
battery-friendly way to measure your activity.<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 104. What is the difference between gravity and layout_gravity ?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> android:gravity- sets the
gravity of the content of the View within its used on.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
android:layout_gravity-
sets the gravity of the View or Layout with respect to its parent.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 105. What is difference between padding and margin?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> Padding is the space inside
the border between the border and the actual view's content. Note that padding
goes completely around the content: there is padding on the top bottom right
and left sides (which can be independent). </div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Margins are the
spaces outside the border between the border and the other elements next to
this view. In the image the margin is the grey area outside the entire object.
Note that like the padding the margin goes completely around the content: there
are margins on the top bottom right and left sides. In LinearLayout margin is
supported in AbsoluteLayout (considered obsolete now) - no.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 106. What is marqueeRepeatLimit textview attribute in android?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> The number of times to repeat
the marquee animation. Only applied if the TextView has marquee enabled.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
marquee_forever or -1 Indicates
that marquee should repeat indefinitely.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 107. What is Ems in android?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> Ems is a typography term it
controls text size etc. but only when the layout_width is set to wrap_content.
Other layout_width values override the ems width setting.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 108. What is dp and sp units?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> Different screens have
different pixel densities so the same number of pixels may correspond to
different physical sizes on different devices.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="background: #F9F9F9; color: #222222; font-family: "Arial","sans-serif"; font-size: 10.5pt; line-height: 115%;">When specifying dimensions always use either<span class="apple-converted-space"> </span></span><code><span style="background: #F9F9F9; color: #006600; font-size: 10.0pt; line-height: 115%; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;">dp</span></code><span class="apple-converted-space"><span style="background: #F9F9F9; color: #222222; font-family: "Arial","sans-serif"; font-size: 10.5pt; line-height: 115%;"> </span></span><span style="background: #F9F9F9; color: #222222; font-family: "Arial","sans-serif"; font-size: 10.5pt; line-height: 115%;">or<span class="apple-converted-space"> </span></span><code><span style="background: #F9F9F9; color: #006600; font-size: 10.0pt; line-height: 115%; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;">sp</span></code><span class="apple-converted-space"><span style="background: #F9F9F9; color: #222222; font-family: "Arial","sans-serif"; font-size: 10.5pt; line-height: 115%;"> </span></span><span style="background: #F9F9F9; color: #222222; font-family: "Arial","sans-serif"; font-size: 10.5pt; line-height: 115%;">units.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="background: #F9F9F9; color: #222222; font-family: "Arial","sans-serif"; font-size: 10.5pt; line-height: 115%;">A<span class="apple-converted-space"> </span></span><code><span style="background: #F9F9F9; color: #006600; font-size: 10.0pt; line-height: 115%; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;">dp</span></code><span class="apple-converted-space"><span style="background: #F9F9F9; color: #222222; font-family: "Arial","sans-serif"; font-size: 10.5pt; line-height: 115%;"> </span></span><span style="background: #F9F9F9; color: #222222; font-family: "Arial","sans-serif"; font-size: 10.5pt; line-height: 115%;">is a density-independent pixel that
corresponds to the physical size of a pixel at 160 dpi.<span class="apple-converted-space"> <o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
A sp is the
same base unit but is scaled by the user's preferred text size (it’s a
scale-independent pixel) so you should use this measurement unit when defining
text size (but never for layout sizes).</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 109. What is the fundamental concept to generate images for different
size of screens?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> Since Android runs in devices
with a wide variety of screen densities you should always provide your bitmap
resources tailored to each of the generalized density buckets: low medium high
and extra-high density. This will help you achieve good graphical quality and
performance on all screen densities.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
To generate
these images you should start with your raw resource in vector format and
generate the images for each density using the following size scale:</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
xhdpi: 2.0</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
hdpi: 1.5</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
mdpi: 1.0
(baseline)</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
ldpi: 0.75</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
This means that
if you generate a 200x200 image for xhdpi devices you should generate the same
resource in 150x150 for hdpi 100x100 for mdpi and finally a 75x75 image for
ldpi devices.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Then place the
generated image files in the appropriate subdirectory under res/</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
xlarge screens
are at least 960dp x 720dp</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
large screens
are at least 640dp x 480dp</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
normal screens
are at least 470dp x 320dp</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
small screens
are at least 426dp x 320dp</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 110. What are the directories in an application that provides
different layout designs for different screen sizes and different bitmap
drawables?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> Following are the list of
resource directories in an application that provides different layout designs
for different screen sizes and different bitmap drawables for medium high and
extra-high-density screens.</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
res/layout/my_layout.xml // layout for normal screen size (default)</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
res/layout-large/my_layout.xml // layout for large screen size</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
res/layout-xlarge/my_layout.xml //
layout for extra-large screen size</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
res/layout-xlarge-land/my_layout.xml
// layout for extra-large in landscape
orientation</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
res/drawable-mdpi/my_icon.png // bitmap for medium-density</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
res/drawable-hdpi/my_icon.png // bitmap for high-density</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
res/drawable-xhdpi/my_icon.png // bitmap for extra-high-density</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
res/drawable-xxhdpi/my_icon.png //
bitmap for extra-extra-high-density</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Some values you
might use here for common screen sizes:</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 111.What are the different screen configurations for different
devices?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> 320 for devices with screen
configurations such as:</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
240x320 ldpi
(QVGA handset)</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
320x480 mdpi
(handset)</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
480x800 hdpi
(high-density handset)</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
480 for screens
such as 480x800 mdpi (tablet/handset).</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
600 for screens
such as 600x1024 mdpi (7 tablet).</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
720 for screens
such as 720x1280 mdpi (10 tablet).</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 112. What is Screen Size?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> Actual physical size measured
as the screen's diagonal.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
For simplicity
Android groups all actual screen sizes into four generalized sizes: small
normal large and extra-large.</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 113. What is Screen density?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> The quantity of pixels within
a physical area of the screen; usually referred to as dpi (dots per inch). For
example a low density screen has fewer pixels within a given physical area
compared to a normal or high density screen.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
For simplicity
Android groups all actual screen densities into six generalized densities: low
medium high extra-high extra-extra-high and extra-extra-extra-high.</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 114. What is Orientation?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> The orientation of the screen
from the user's point of view. This is either landscape or portrait meaning
that the screen's aspect ratio is either wide or tall respectively. Be aware
that not only do different devices operate in different orientations by default
but the orientation can change at runtime when the user rotates the device.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 115. What is Resolution?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> The total number of physical
pixels on a screen. When adding support for multiple screens applications do
not work directly with resolution; applications should be concerned only with
screen size and density as specified by the generalized size and density
groups.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 116. What is Density-independent pixel (dp)?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> A virtual pixel unit that you
should use when defining UI layout to express layout dimensions or position in
a density-independent way.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
The
density-independent pixel is equivalent to one physical pixel on a 160 dpi
screen which is the baseline density assumed by the system for a medium density
screen. At runtime the system transparently handles any scaling of the dp units
as necessary based on the actual density of the screen in use. The conversion
of dp units to screen pixels is simple: px = dp * (dpi / 160). For example on a
240 dpi screen 1 dp equals 1.5 physical pixels. You should always use dp units
when defining your application's UI to ensure proper display of your UI on
screens with different densities.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
A set of six
generalized densities:</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
ldpi (low)
~120dpi</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
mdpi (medium)
~160dpi</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
hdpi (high)
~240dpi</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
xhdpi
(extra-high) ~320dpi</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
xxhdpi
(extra-extra-high) ~480dpi</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
xxxhdpi
(extra-extra-extra-high) ~640dpi</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
xlarge screens
are at least 960dp x 720dp</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
large screens
are at least 640dp x 480dp</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
normal screens
are at least 470dp x 320dp</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
small screens
are at least 426dp x 320dp</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 117. How to start another Activity from one Activity?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> Using Intent and
startActivity() method.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Intent intent =
new Intent(Activity1.this Activity2.class);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
startActivity(intent);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 118. What is ViewHolder?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> ViewHolder is use to smooth
scrolling of ListView which keep the application’s main thread free from heavy
processing.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
A ViewHolder
object stores each of the component views inside the tag field of the Layout so
you can immediately access them without the need to look them up repeatedly.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 119. How to implement ViewHolder programmatically?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> First you need to create a
class to hold your exact set of views.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
static class
ViewHolder {</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
TextView text;</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
ImageView icon;</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
ProgressBar
progress;</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
int position;</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
}</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Then populate
the ViewHolder and store it inside the layout.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
ViewHolder
holder = new ViewHolder();</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
holder.icon =
(ImageView) convertView.findViewById(R.id.listitem_image);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
holder.text =
(TextView) convertView.findViewById(R.id.listitem_text);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
holder.progress
= (ProgressBar) convertView.findViewById(R.id.progress_spinner);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
convertView.setTag(holder);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 120. What is getView ?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> Get a View that displays the
data at the specified position in the data set. You can either create a View
manually or inflate it from an XML layout file. When the View is inflated the
parent View (GridView ListView...) will apply default layout parameters unless
you can use inflate(int android.view.ViewGroup boolean) to specify a root view
and to prevent attachment to the root.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 121. Describe getView parameters?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> public abstract View getView
(int position View convertView ViewGroup parent)</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
position: The position of the item within the
adapter's data set of the item whose view we want.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
convertView: The old view to reuse if
possible.If it is not possible to convert this view to display the correct data
this method can create a new view.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Parent: The parent that this view will
eventually be attached to Returns.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 122. What is Adapter?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> An Adapter object acts as a
bridge between an AdapterView and the underlying data for that view. The
Adapter provides access to the data items. The Adapter is also responsible for
making a View for each item in the data set.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 123. How many types of Adapter are used in Android?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> Three types of Adapter are
used in Android:</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
1.ArrayAdapter
: It esxtends BaseAdapter and implement Filterable.
A concrete BaseAdapter that is backed by an array of arbitrary objects. By
default this class expects that the provided resource id references a single
TextView. If you want to use a more complex layout use the constructors that
also takes a field id. That field id should reference a TextView in the larger
layout resource.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
2.CursorAdapter:
It esxtends BaseAdapter and implement
Filterable. The Cursor must include a column named _id or this class will not
work. Additionally using MergeCursor with this class will not work if the
merged Cursors have overlapping values in their _id columns.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
3.SimpleCursorAdapter:
It extends ResourceCursorAdapter. An easy adapter to map columns from a cursor
to TextViews or ImageViews defined in an XML file. You can specify which
columns you want which views you want to display the columns and the XML file
that defines the appearance of these views.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 124. Explain ArrayAdapter parameters?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> public ArrayAdapter (Context
context int resource int textViewResourceId)</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Parameters</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
context:The
current context.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
resource: The
resource ID for a layout file containing a layout to use when instantiating
views.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
textViewResourceId: The id of the TextView within the
layout resource to be populated.</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 125. Explain CursorAdapter parameters?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> public CursorAdapter (Context
context Cursor c boolean autoRequery)</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Constructor
that allows control over auto-requery. It is recommended you not use this but
instead CursorAdapter(Context Cursor int). When using this constructor
FLAG_REGISTER_CONTENT_OBSERVER will always be set.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Parameters</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
context: The
context</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
c: The cursor
from which to get the data.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
autoRequery: If
true the adapter will call requery() on the cursor whenever it changes so the
most recent data is always displayed. Using true here is discouraged.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 126. Explain SimpleCursorAdapter parameters?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> public SimpleCursorAdapter (Context
context int layout Cursor c String[] from int[] to int flags)</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Standard
constructor.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Parameters</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
context: The
context where the ListView associated with this SimpleListItemFactory is
running</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
layout: resource
identifier of a layout file that defines the views for this list item. The
layout file should include at least those named views defined in to</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
c: The database
cursor. Can be null if the cursor is not available yet.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
from: A list of
column names representing the data to bind to the UI. Can be null if the cursor
is not available yet.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
to: The views that should display column in the from
parameter. These should all be TextViews. The first N views in this list are
given the values of the first N columns in the from parameter. Can be null if
the cursor is not available yet.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
flags: Flags
used to determine the behavior of the adapter as per CursorAdapter(Context
Cursor int).</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 127. How to communicate one fragment to another fragment?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> All Fragment-to-Fragment
communication is done through the associated Activity. Two Fragments should
never communicate directly.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
To allow a
Fragment to communicate up to its Activity you can define an interface in the
Fragment class and implement it within the Activity. The Fragment captures the
interface implementation during its onAttach() lifecycle method and can then call
the Interface methods in order to communicate with the Activity.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 128. Programmatically how to send values from one to another fragment?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> ArticleFragment newFragment = new ArticleFragment();</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Bundle args =
new Bundle();</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
args.putInt(ArticleFragment.ARG_POSITION
position);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
newFragment.setArguments(args);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
FragmentTransaction
transaction = getSupportFragmentManager().beginTransaction();</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
transaction.replace(R.id.fragment_container
newFragment);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
transaction.addToBackStack(null);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
transaction.commit();</div>
<div class="MsoNormal" style="margin-left: 19.5pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 129. How to pass value from one Activity to another Activity?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> Using intent can pass value
from one Activity to another Activity.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Intent intent =
new Intent(Activity1.this Activity2.class);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
intent.putExtra(Key
value);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
startActivity(intent);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Get data in
Activity2</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Intent
i=getIntent();</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
String message=i.getStringExtras(Key);</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 130. How to pass int value from one Activity to another Activity?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> Using intent can pass value
from one Activity to another Activity.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b>Activity 1:<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Intent intent =
new Intent(Activity1.this Activity2.class);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
intent.putExtra(Key
int_variable);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
startActivity(intent);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b>Activity 2:<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Intent intent =
getIntent();</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
int temp =
intent.getIntExtra(int_value 0); // here 0 is the default value</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 131. How to pass image from one Activity to another Activity?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> Can pass image using two methods
from one Activity to another Activity.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b>Method One:<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b>Activity 1:<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Intent
intent=new Intent(Activity1.this Activity2.class);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Bundle
bundle=new Bundle();</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
bundle.putInt(imageR.drawable.ic_launcher);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
intent.putExtras(bundle);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
startActivity(intent);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b>Activity :2<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Bundle
bundle=this.getIntent().getExtras();</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
int
pic=bundle.getInt(image);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
v.setImageResource(pic);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b>Method Two:<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b>Activity 1:<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Drawable
drawable=imgv.getDrawable();</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Bitmap bitmap=
((BitmapDrawable)drawable).getBitmap();</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
ByteArrayOutputStream
baos = new ByteArrayOutputStream();</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
bitmap.compress(Bitmap.CompressFormat.PNG
100 baos);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
byte[] b =
baos.toByteArray();</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Intent
intent=new Intent(Activity1.this Activity2.class);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
intent.putExtra(picture
b);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
startActivity(intent);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b>Activity2:<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Bundle extras =
getIntent().getExtras();</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
byte[] b =
extras.getByteArray(picture);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Bitmap bmp =
BitmapFactory.decodeByteArray(b 0 b.length);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
ImageView image
= (ImageView) findViewById(R.id.imageView1);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
image.setImageBitmap(bmp);</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 132. How to expose your private data to other applications?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> Android provides a way for
expose even private data to other applications with a content provider. A
content provider is an optional component that exposes read/write access to
your application data.</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 133. What is Shared Preferences?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> The SharedPreferences class
provides a general framework that allows you to save and retrieve persistent
key-value pairs of primitive data types. You can use SharedPreferences to save
any primitive data: booleans floats ints longs and strings. This data will
persist across user sessions.It also create the user preference to choose the
user prefer setting selection.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 134. How to get shared preferences?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> To get a SharedPreferences
object for your application use one of two methods:</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
getSharedPreferences()
- Use this if you need multiple preferences files identified by name which you
specify with the first parameter.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
getPreferences()
- Use this if you need only one preferences file for your Activity. Because
this will be the only preferences file for your Activity you don't supply a
name.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 135. How to read and write value in shared preferences?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
To write
values:</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
SharedPreferences
sharedPref = getActivity().getPreferences(Context.MODE_PRIVATE);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
SharedPreferences.Editor
editor = sharedPref.edit();</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
editor.putInt(getString(R.string.saved_high_score)
newHighScore);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
editor.commit();</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Call edit() to
get a SharedPreferences.Editor.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Add values with
methods such as putBoolean() and putString().</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Commit the new
values with commit()</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
To read value</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
To retrieve
values from a shared preferences file call methods such as getInt() and
getString() providing the key for the value you want</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
SharedPreferences
sharedPref = getActivity().getPreferences(Context.MODE_PRIVATE);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
int
defaultValue = getResources().getInteger(R.string.saved_high_score_default);</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
long highScore
= sharedPref.getInt(getString(R.string.saved_high_score) defaultValue);</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 136. What is REST?<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
REST stands for
Representational State Transfer. (It is sometimes spelled ReST.) It relies on a
stateless client-server cacheable communications protocol -- and in virtually
all cases the HTTP protocol is used.</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
REST is an
architecture style for designing networked applications. The idea is that
rather than using complex mechanisms such as CORBA RPC or SOAP to connect
between machines simple HTTP is used to make calls between machines.</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
In many ways
the World Wide Web itself based on HTTP can be viewed as a REST-based
architecture. RESTful applications use HTTP requests to post data (create
and/or update) read data (e.g. make queries) and delete data. Thus REST uses
HTTP for all four CRUD (Create/Read/Update/Delete) operations.</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
REST is a
lightweight alternative to mechanisms like RPC (Remote Procedure Calls) and Web
Services (SOAP WSDL et al.). Later we will see how much more simple REST is.</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
Despite being
simple REST is fully-featured; there's basically nothing you can do in Web
Services that can't be done with a RESTful architecture. REST is not a standard.
There will never be a W3C recommendataion for REST for example. And while there
are REST programming frameworks working with REST is so simple that you can
often roll your own with standard library features in languages like Perl Java
or C#.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
One of the best
reference I found when I try to find the simple real meaning of rest.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
REST is using
the various HTTP methods (mainly GET/PUT/DELETE) to manipulate data.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
RESTful
applications use HTTP requests to post data (create and/or update) read data
(e.g. make queries) and delete data. Thus REST uses HTTP for all four CRUD
(Create/Read/Update/Delete) operations.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span><b> 137. REST vs SOAP<o:p></o:p></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%;">Ans.
</span></b> A nice analogy for REST vs.
SOAP is mailing a letter: with SOAP you're using an envelope; with REST it's a
postcard. Postcards are easier to handle (by the receiver) waste less paper
(i.e. consume less bandwidth) and have a short content. (Of course REST
requests aren't really limited in length esp. if they use POST rather than
GET.)</div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
But don't carry
the analogy too far: unlike letters-vs.-postcards REST is every bit as secure
as SOAP. In particular REST can be carried over secure sockets (using the HTTPS
protocol) and content can be encrypted using any mechanism you see fit. Without
encryption REST and SOAP are both insecure; with proper encryption in place
both are equally secure.</div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span> 138. What do you know about
AIDL?<b><span style="font-size: 11.5pt; line-height: 115%; mso-bidi-font-family: "Times New Roman";"> <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-size: 11.5pt; line-height: 115%; mso-bidi-font-family: "Times New Roman";">Ans.
</span></b> AIDL stands for Android Interface Definition
Language. It offers to define the client’s interface requirements and moreover
a service in order to communicate at same level with the help of inter process
communications.<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: .25in; mso-layout-grid-align: none; mso-pagination: none; text-align: justify; text-autospace: none;">
<span style="font-family: "Times New Roman","serif";">Ques</span>
139. What is ANR?<b><span style="font-size: 11.5pt; line-height: 115%; mso-bidi-font-family: "Times New Roman";"> <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-left: .25in; mso-layout-grid-align: none; mso-pagination: none; text-align: justify; text-autospace: none;">
<b><span style="font-size: 11.5pt; line-height: 115%; mso-bidi-font-family: "Times New Roman";">Ans. </span></b> ANR stands for Application Not Responding a
dialog that appears when an application doesn’t respond for more than 10
seconds. It shows the option of force closing the application.<o:p></o:p></div>
<div class="MsoNormal" style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span> 140. What is the role of
Orientation?<b><span style="font-size: 11.5pt; line-height: 115%; mso-bidi-font-family: "Times New Roman";"> <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-size: 11.5pt; line-height: 115%; mso-bidi-font-family: "Times New Roman";">Ans.
</span></b> Orientation is used to determine the presentation
of LinearLayout. It may be presented in rows or columns.<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span> 141. List the data types
supported in AIDL?<b><span style="font-size: 11.5pt; line-height: 115%; mso-bidi-font-family: "Times New Roman";"> <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-size: 11.5pt; line-height: 115%; mso-bidi-font-family: "Times New Roman";">Ans.
</span></b> AIDL supports string list map charSequence and
all type of native java type data types.<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<span style="font-family: "Times New Roman","serif";">Ques</span> 142. What method does Android
follow to track applications?<b><span style="font-size: 11.5pt; line-height: 115%; mso-bidi-font-family: "Times New Roman";"> <o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b><span style="font-size: 11.5pt; line-height: 115%; mso-bidi-font-family: "Times New Roman";">Ans.
</span></b> It is done by assigning each application with
a unique ID (referred as Linux User ID).The question and answer section above
is meant for a newbie to an experienced developer. Moreover these questions are
also arranged by surveying the common question types in an interview which may
help a candidate to prepare beforehand getting acquainted of some basic queries
in relation to implied technology.<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b>Ques 143.What is the upcoming
version of Android OS?</b><o:p></o:p></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b>Ans.</b> Android M is the upcoming
version for Android OS.<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b>Ques 144. Describe some feature
of upcoming version Android M?</b><o:p></o:p></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<b>Ans.</b><o:p></o:p></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
</div>
<ul>
<li>App permissions</li>
<li>Power Saving Doze mode</li>
<li>Apps Auto Backup</li>
<li>App Links</li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 11.5pt; line-height: 115%;">Fingerprint support</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 11.5pt; line-height: 115%;">Mobile payments</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 11.5pt; line-height: 115%;">RAM manager</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 11.5pt; line-height: 115%;">Adoptable Storage Devices</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 11.5pt; line-height: 115%;">Google Now</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 11.5pt; line-height: 115%; text-align: left;"> Google Photos</span></li>
</ul>
<o:p></o:p><br />
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: .25in; text-align: justify;">
<o:p></o:p></div>
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-weight: bold; mso-bidi-language: AR-SA; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-fareast;"><br /></span>
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-weight: bold; mso-bidi-language: AR-SA; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-fareast;"><br /></span>
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-weight: bold; mso-bidi-language: AR-SA; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-fareast;"><br /></span>
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-weight: bold; mso-bidi-language: AR-SA; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-fareast;">For Android App <b><a href="https://play.google.com/store/apps/details?id=com.rakesht.android.interview" target="_blank">Click Here</a>.</b></span><br />
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-weight: bold; mso-bidi-language: AR-SA; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-fareast;"><b><br /></b></span>
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-weight: bold; mso-bidi-language: AR-SA; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-fareast;"><b><br /></b></span>
<span style="font-family: "Times New Roman","serif"; font-size: 11.5pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-weight: bold; mso-bidi-language: AR-SA; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-fareast;"><b><br /></b></span></div>
Rakesh Tiwarihttp://www.blogger.com/profile/13263358702361959168noreply@blogger.com0