What will be the result of this intent? Intent intent = new Intent(A.this, B.class); startActivityForResult(intent , -1);
1.do nothing
2.call startActivity() from Activity A
3.call onActivityResult() from Activity A✖
4.call onActivityResult() from Activity B
According to the Activity's lifecycle, how is named the first method callback of an Activity?
1.protected void onCreate();
2.protected void onCreate(Parcelable parcelable);
3.protected void onCreate(Intent intent);
4.protected void onCreate(Bundle savedInstanceState);
Android applications can "borrow" functionality from other applications by using...
1.intent objects
2.content Provider system
3.application lifecyle methods
4.None of the above
AppWidgetProvider is a subclass of
1.Intent
2.Service
3.Activity
4.BroadcastReceiver
Every Android application runs in its own process...
1.within a shared system wide instance of the Dalvik Virtual Machine.
2.with its own instance of the Dalvik Virtual Machine.
3.with its own instance of the Java Virtual Machine.
4.None of these
How can you assign a custom (NOT BUILT IN ANDROID) font typeface to a TextView?
1.In code: mTextViem.setTypeface(Typeface myfont);
2.In styles xml: <item name="android:typeface|>"myfont"</item>
3.In layout xml: android:typeface="myfont"
4.None of the above
how can you check if your activity is first on stack ?
1.activity.isTaskRoot()
2.(ActivityManager) getSystemService(Context.ACTIVITY_SERVICE).isTaskRoot() both
3.Both A & B
4.None of These
How do you disable the scrollbars for a webview?
1.<WebView android:layout_height="wrap_content" />
2.<WebView android:layout_height="wrap_content" />
3.<WebView android:layout_width="wrap_content" />
4.all of these
How do you display the Action Bar back button on all Android versions?
1.getSupportActionBar().setDisplayBackButton(true);
2.getActionBar().setDisplayHomeAsUpEnabled(true);
3.getSupportActionBar().setDisplayHomeAsUpEnabled(true);
4.None of the above
How do you enable hardware acceleration in android?
1.permission:hardwareAccelerated="true"
2.android:hardwareAccelerated="true"
3.android:permission:hardwareAccelerated="true"
4.use:permission:hardwareAccelerated="true"
How do you get an intent data inside a fragment basically?
1.Bundle args = getExtras().getActivity();
2.Bundle args = new Bundle(getActivity().getIntent().getExtras());
3.Bundle args = getActivity().getIntent().getExtras();
4.Bundle args = getIntent().getActivity.getExtras();
How to enable overlay mode On API level 11 or higher, to create a custom theme for your activity.
1.<item name="ActionBar:Overlay">true</item>
2.<item name="ActionBarOverlay">true</item>
3.<item name="android:ActionBarOverlay">true</item>
4.<item name="android:windowActionBarOverlay">true</item>
If the UI begins to behave sluggishly or crash while making network calls this is likely due to ....
1.Hardware malfunction
2.Activity Manager contains too much
3.Virus on the server
4.Network Latency
if you want to access list of paired Bluetooth devices on Android, what should you do ?
1.add to the manifest.xml
2.add to the manifest.xml
3.both (a) and (b)
4.None of the above
If you wanted to store a name/value string pair for your Android application, which class would you use?
1.android.content.Resources
2.android.content.SharedPreferences
3.android.content.Cookies
4.None of the above
If your application uses the camera on an Android powered device, the following line should be in your manifest file
1.<uses-feature android:name="android.hardware.camera" />
2.<uses-feature="android.hardware.camera" />
3.<uses-feature name="camera" />
4.None of these
In activity A if you start Activity B with result you should override
1.onActivityResult(int requestCode, int resultCode, Intent data) on Activity A
2.onResultedActivity(int requestCode, int resultCode, Intent data) on Activity B
3. onResultedActivity(int requestCode, int resultCode, Intent data) on Activity A
4.none of the above
In order to be notified of a device switching from landscape to portrait view, you should:
1.Override the onConfigurationChanged event
2.Request changes via the android:configChanges="orientation" attribute for activities in your manifest file
3.Both of these
4.None of these
In order to get paired Bluetooth device list you need to :
1.not possible
2.add <user-feature android:name="android.permission.BLUETOOTH" /> feature to the manifest.xml
3.none of the above
4.add <user-permission android:name="android.permission.BLUETOOTH_ADMIN" /> permission to the manifest.xml
In order to specify layouts so that they adapt to any screen size, specify dimensions in:
1.Density-independent pixels
2.Pixels
3.both (a) and (b)
4.None of the above
In which resource folder do we create an animation file ?
1.drawable
2.raw
3.anim
4.animation
Is it possible to reverse engineer an android application using the apk file alone without external app resources?
1.No
2.Yes,at any point in time
3. Yes but not always
4.None of the above
The Android Manifest file has what extension?
1..jar
2..apk
3.java
4.xml
The Android SDK tools compile your application into an Android application (.apk file) which...
1.contains all the information needed to install the application on an Android device.
2.then has to be formatted for installation through the Android installer.
3.contains information needed by the Universal Mobile Installer to create the install package for Android devices.
4.None of These
The _____ is a possible media type value for the media attribute.
1. Viewport
2.Embossed
3.Page box
4.Aspect-ratio
What AIDL is?
1.Android InterProcess Definition Language
2.Android Interface Definition Language
3.Android InterProcess Dynamic Language
4.Android Interface Dynamic Language
What are some examples of direct descendants of the android.view object?
1.ProgressBar
2.ViewGroup
3. Neither of these
4.Both of these
What does this layout show?
1.a textview aligned to the right in the layout and the text is centered
2.a textview center in the layout and the text aligned to the right in his own container
3.a textview aligned to the right in the layout
4.a textview center in the layout
What is an application component that can perform long-running operations in the background and does not provide a user interface?
1.Broadcast receiver
2.Content-provider
3.Activity
4.Service
What is an Intent ?
1.a function
2.a message
3.a process
4.an action
What is the brand name of Google's own line of Android smartphones?
1.Galaxy
2.Nexus
3.Optimus
4.Desire
What is the correct argument passed in the Array.sort() function
1.CASE_INSENSITIVE
2.INSENSITIVE_CASE_ORDER
3.CASE_ORDER
4.CASE_INSENSITIVE_ORDER
What is the first method called in the Activity Lifecycle?
1.onBegin()
2.onResume()
3.onInit()
4.onCreate()
What is the main hardware platform of Android?
1.MIPS
2.x86
3.ARM architecture
4.None of these
What is the name of the main thread in Android
1.Working Thread
2.Main Thread
3.UI thread
4.None of the above
What is the name of the new design guidelines given by Google ?
1.Holo
2.Classic
3.Flat Design
4.Material Design
What is the proper order of life cycle methods called when an Activity is first run?
1.onStart(), onResume, onCreate()
2.onCreate(), onRestart(), onResume()
3.onCreate(), onResume(), onStart()
4.onCreate(), onStart(), onResume()
What is the recommended IDE for Android by Google
1.Android Studio
2.IntelliJ IDEA
3.Netbeans
4.Eclipse ADT
What permission does your application need to use the network?
1.android.permission.INTERNET
2.android.permission.NETWORK
3.android.security.NETWORK
4.android.security.NETWORK
What permission is required for your application to use the device's vibrate hardware?
1.android.hardware.permission.VIBRATE
2.android.permission.hardware.VIBRATE
3.android.hardware.VIBRATE
4.android.permission.VIBRATE
What should you extend in case you need to apply a portion of code to your entire application?
1.Application(import both android.app.Activity and anroid.app.Application)
2.Activity(import android.app.Activity)
3.ApplicationInfo(import android.app.*)
4.Class(import android.app.Activity and android.app.Application)
Where is navigation drawer support available?
1.Android Support Library v14
2.Android Support Library v21
3.Android Support Library v4✖
4.Android Support Library v7
Which class MediaPlayer extends in android?
1.MediaPlayerToolKit
2.AndroidMediaPlayer
3.Object
4.Activity
Which component does not exist in the android sdk ?
1.CheckBoxButton
2.EditText
3.TextView
4.ImageView
Which is NOT a default value used for a Toast length parameter?
1. LENGTH_SMALL
2.LENGTH_LONG
3.LENGTH_SHORT
4.None of these
Which layout is deprecated since version 2.3?
1.Frame Layout
2.Absolute Layout
3.Table Layout
4. Relative Layout
Which method can be called to destroy an activity?
1.finish()
2.finishActivity()
3.onDestroy()
4.close()
Which of the following allows you to instantinate a LocationManager class?
1.LocationManager lm = (LocationManager)Runtime.getSystemServiceInstance(Context.LOCATION_SERVICE);
2.LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
3.LocationManager lm = new LocationManager(Context.LOCATION_SERVICE);
4.LocationManager lm = (LocationManager)SystemServiceFactory.createSystemService(Context.LOCATION_SERVICE);
Which of the following are a function of the manifest file?
1.declare the level of user permissions required.
2.declare the minimum API level required
3.all of these
4.None of These
Which of the following are different types of Android application components?
1.all of these
2.services
3.activities
4.none of these
Which of the following are versions of Android?
1.Eclair
2.Gingerbread
3.Froyo
4.All of these
Which of the following is a public constructor for canvas?
1.canvas(int color)
2.canvas(Context context)
3.canvas(Bitmap bitmap
4.canvas(AttributeSet set)
Which of the following is an Android class for the playback of sound?
1.MediaPool
2.Music
3.SoundPlayer
4.SoundPool
Which of the following is NOT a subclass of TextView?
1.Button
2.Radio Button
3.EditText
4.Image Button
Which of the following is used to detect when a user clicks or taps on a button?
1.OnTapListener
2.OnTouchListener
3.OnClickDetecter
4.OnClickListener
Which of these is NOT a Layout derived from the ViewGroup class?
1.RelativeLayout
2.AbsoluteLayout
3.LinearLayout
4.ListViewLayout
Which of these ListAdapter subclasses is not a direct subclass of BaseAdapter?
1.SimpleAdapter
2. CursorAdapter
3.ArrayAdapter
4. HeaderViewListAdapter
Which of these run in a separate thread?
1.IntentService
2.None of them
3.Both of them
4.Service
Which of these widgets is an input box for a user to enter text?
1.Label
2.TextBox
3.EditText
4.TextView
Which service is used to perform IPC, when bind application to a service?
1.bindService()
2.activity.bindService()
3.application.bindService()
4.service.application.bindService()
Which statement correctly changes content of a TextView named textLabel to show "Your Text"?
1.textLabel.setText("Your Text");
2.textLabel = "Your Text";
3.textLabel.text = "Your Text";
4. textLabel.text("Your Text");
Which subclass of a Preference class displays a list of entries as a dialog?
1.ListPreference
2.MultiSelectListPreference
3.None of these
4.Both of these
Which tag is used to add "Star Rating" in XML layout file?
1.RatingWidget
2.Stars
3.RatingBar
4.Rating
Which Virtual Machine (VM) does the android system use?
1.Erlang
2.VMLite
3.Dalvik
4.KVM
Who can submit applications to the Marketplace?
1.Anyone and everyone
2.Registered Android Market developers
3.Only Google employees
4.Only device manufacturers and their employees
Who is known as the 'Father' of Android?
1.Hugo Barra
2.Sandar Pichai
3. Sergey Brin
4.Andy Rubin
You can control process usage in your Android application by...
1.moving your components up in the process lifecycle hierarchy.
2.both of these
3.using the android:process attribute on the specific component defined in the manifest.
4.None of the above
Your Android application components are defined in the...
1.myApp.xml file.
2.AndroidManifest.xml file.
3.AndroidManifest.pkg file.
4.None of the above