Premium

Associate Android Developer Certification Questions and Answer (Dumps and Practice Questions)



Question : Which code acquires a MediaPlayer class instance?

 : Which code acquires a MediaPlayer class instance?
1. MediaPlayer.create(this, R.raw.music);

2. newMediaPlayer(this, R.raw.music);

3. Access Mostly Uused Products by 50000+ Subscribers

4. MediaPlayer.newInstancefthis, R.raw.music),

Correct Answer : Get Lastest Questions and Answer :
Explanation: MediaPlayer.create() needs a Context as first parameter. Pass in the current Activity and it should work.

public void playClick(Context context){
mp = MediaPlayer.create(context, R.raw.click);
mp.start();
}


 : Which code acquires a MediaPlayer class instance?








Question : Which of the following is not a ContentProvider provided natively by Android?
 : Which of the following is not a ContentProvider provided natively by Android?
1. The contacts list

2. The telephone log

3. Access Mostly Uused Products by 50000+ Subscribers

4. The application list

Correct Answer : Get Lastest Questions and Answer :
Explanation: A content provider acts as an interface that allows you to store and retrieve data from a data source. It also allows you to share an app's data with other apps. Content providers decouple the app layer from the data layer by abstracting the underlying data source, thereby making apps data-source independent. They allow full permission control by monitoring which app components or users should have access to the data making data sharing easy. As a result, any app with appropriate permissions can add, remove, update, and retrieve data of another app including the data in some native Android databases.

The Android platform supports two types of content providers that can be used in your app:

Custom content providers: These are created by the developer to suit the requirements of an app.
Native content providers: These provide access to built-in databases, such as contact manager, media player, and other native databases. You need to grant the required permissions to your app before using native content providers.







Question : When creating a file using android.content.Context.openFileOutput("test.txt", ), where is the file created?

 : When creating a file using android.content.Context.openFileOutput(
1. /data/app//files

2. /data/data//files

3. Access Mostly Uused Products by 50000+ Subscribers

4. /system/data//files

Correct Answer : Get Lastest Questions and Answer :
Explanation:


Related Questions


Question : Which of these is the correct method to persist SharedPreferences?

 : Which of these is the correct method to persist SharedPreferences?
1. XML file

2. SQLite

3. Access Mostly Uused Products by 50000+ Subscribers

4. Java object


Question : Which of these is the incorrect explanation of the Java Native Interface(JNI)?

 : Which of these is the incorrect explanation of the Java Native Interface(JNI)?
1. JNI does not provide garbage collection on the native side, outside the memory resources of
the Java Virtual Machine.

2. Even if native code is used with JNI, it does not necessarily mean an improvement in the
application processing speed.

3. Access Mostly Uused Products by 50000+ Subscribers
side.

4. Header files generated on the Java side are included and implemented in the native (C/C++)
side source code.


Question : Which is the correct explanation of ListView?
A. It is necessary to use ListView as a set with ListActivity.
B. There is a function in ListView which displays a message when there is no information to be displayed.
C. When displaying an array using an Adapter class in ListView, it is necessary to convert it into a Collection class.
D. ListView has a function to display a list of uniquely defined Views other than TextView.

 : Which is the correct explanation of ListView?
1. It is necessary to use ListView as a set with ListActivity.

2. There is a function in ListView which displays a message when there is no information to be displayed.

3. Access Mostly Uused Products by 50000+ Subscribers

4. ListView has a function to display a list of uniquely defined Views other than TextView.



Question : Which of these Activity class methods must be overridden when creating a Menu that is displayed
when the device's Menu button is pressed?

 : Which of these Activity class methods must be overridden when creating a Menu that is displayed
1. onCreateContextMenu

2. onMenuOpened

3. Access Mostly Uused Products by 50000+ Subscribers

4. openOptionsMenu


Question : Which approval is necessary to execute Bluetooth actions such as connection requests,
connection receipt, and data forwarding?

 : Which approval is necessary to execute Bluetooth actions such as connection requests,
1. BLUETOOTH

2. BLUETOOTH_ADMIN

3. Access Mostly Uused Products by 50000+ Subscribers

4. ACCOUNT MANAGER


Question : Which class is used when a sensor is accessed?

 : Which class is used when a sensor is accessed?
1. SensorEventListener

2. SensorEvent

3. Access Mostly Uused Products by 50000+ Subscribers

4. Sensor