Elance Android Developer Test Answers 2015



Android layouts are read from which type of file?
res
xaml
xml
txt


What is the recommended IDE for Android by Google
Android Studio
Netbeans
Eclipse ADT
IntelliJ IDEA


You should extend which class when using/creating a database?
SQLiteDatabasehelper
SQLiteDatabase
SQLiteOpenHelper
SQLiteHelper
None of the above


What package encompasses the interactive UI components of Android such as buttons and text fields?
android.widget
android.view
android.view.ViewGroup


What manifest uses-configuration should your application use if your application requires a finger activated touch screen on the device.
<uses-configuration android:reqTouchScreen /> must be in your manifest.
<uses-configuration android:reqTouchScreen="finger" /> must be in your manifest.
<uses-configuration android:reqNavigation="finger" /> must be in your manifest.


Android applications can "borrow" functionality from other applications by using...
application lifecyle methods
intent objects
content Provider system


What are some examples of direct descendants of the android.view object?
Neither of these
Both of these
ProgressBar
ViewGroup


Which event listener is used to handle when an Android device has changed orientation?
DeviceOrientationEventListener
OrientationEventListener
LayoutEventListener
PositioningEventListener


Externalizing resources is an important part of application development because different resources are needed for:
Different devices.
None of these
All of these
Different language versions of the application.


Which subclass of a Preference class displays a list of entries as a dialog?
None of these
MultiSelectListPreference
ListPreference
Both of these


Which tag is used to add "Star Rating" in XML layout file?
Stars
Rating
RatingBar
RatingWidget


Relative layout has two types of orientations: vertical and horizontal.
False
True


True or False? It is possible to give the preferred install location, internal or external memory, in the manifest.xml
false
true


In order to be notified of a device switching from landscape to portrait view, you should:
Both of these
Override the onConfigurationChanged event
Request changes via the android:configChanges="orientation" attribute for activities in your manifest file


What causes an Activity's onDestroy() method to be called.
The Activity called finish().
The Activity that launched this Activity called finishActivity()
All of these reasons.
The Activity is paused or stopped and it's resources were needed by the operating system.


Which of these ListAdapter subclasses is not a direct subclass of BaseAdapter?
CursorAdapter
SimpleAdapter
ArrayAdapter
HeaderViewListAdapter


True or False: The Android operating system is a multi-user Linux system in which each application is a different user.
False
True


Android uses what class to communicate a request for an action to be performed?
Request
Service
Intent
Activity
Broadcast


Every Android application runs in its own process...
with its own instance of the Dalvik Virtual Machine.
with its own instance of the Java Virtual Machine.
within a shared system wide instance of the Dalvik Virtual Machine.


What permission does your application need to use the network?
android.security.INTERNET
The network features do not require a permission
android.permission.NETWORK
android.permission.INTERNET
android.security.NETWORK


The correct way to get pass string in an Intent is (where key and value are both string variables):
intent.putExtra(key,value);
intent.putValue(key,value);
intent.putString(key,value);
intent.putKey(key,value);


What is the key used for an bundle extra parameter on a PendingIntent holding a location?
public static final String KEY_PROXIMITY_ENTERING
public static final String KEY_PROVIDER_ENABLED
public static final String KEY_STATUS_CHANGED
public static final String KEY_LOCATION_CHANGED


Which layout is deprecated since version 2.3?
Table Layout
Frame Layout
Relative Layout
Absolute Layout


In which resource folder do we create an animation file ?
anim
values
drawable
animation
raw


C2DM is deprecated and it was replaced by
GCM
Tokudu
APS
GCS
Polling


Which of the following isn't a valid stage in an Activity's lifecycle?
onPause
onStop
onFinish
onStart
onCreate


What is the proper order of life cycle methods called when an Activity is first run?
onStart(), onCreate(), onResume()
onCreate(), onStart(), onResume()
onStart(), onResume, onCreate()
onCreate(), onResume(), onStart()
onCreate(), onRestart(), onResume()


How do you disable the scrollbars for a webview?
all of these
<WebView android:layout_height="wrap_content" />
<WebView android:scrollbars="none" />
<WebView android:layout_width="wrap_content" />


A layout that organizes its children into a horizontal or vertical stack
FrameLayout
LinearLayout
TableLayout
RelativeLayout


The Android SDK tools compile your application into an Android application (.apk file) which...
then has to be formatted for installation through the Android installer.
contains all the information needed to install the application on an Android device.
contains information needed by the Universal Mobile Installer to create the install package for Android devices.


What is an application component that can perform long-running operations in the background and does not provide a user interface?
Activity
Broadcast receiver
Content-provider
Service


What is the main hardware platform of Android?
ARM architecture
MIPS
x86
None of these


Which of the following is used to detect when a user clicks or taps on a button?
OnClickDetecter
OnTapListener
OnClickListener
OnTouchListener


If your application uses the camera on an Android powered device, the following line should be in your manifest file:
<uses-feature name="camera" />
<uses-feature="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera" />


What function is used to send value from one activity to another?
intent.putextra()
intent.send()
send()
intent.transfer()


Who can submit applications to the Marketplace?
Only Google employees
Only device manufacturers and their employees
Anyone and everyone
Registered Android Market developers


Which is NOT a default value used for a Toast length parameter?
LENGTH_SHORT
LENGTH_LONG
LENGTH_SMALL


Where would we specify which activity should launch first in our app
Main Class file
properties file
All of the above
Manifest file


If you wanted to store a name/value string pair for your Android application, which class would you use?
android.content.Cookies
android.content.SharedPreferences
android.content.Resources


Which of these widgets is an input box for a user to enter text?
TextBox
TextView
Label
EditText


How do you request permissions for your application?
<requires-permission> in the Android Manifest
<uses-permission> in the Android Manifest
Submit a request when you publish your application to the android market
You do not need to request permissions for any application
<request-permission> in the Android Manifest


Which of the following are different types of Android application components?
all of these
activities
services
none of these


Android relies on the Linux kernel for which of the following system services?
Security
Network stack
Neither security nor network stack
Both security and network stack


Do you need to buy an android developer account to start developing and testing applications on Android ?
No
Yes


The Android Manifest file has what extension?
.apk
.jar
.java
.xml


If your application needs to access information about the devices wi-fi networks, you need to specify:
<manifest-permission ="android.permission.ACCESS_WIFI_STATE" />
None of these
Both of these
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />.


What is the first method called in the Activity Lifecycle?
onInit()
onBegin()
onCreate()
onResume()
onStart()


If I set min sdk version to be 8 for an app , on what version(s) will I NOT be able to run the app?
12
10
7
14
8


Which statement correctly changes content of a TextView named textLabel to show "Your Text"?
textLabel = "Your Text";
textLabel.text = "Your Text";
textLabel.setText("Your Text");
textLabel.text("Your Text");


What is the name of component used to display web pages in the application?
Browser
BrowserView
WebBrowser
WebView


Which Virtual Machine (VM) does the android system use?
VMLite
Erlang
Dalvik
KVM


In order to specify layouts so that they adapt to any screen size, specify dimensions in:
Density-independent pixels
Pixels


Your Android application components are defined in the...
AndroidManifest.xml file.
AndroidManifest.pkg file.
myApp.xml file.


Which of the following are versions of Android?
Eclair
Froyo
All of these
Gingerbread


What database is available for developers in Android?
Oracle
There is no available database
SQLite
SQL Server
NoSQL


Which of the following are a function of the manifest file?
all of these
declare the level of user permissions required.
declare the minimum API level required


Android's main programming language is:
C++
Java
VB-Script
JavaScripts


What kernel is Android based on?
XNA
NT Kernel
Mach Kernel
Linux Kernel


Which programming language is used to develop application for the Android platform?
JavaScript
C#
Java


When an asynchronous task is executed, the task goes through several steps, what option isn't a step of an asynchronous task.
onProgressUpdate()
onPostExecute()
onPreExecute()
onBackground()


Which of these is NOT a Layout derived from the ViewGroup class?
LinearLayout
AbsoluteLayout
ListViewLayout
RelativeLayout


Which callbacks in AsyncTask gets executed on main thread
onPostExecute
doInBackground
onProgressUpdate
both onPostExecute and onProgressUpdate


Maximum size of an android app?
1.3 gb
40mb
20mb
4 gb
100mb


If you have a fragment which displays a ListViewContaining query results, which API would you use to bring the data over to the device asynchronously?
android.app.LoaderManager
android.app.ListActivity
android.app.LocalActivityManager


If the UI begins to behave sluggishly or crash while making network calls this is likely due to ....
Activity Manager contains too much
Network Latency
Hardware malfunction
Virus on the server


True or false? Fragments are independent from Activities.
False
True


Which of the following allows you to instantinate a LocationManager class?
LocationManager lm = (LocationManager)SystemServiceFactory.createSystemService(Context.LOCATION_SERVICE);
LocationManager lm = (LocationManager)getSystem().getService(Context.LOCATION_SERVICE);
LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
LocationManager lm = new LocationManager(Context.LOCATION_SERVICE);
LocationManager lm = (LocationManager)Runtime.getSystemServiceInstance(Context.LOCATION_SERVICE);


Which of the following is a public constructor for canvas?
canvas(AttributeSet set)
canvas(Bitmap bitmap)
canvas(Context context)
canvas(int color)


Which of the following is NOT a subclass of TextView?
Button
Image Button
EditText
Radio Button


How to enable overlay mode On API level 11 or higher, to create a custom theme for your activity.
<item name="android:ActionBarOverlay">true</item>
<item name="android:windowActionBarOverlay">true</item>
<item name="ActionBarOverlay">true</item>
<item name="ActionBar:Overlay">true</item>


How do you enable hardware acceleration in android?
permission:hardwareAccelerated="true"
use:permission:hardwareAccelerated="true"
use:hardwareAccelerated="true"
android:permission:hardwareAccelerated="true"
android:hardwareAccelerated="true"


You can control process usage in your Android application by...
neither of these
both of these
using the android:process attribute on the specific component defined in the manifest.
moving your components up in the process lifecycle hierarchy.


What permission is required for your application to use the device's vibrate hardware?
android.security.VIBRATE
android.permission.hardware.VIBRATE
android.hardware.VIBRATE
android.hardware.permission.VIBRATE
android.permission.VIBRATE


Which service is used to perform IPC, when bind application to a service?
service.application.bindService()
activity.bindService()
bindService()
application.bindService()


How do you display the Action Bar back button on all Android versions?
all of the above
none of the above
getSupportActionBar().setDisplayBackButton(true);
getActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);


What is a benefit of deodexing?
Install custom apps
Remove files
Speed boost
Custom themes


Which of these Activity lifecycle events is called when the activity is about to become visible to the user from a hidden state.
onResume()
Resume()
onCreate()
onStart()
Start()


AppWidgetProvider is a subclass of
BroadcastReceiver
Service
Intent
AppWidgetHost
Activity


Which class MediaPlayer extends in android?
Activity
MediaPlayerToolKit
Object
AndroidMediaPlayer
MediaPlayerStream

No comments:

Post a Comment