You are on page 1of 2

Some Android questions from the web

---------------------------------------
What is a widget?
What is a broadcast?
What is an activity?
The Activity is a foreground task and the closest thing to a UI application on A
ndroid or A single screen in an application, with supporting Java code.
http://developer.android.com/reference/android/app/Activity.html
What is intent?
A class (Intent) describes what a caller desires to do. The caller sends this in
tent to Android's intent resolver, which finds the most suitable activity for th
e intent.
What is a service?
The Service is a background task.
http://developer.android.com/reference/android/app/Service.html
What is a manifest?
The manifest is like an Info.plist but does a lot more. All permissions and syst
em interactions are in the manifest.
http://developer.android.com/guide/topics/manifest/manifest-intro.html
What is an action?
A description of something that an Intent sender desires.
What is a resource?
A user-supplied XML, bitmap, or other file, injected into the application build
process, which can later be loaded from code.
What is a Sticky Intent?
sendStickyBroadcast() performs a sendBroadcast (Intent) that is "sticky," i.e. t
he Intent you are sending stays around after the broadcast is complete, so that
others can quickly retrieve that data through the return value of registerReceiv
er (BroadcastReceiver, IntentFilter). In all other ways, this behaves the same a
s sendBroadcast(Intent).
One example of a sticky broadcast sent via the operating system is ACTION_BATTER
Y_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 re
gistering for all future state changes in the battery.
How will you record a phone call in Android? How to get a handle on Audio Stream
for a call in Android?
Permissions.PROCESS_OUTGOING_CALLS: Allows an application to monitor, modify, or
abort outgoing calls.
What's the difference between file, class and activity in android?
File - It is a block of arbitrary information, or resource for storing informati
on. It can be of any type.
Class - Its a compiled form of .Java file . Android finally used this .class fil
es to produce an executable apk
Activity - An activity is the equivalent of a Frame/Window in GUI toolkits. It i
s not a file or a file type it is just a class that can be extended in Android f
or loading UI elements on view.
Describe the APK format.
The APK file is compressed the AndroidManifest.xml file, application code (.dex
files), resource files, and other files. A project is compiled into a single .ap
k file.
How is nine-patch image different from a regular bitmap?
It is a resizable bitmap resource that can be used for backgrounds or other imag
es on the device. The NinePatch class permits drawing a bitmap in nine sections.
The four corners are unscaled; the four edges are scaled in one axis, and the m
iddle is scaled in both axes.

How do you write apps for multiple screen sizes (no fixed coordinates, use nine
patch drawables, favor density independent pixels over pixel). Tell the intervie
wee that you have not programmed for android and that they should explain the wh
ole area to you in a way you can understand. This also tests the communication s
kills of the person in front of you.
What are the problems publishing to the market, with the fragmentation of Androi
d in multiple OS Versions and multiple phones. (Again let them explain it as if
you are the manager not knowing Android and the Dev needs to justify why he need
s other resources then the Iphone developer)
What is the basic setup of an Android app? You are programming it in Java. But i
t is compiled on a special compiler for android. Does that mean you can't use th
ird party libraries you only get as compiled jar? (No the compiler works on clas
s files.)
How do you define the user interface? (Mostly xml).
What do you have to do to test a new program on a real phone?
What is the result of the compilation process (An apk that bundles resources lik
e image and class files)

You might also like