0

Basics of Android Application Development

Description: This test contains the questions related to basics of application development in Android platform. This test is useful for CS and GATE aspirants.
Number of Questions: 16
Created by:
Tags: computer CS android application gate Android
Attempted 0/16 Correct 0 Score 0

What does ‘assets’ item hold in the root directory of android application?

  1. GUI layout resources

  2. Required JAR files for the application

  3. Java source code for the application

  4. Packaged application files for deployment

  5. Basic application components


Correct Option: D
Explanation:

The ‘assets’ item holds other static files packaged with application for deployment.

__________ is used to include graphics features in the android application.

  1. SSL Webkit

  2. OpenGL

  3. Media

  4. SQLite

  5. libc


Correct Option: B
Explanation:

OpenGL library is used to include 2D and 3D graphics in the android application.

_________ is used for XML parsing in application.

  1. android.util

  2. android.os

  3. android.text

  4. android.database

  5. android.graphics


Correct Option: A
Explanation:

The android.util library has core utility package which contains low level classes for XML parsing utilities in the application.

What information does .apk file has after the debugging of the android application?

  1. Collection of executable and external resources

  2. Android executable file

  3. Android byte code file

  4. Java byte code file

  5. Java executable file


Correct Option: A
Explanation:

The android package file (.apk) contains the executable and external resources in a packaged format after compilation of the android application.

Which of the following is a technique to get the user’s attention from within a broadcast receiver?

  1. Intents

  2. Broadcast receiver

  3. Notifications

  4. Services

  5. Activities


Correct Option: C
Explanation:

Notifications signals users without interrupting their current activities.

Which of the following android techniques is/are used to save data by an own database for the application?

  1. Shared preferences

  2. Files

  3. SQLite databases

  4. Content Providers

  5. Both (1) and (4)


Correct Option: C
Explanation:

By using SQLite database saving technique, every application can create its own database over which it has total control.

Which of the following is/are the correct syntax to delete records using the Content Resolver?

  1. getContentResolver().delete(myRowUri, null);

  2. getContentResolver().delete(myRowUri);

  3. getContentResolver().delete(myRowUri, null, null);

  4. getContentResolver().delete(MyProvider.CONTENT_URI, where, null);

  5. Both (3) and (4)


Correct Option: E
Explanation:

This is the correct option.

Which state(s) of an activity is/are called in visible state without user input?

  1. Inactive

  2. Paused

  3. Stopped

  4. Active

  5. Both (1) and (2)


Correct Option: B
Explanation:

The activity in the paused state will be visible, but will not receive user input events.

Which of the following android development tools is used to construct the android package files (.apk)?

  1. Android Emulator

  2. Dalvik Debug Monitoring Service (DDMS)

  3. Android Asset Packaging Tool (AAPT)

  4. Android Debug Bridge (ADB)

  5. Android Development Tool (ADT)


Correct Option: C
Explanation:

The Android Asset Packaging Tool (AAPT) constructs the distributable android package files (.apk).

______ is used for event-driven applications.

  1. Intents

  2. Broadcast receiver

  3. Notifications

  4. Services

  5. Activities


Correct Option: B
Explanation:

It starts the application to respond to an incoming intent and makes it ideal for event-driven applications.

Which of the following tools can be used to compile android applications without the ADT plug-in?

  1. Traceview

  2. SQLite3

  3. MkSDCard

  4. dx

  5. activityCreator


Correct Option: E
Explanation:

It builds ant build files that can be used to compile android applications without the ADT plug-in.

Which of the following is not a native Content Provider?

  1. Browser

  2. CallLog

  3. MediaStore

  4. Settings

  5. Activity


Correct Option: E
Explanation:

Activity is an individual task and it does not provide any content to other applications.

Which of the following is the correct syntax to start an explicit activity?

  1. Intent intent = new Intent(MyActivity.this, MyOtherActivity); startActivity(intent);

  2. Intent intent = new Intent(MyActivity.this, MyOtherActivity.class); startActivity(intent);

  3. Intent intent = new Intent(MyActivity.class, MyOtherActivity.class); startActivity(intent);

  4. Intent intent = new Intent(this, MyOtherActivity.this); startActivity(intent);

  5. Intent intent = new Intent(MyOtherActivity.class); startActivity(intent);


Correct Option: B
Explanation:

After calling startActivity, the new activity, i.e. MyOtherActivity will be created and will move to the top of the activity stack.

Which of the following is an incorrect statement about accessing the files in Content Providers?

  1. Content Providers represent files as fully qualified URIs.

  2. openOutputStream method is used to insert a file into a Content Provider.

  3. openInputStream method is used to access a saved file.

  4. The file compresses the bitmap and saves it into the provider.

  5. There will be no exception possible while saving the file.


Correct Option: E
Explanation:

The FileNotFoundException is possible while saving the file.

Which of the following parameters is not available in managedQuery() method?

  1. An array of properties of instances from the content provider

  2. A constraint statement

  3. An optional set of parameters to bind into the constraint clause

  4. An optional sort statement

  5. The identifier for a layout


Correct Option: E
Explanation:

The managedQuery() method does not have any parameter like the layout identifier.

Which of the following is the correct syntax of onUpgrade method in SQLite database?

  1. public void onUpgrade(SQLiteDatabase db) { db.execSQL(DROP TABLE IF EXISTS + TABLE_CONTACTS); onCreate(db); }

  2. public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL(DROP TABLE IF EXISTS + TABLE_CONTACTS); onCreate(db); }

  3. public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL(DROP TABLE IF EXISTS + TABLE_CONTACTS); onCreate(db); db.insert(); }

  4. public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL(DROP TABLE IF EXISTS + TABLE_CONTACTS); onCreate(db); db.close(); }

  5. public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { db.execSQL(DROP TABLE IF EXISTS + TABLE_CONTACTS); onCreate(db); db.delete(); }


Correct Option: B
Explanation:

onUpgrade() method is called when there is a database version mismatch.

- Hide questions