Google Developers Certification - Associate Android Developer (Kotlin and Java Exam)
Last Update Apr 27, 2024
Total Questions : 128
We are offering FREE Associate-Android-Developer Google exam questions. All you do is to just go and sign up. Give your details, prepare Associate-Android-Developer free exam questions and then go for complete pool of Google Developers Certification - Associate Android Developer (Kotlin and Java Exam) test questions that will help you more.
By executing an allowMainThreadQueries() method to the room database builder
RoomDatabase.Builder, we can:
When your code execution reaches the breakpoint, Android Studio pauses execution of your app. You can then use the tools in the Debugger tab to identify the state of the app. With Evaluate Expression you can
Filter logcat messages. If in the filter menu, a filter option “Edit Filter Configuration”? means:
What is the incorrect statement about Data Access Object (androidx.room.Dao)?
By adding a RoomDatabase.Callback to the room database builder RoomDatabase.Builder (method
addCallback(RoomDatabase.Callback callback)), we can: (Choose two.)
What do you want from Room when you create a DAO method and annotate it with @Update?
Example:
@Dao
interface MyDao {
@Update
fun updateUsers(vararg users: User)
}
In a class extended PreferenceFragmentCompat. What method is used to inflate the given XML resource and add the preference hierarchy to the current preference hierarchy?
To run a debuggable build variant you must use a build variant that includes
If you want the Database Inspector to automatically update the data it presents as you interact with your running app, check the Live updates checkbox at the top of the inspector window. While live updates are enabled, what happens with the table in the inspector window?
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 content label sometimes depends on information only available at runtime, or the meaning of a View might change over time. For example, a Play button might change to a Pause button during music playback. In these cases, to update the content label at the appropriate time, we can use:
If you are working with a Builder that creates a PeriodicWorkRequest to run periodically once within the flex period of every interval period. What statement is correct?
Custom views and directional controller clicks. In general, you should send an AccessibilityEvent whenever the content of your custom view changes. For example, if a text value was changed in your custom view, you should emit an event of this type:
Assume that you have the following situation: The app code calls for R.string.text_a Three relevant resource files are available:
-res/values/strings.xml, which includes text_a in the app's default language, in this case English.
-res/values-mcc404/strings.xml, which includes text_a in the app's default language, in this case English.
-res/values-hi/strings.xml, which includes text_a in Hindi.
The app is running on a device that has the following configuration:
-The SIM card is connected to a mobile network in India (MCC 404).
-The language is set to Hindi (hi).
Which is the correct statement below?
As an example. In an Activity we have our TimerViewModel object (extended ViewModel), named mTimerViewModel. mTimerViewModel.getTimer() method returns a LiveData
For example, we have a file in our assets folder app/src/main/assets/sample_teas.json. To get an
InputStream for reading it, from out Context context, we can try doing this:
An example. In our ViewModelFactory (that implements ViewModelProvider.Factory) we have an instance of our Repository, named mRepository. Our ViewModel has such constructor:
public MyViewModel(MyRepository myRepository)...
Next, in our ViewModelFactory create ViewModel method (overriden) looks like this:
@NonNull
@Override
public
//MISSED RETURN VALUE HERE
} catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
throw new RuntimeException("Cannot create an instance of " + modelClass, e);
}
}
What should we write instead of “//MISSED RETURN VALUE HERE”?
When using an EditTexts or editable TextViews, or other editable View. What attribute to use to provide a content label for that View?