Weekend Sale - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: xmaspas7

Easiest Solution 2 Pass Your Certification Exams

Associate-Android-Developer Google Developers Certification - Associate Android Developer (Kotlin and Java Exam) Free Practice Exam Questions (2025 Updated)

Prepare effectively for your Google Associate-Android-Developer Google Developers Certification - Associate Android Developer (Kotlin and Java Exam) certification with our extensive collection of free, high-quality practice questions. Each question is designed to mirror the actual exam format and objectives, complete with comprehensive answers and detailed explanations. Our materials are regularly updated for 2025, ensuring you have the most current resources to build confidence and succeed on your first attempt.

LiveData.postValue() and LiveData.setValue() methods have some differences. So if you have a following code executed in the main thread:

liveData.postValue("a"); liveData.setValue("b");

What will be the correct statement?

A.

The value "b" would be set at first and later the main thread would override it with the value "a".

B.

The value "a" would be set at first and later the main thread would override it with the value "b".

C.

The value "b" would be set at first and would not be overridden with the value "a".

D.

The value "a" would be set at first and would not be overridden with the value "b".

Android uses adapters (from the Adapter class) to connect data with View items in a list. There are many different kinds of adapters available, and you can also write custom adapters. To connect data with View items, the adapter needs to know about the View items. From what is extended the entity that is usually used in an adapter and describes a View item and its position within the RecyclerView?

A.

RecyclerView.AdapterDataObserver

B.

RecyclerView.ItemDecoration

C.

RecyclerView.ViewHolder

D.

RecyclerViewAccessibilityDelegate

If constant LENGTH_INDEFINITE is used as a parameter for the setDuration method in Snackbar, what will happen?

A.

The Snackbar will be displayed for a short period of time.

B.

The Snackbar will be displayed for a long period of time.

C.

The Snackbar will be displayed for a very long period of time.

D.

The Snackbar will be displayed from the time that is shown until either it is dismissed, or another Snackbar is shown.

E.

The constant LENGTH_INDEFINITE is impossible parameter for the setDuration method in Snackbar

As an example. In an Activity we have our TimerViewModel object (extended ViewModel), named mTimerViewModel. mTimerViewModel.getTimer() method returns a LiveData value. What can be a correct way to set an observer to change UI in case if data was changed?

A.

mTimerViewModel.getTimer().getValue().toString().observe(new Observer() {

@Override

public void onChanged(Long aLong) {

callAnyChangeUIMethodHere(aLong)

}

});

B.

mTimerViewModel.getTimer().observe(this, new Observer() {

@Override

public void onChanged(Long aLong) {

callAnyChangeUIMethodHere(aLong)

}

});

C.

mTimerViewModel.observe(new Observer() {

@Override

public void onChanged(Long aLong) {

callAnyChangeUIMethodHere(aLong)

}

});

Under the hood WorkManager uses an underlying job dispatching service based on the following criteria. You need to move services to the correct places.

Select a correct statement about PagedList.

A.

PagedList is content-mutable. This means that new content can be loaded into an instance of PagedList and the loaded items themselves can change once loaded.

B.

PagedList is content-immutable. This means that, although new content can be loaded into an instance of PagedList, the loaded items themselves cannot change once loaded.

C.

PagedList is content-accidental. This means that new content can be loaded into an instance of PagedList and the loaded items themselves can be changed to accidental values randomly.

When scheduling unique work, you must tell WorkManager what action to take when there is a conflict. You do this by passing an enum when enquing the work. For one-time work, you provide an ExistingWorkPolicy, which supports some options for handling the conflict. (Choose four.)

A.

REPLACE (existing work with the new work. This option cancels the existing work)

B.

KEEP (existing work and ignore the new work)

C.

APPEND (the new work to the end of the existing work. This policy will cause your new work to be chained to the existing work, running after the existing work finishes)

D.

APPEND_OR_REPLACE (functions similarly to APPEND, except that it is not dependent on prerequisite work status. If the existing work is CANCELLED or FAILED, the new work still runs)

E.

APPEND_OR_KEEP (functions similarly to APPEND, except that it is not dependent on prerequisite work status. If the existing work is CANCELLED or FAILED, the new work still not runs)

F.

APPEND_AND_RUN (functions similarly to APPEND, except that it is not dependent on prerequisite work status. If the existing work is PAUSED, the new work still runs)

G.

DESTROY (if any work exists, the new work will be ignored)

What method should we use with Notification.Builder to supply a PendingIntent to be sent when the notification is clicked?

A.

setContentInfo

B.

setContentIntent

C.

setDeleteIntent

Choose the most correct statement.

A.

Android is a closed source, Linux-based software stack created for a wide array of devices and form factors.

B.

Android is a closed source, Windows-based software stack created for a wide array of devices and form factors.

C.

Android is an open source, Linux-based software stack created for a wide array of devices and form factors.

D.

Android is an open source software stack created for a highly limited array of devices and form factors.

What public methods are there in android.widget.Toast.Callback? (Choose two.)

A.

onDismissed()

B.

onToastHidden()

C.

onShown()

D.

onToastShown()

E.

onToastCancelled()

Select correct statements about Hardware Abstraction Layer (HAL). (Choose two.)

A.

The HAL provides standard interfaces that expose device hardware capabilities to the higher-level Java API framework.

B.

The HAL function both as apps for users and to provide key capabilities that developers can access from their own app. For example, if your app would like to deliver an SMS message, you don't need to build that functionality yourself – you can instead invoke whichever SMS app is already installed to deliver a message to the recipient you specify

C.

The HAL consists of multiple library modules, each of which implements an interface for a specific type of hardware component, such as the camera or bluetooth module. When a framework API makes a call to access device hardware, the Android system loads the library module for that hardware component.

D.

Using a HAL, not using a Linux kernel, allows Android to take advantage of key security features and allows device manufacturers to develop hardware drivers for a well-known kernel.

Custom duration in milliseconds as a parameter for the setDuration method is available when you are working with:

A.

Toast

B.

Snackbar

C.

for none of them

D.

for both of them

Assume that an app includes a default set of graphics and two other sets of graphics, each optimized for a different device setup:

res/drawable/

Contains default graphics. res/drawable-small-land-stylus/

Contains graphics optimized for use with a device that expects input from a stylus and has a QVGA low- density screen in landscape orientation.

res/drawable-ja/

Contains graphics optimized for use with Japanese.

What happens if the app runs on a device that is configured to use Japanese and, at the same time, the device happens to be one that expects input from a stylus and has a QVGA low-density screen in landscape orientation?

A.

Android loads graphics from res/drawable/

B.

Android loads graphics from res/drawable-small-land-stylus/

C.

Android loads graphics from res/drawable-ja/

Which build options in the Build menu to choose to delete all intermediate/cached build files.

A.

Make Module

B.

Generate Signed Bundle / APK

C.

Rebuild Project

D.

Clean Project

E.

Make Project

In application theme style, flag windowNoTitle () indicates:

A.

whether this window should have an Action Bar in place of the usual title bar.

B.

whether there should be no title on this window.

C.

that this window should not be displayed at all.

D.

whether this is a floating window.

E.

whether this Window is responsible for drawing the background for the system bars.

What happens when you create a DAO method and annotate it with @Insert?

Example:

@Dao

public interface MyDao {

@Insert(onConflict = OnConflictStrategy.REPLACE)

public void insertUsers(User... users);

}

A.

Room generates an implementation that inserts all parameters into the database in a single transaction.

B.

Room modifies a set of entities, given as parameters, in the database. It uses a query that matches against the primary key of each entity.

C.

Room removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.

For example, we have a BufferedReader reader, associated with the json file through

InputStreamReader. To get a file data we can do this:

A.

String line; try {

while ((line = reader.readLine()) != null) { builder.append(line);

}

JSONObject json = new JSONObject(builder.toString());

return json;

} catch (IOException | JSONException exception) {

exception.printStackTrace();

}

B.

JSONObject line; try {

while ((line = reader.readJSONObject ()) != null) { builder.append(line);

}

JSONObject json = new JSONObject(builder.toString());

return json;

} catch (IOException | JSONException exception) {

exception.printStackTrace();

}

C.

String line; try {

while ((line = reader.readLine()) != null) { builder.append(line);

}

JSONObject json = new JSONObject(builder.toString());

return json;

} catch (RuntimeException|ArrayIndexOutOfBoundsException exception) {

exception.printStackTrace();

}

Copyright © 2014-2025 Solution2Pass. All Rights Reserved