Android/Android Programming MCQ Set 1 Sample Test,Sample questions

Question:
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

Posted Date:-2022-08-18 23:33:16


Question:
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);

Posted Date:-2022-08-18 23:35:49


Question:
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

Posted Date:-2022-08-18 04:26:58


Question:
AppWidgetProvider is a subclass of

1.Intent

2.Service

3.Activity

4.BroadcastReceiver

Posted Date:-2022-08-18 04:45:02


Question:
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

Posted Date:-2022-08-18 04:13:06


Question:
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

Posted Date:-2022-08-18 04:24:43


Question:
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

Posted Date:-2022-08-18 05:42:24


Question:
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

Posted Date:-2022-08-18 04:08:06


Question:
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

Posted Date:-2022-08-18 04:43:49


Question:
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"

Posted Date:-2022-08-18 04:38:48


Question:
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();

Posted Date:-2022-08-18 04:23:41


Question:
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>

Posted Date:-2022-08-18 04:36:35


Question:
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

Posted Date:-2022-08-18 04:28:17


Question:
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

Posted Date:-2022-08-18 04:33:52


Question:
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

Posted Date:-2022-08-18 03:55:45


Question:
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

Posted Date:-2022-08-18 04:03:29


Question:
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

Posted Date:-2022-08-18 04:00:43


Question:
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

Posted Date:-2022-08-18 04:07:06


Question:
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

Posted Date:-2022-08-18 04:32:16


Question:
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

Posted Date:-2022-08-18 03:43:35


Question:
In which resource folder do we create an animation file ?

1.drawable

2.raw

3.anim

4.animation

Posted Date:-2022-08-18 04:05:53


Question:
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

Posted Date:-2022-08-18 04:31:07


Question:
The _____ is a possible media type value for the media attribute.

1. Viewport

2.Embossed

3.Page box

4.Aspect-ratio

Posted Date:-2022-08-18 02:16:46


Question:
The Android Manifest file has what extension?

1..jar

2..apk

3.java

4.xml

Posted Date:-2022-08-18 03:48:36


Question:
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

Posted Date:-2022-08-18 03:58:04


Question:
What AIDL is?

1.Android InterProcess Definition Language

2.Android Interface Definition Language

3.Android InterProcess Dynamic Language

4.Android Interface Dynamic Language

Posted Date:-2022-08-18 04:20:28


Question:
What are some examples of direct descendants of the android.view object?

1.ProgressBar

2.ViewGroup

3. Neither of these

4.Both of these

Posted Date:-2022-08-18 04:16:31


Question:
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

Posted Date:-2022-08-18 06:01:13


Question:
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

Posted Date:-2022-08-18 02:18:33


Question:
What is an Intent ?

1.a function

2.a message

3.a process

4.an action

Posted Date:-2022-08-18 06:02:39


Question:
What is the brand name of Google's own line of Android smartphones?

1.Galaxy

2.Nexus

3.Optimus

4.Desire

Posted Date:-2022-08-18 02:33:32


Question:
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

Posted Date:-2022-08-18 05:44:16


Question:
What is the first method called in the Activity Lifecycle?

1.onBegin()

2.onResume()

3.onInit()

4.onCreate()

Posted Date:-2022-08-18 02:19:57


Question:
What is the main hardware platform of Android?

1.MIPS

2.x86

3.ARM architecture

4.None of these

Posted Date:-2022-08-18 04:02:19


Question:
What is the name of the main thread in Android

1.Working Thread

2.Main Thread

3.UI thread

4.None of the above

Posted Date:-2022-08-18 04:09:42


Question:
What is the name of the new design guidelines given by Google ?



1.Holo

2.Classic

3.Flat Design

4.Material Design

Posted Date:-2022-08-18 04:14:22


Question:
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()

Posted Date:-2022-08-18 04:04:43


Question:
What is the recommended IDE for Android by Google

1.Android Studio

2.IntelliJ IDEA

3.Netbeans

4.Eclipse ADT

Posted Date:-2022-08-18 03:54:42


Question:
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

Posted Date:-2022-08-18 04:09:01


Question:
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

Posted Date:-2022-08-18 04:41:32


Question:
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)

Posted Date:-2022-08-18 04:33:10


Question:
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

Posted Date:-2022-08-18 23:34:32


Question:
Which class MediaPlayer extends in android?

1.MediaPlayerToolKit

2.AndroidMediaPlayer

3.Object

4.Activity

Posted Date:-2022-08-18 05:33:34


Question:
Which component does not exist in the android sdk ?




1.CheckBoxButton

2.EditText

3.TextView

4.ImageView

Posted Date:-2022-08-19 00:47:31


Question:
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

Posted Date:-2022-08-18 03:57:07


Question:
Which layout is deprecated since version 2.3?

1.Frame Layout

2.Absolute Layout

3.Table Layout

4. Relative Layout

Posted Date:-2022-08-18 04:12:07


Question:
Which method can be called to destroy an activity?

1.finish()

2.finishActivity()

3.onDestroy()

4.close()

Posted Date:-2022-08-18 05:58:13


Question:
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);

Posted Date:-2022-08-18 04:29:50


Question:
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

Posted Date:-2022-08-18 02:34:19


Question:
Which of the following are different types of Android application components?

1.all of these

2.services

3.activities

4.none of these

Posted Date:-2022-08-18 03:50:23


Question:
Which of the following are versions of Android?

1.Eclair

2.Gingerbread

3.Froyo

4.All of these

Posted Date:-2022-08-18 03:44:54


Question:
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)

Posted Date:-2022-08-18 04:37:48


Question:
Which of the following is an Android class for the playback of sound?



1.MediaPool

2.Music

3.SoundPlayer

4.SoundPool

Posted Date:-2022-08-18 05:41:22


Question:
Which of the following is NOT a subclass of TextView?

1.Button

2.Radio Button

3.EditText

4.Image Button

Posted Date:-2022-08-18 04:35:44


Question:
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

Posted Date:-2022-08-18 03:51:19


Question:
Which of these is NOT a Layout derived from the ViewGroup class?

1.RelativeLayout

2.AbsoluteLayout

3.LinearLayout

4.ListViewLayout

Posted Date:-2022-08-18 04:22:29


Question:
Which of these ListAdapter subclasses is not a direct subclass of BaseAdapter?

1.SimpleAdapter

2. CursorAdapter

3.ArrayAdapter

4. HeaderViewListAdapter

Posted Date:-2022-08-18 04:25:38


Question:
Which of these run in a separate thread?

1.IntentService

2.None of them

3.Both of them

4.Service

Posted Date:-2022-08-18 05:59:36


Question:
Which of these widgets is an input box for a user to enter text?

1.Label

2.TextBox

3.EditText

4.TextView

Posted Date:-2022-08-18 03:52:28


Question:
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()

Posted Date:-2022-08-18 04:40:01


Question:
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");

Posted Date:-2022-08-18 03:47:15


Question:
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

Posted Date:-2022-08-18 02:17:41


Question:
Which tag is used to add "Star Rating" in XML layout file?



1.RatingWidget

2.Stars

3.RatingBar

4.Rating

Posted Date:-2022-08-18 04:11:00


Question:
Which Virtual Machine (VM) does the android system use?

1.Erlang

2.VMLite

3.Dalvik

4.KVM

Posted Date:-2022-08-18 02:27:40


Question:
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

Posted Date:-2022-08-18 03:53:28


Question:
Who is known as the 'Father' of Android?

1.Hugo Barra

2.Sandar Pichai

3. Sergey Brin

4.Andy Rubin

Posted Date:-2022-08-18 04:21:32


Question:
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

Posted Date:-2022-08-18 04:42:39


Question:
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

Posted Date:-2022-08-18 03:42:41


More MCQS

  1. Android Mcq Question
  2. ANDROID Multiple Choice Question
  3. Android MCQ Questions and Answers
  4. Android Programming MCQ Set 1
  5. Android Programming MCQ Set 2
  6. Android Programming MCQ Set 3
  7. Android Programming MCQ Set 4
  8. Android Programming MCQ Set 5
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!