[Jan-2022] Pass Associate-Android-Developer Exam in First Attempt UpdatedAssociate-Android-Developer Prep4away Exam Question [Q14-Q38]

Share

[Jan-2022] Pass Associate-Android-Developer Exam in First Attempt UpdatedAssociate-Android-Developer Prep4away Exam Question

Google Developers Dumps Associate-Android-Developer Exam for Full Questions - Exam Study Guide


Data management

  • Understanding how to adjust the app's actions based on user needs.
  • Reading and decoding raw resources or asset files.
  • Knowing how to use a Repository to help you manage your records.
  • With the data access object, accessing the Room database.
  • Understanding how to use Room entities to identify data.

How to Prepare for Google Associate Android Developer Certified Exam

Preparation Guide for Google Associate Android Developer Certified Exam

Introduction

Google has designed a track for IT professionals to endorse as a cloud DevOps Engineer on the GCP platform. This accreditation program gives Google cloud professionals a way to endorse their skills. The evaluation relies on a meticulous exam using the industry-standard methodology to conclude whether or not an aspirant meets Google’s proficiency standards.

According to Google, Associate Android Developer Certified exam test facilitates organizations to influence android application development. By leveraging the experience of the android studio for the development of the applications that’s why the latest version of Android Studio will be used in this certification.

Certification is evidence of your skills, expertise in those areas in which you like to work. If a candidate wants to work as Google Associate Android Developer Certified and prove his knowledge, certification is offered by Google. This Google Associate Android Developer Certified Certification helps a candidate to validates his skills in Google Associate Android Developer Certified Technology.

In this guide, we will cover the Google Associate Android Developer Certified practice exams, Google Associate Android Developer Certified Professionals salary, and all aspects of the Google Associate Android Developer Certification.


Exam Topics

Before attempting the certification exam, the candidates must develop competence in solving the coding challenges that are covered in it. The content of the test is briefly outlined below:

App Functionality: Within this subject area, the examinees should possess the capacity to construct apps that utilize media services, messaging, connectivity, and multitasking of Android to design and develop the full-featured applications working primarily on mobile devices.

User Interface: This domain requires competence in quickly creating applications with effective and clean user interfaces that can benefit from the rich UI frameworks of Android.

Debugging: The applicants should have an understanding of the debugging tools within the domain of Android Studio. They also need to be able to design and create more robust and reliable apps.

Data Management: The test takers should demonstrate their skills in leveraging the effective techniques and frameworks of Android to schedule or effectively carry out data storage or retrieval within a mobile environment.

Testing: The examinees need to have the skills required to evaluate the operation of running programs to discover errors and unexpected or abnormal behavior.

 

NEW QUESTION 14
In a class PreferenceFragmentCompat. What method is called during onCreate(Bundle) to supply the preferences for this fragment. And where subclasses are expected to call setPreferenceScreen (PreferenceScreen) either directly or via helper methods such as addPreferencesFromResource (int)?

  • A. onCreateView
  • B. onCreateRecyclerView
  • C. onCreateLayoutManager
  • D. onCreatePreferences

Answer: D

 

NEW QUESTION 15
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:

  • A. InputStream input = context.getResources().getAssets().open ("sample_teas.json");
  • B. InputStream input = context.getResources().openRawResource(R.raw.sample_teas);
  • C. InputStream input = context.getAssets().open("sample_teas.json");

Answer: C

 

NEW QUESTION 16
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 removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.
  • C. 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.

Answer: A

 

NEW QUESTION 17
What is the incorrect statement about Data Access Object (androidx.room.Dao)?

  • A. Data Access Objects are the main classes where you define your database interactions. They can include a variety of query methods.
  • B. The class marked with @Dao should either be an interface or an abstract class. At compile time, Room will generate an implementation of this class when it is referenced by a Database.
  • C. It is recommended to have only one Dao class in your codebase for all tables.
  • D. An abstract @Dao class can optionally have a constructor that takes a Database as its only parameter.

Answer: C

 

NEW QUESTION 18
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?

  • A. It becomes read-only, but you cannot see its updated values before updating the data by clicking the Refresh table button at the top of the inspector window.
  • B. It is still editable. You can modify data in a table by double-clicking a cell, typing a new value, and pressing Enter.
  • C. It becomes read-only and you cannot modify its values.

Answer: C

 

NEW QUESTION 19
The easiest way of adding menu items (to specify the options menu for an activity) is inflating an XML file into the Menu via MenuInflater. With menu_main.xml we can do it in this way:

  • A. override fun onCreateOptionsMenu(menu: Menu): Boolean { menuInflater.inflate(R.menu.menu_main, menu) return true
    }
  • B. override fun onOptionsItemSelected(item: MenuItem): Boolean {
    menuInflater.inflate(R.menu.menu_main, menu) return super.onOptionsItemSelected(item)
    }
  • C. override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.menu.menu_main)
    }

Answer: A

Explanation:
Reference:
https://developer.android.com/guide/topics/ui/accessibility/custom-views

 

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

  • A. 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.
  • B. 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.
  • C. 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
  • D. The HAL provides standard interfaces that expose device hardware capabilities to the higher-level Java API framework.

Answer: A,D

Explanation:
The system apps 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 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.
Reference:
https://developer.android.com/guide/platform

 

NEW QUESTION 21
What do you want from Room when you create a DAO method and annotate it with @Update?
Example:
@Dao
public interface MyDao {
@Update
public void updateUsers(User... users);
}

  • A. 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.
  • B. Room removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.
  • C. Room generates an implementation that inserts all parameters into the database in a single transaction.

Answer: A

 

NEW QUESTION 22
In a common Paging Library architecture scheme, move instances to the correct positions.

Answer:

Explanation:

Reference:
https://developer.android.com/topic/libraries/architecture/paging/ui

 

NEW QUESTION 23
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)
}

  • A. 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.
  • B. Room removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.
  • C. Room generates an implementation that inserts all parameters into the database in a single transaction.

Answer: A

 

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

  • A. onToastHidden()
  • B. onShown()
  • C. onDismissed()
  • D. onToastShown()
  • E. onToastCancelled()

Answer: A,D

 

NEW QUESTION 25
With a room database. When performing queries, you'll often want your app's UI to update automatically when the data changes. Can you use a return value of type LiveData in your query method description to achieve this?

  • A. Yes
  • B. No

Answer: A

Explanation:
Room generates all necessary code to update the LiveData when the database is updated.

 

NEW QUESTION 26
What is a correct part of an Implicit Intent for sharing data implementation?

  • A. Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND);
  • B. Intent sendIntent = new Intent(); sendIntent.setType(Intent.ACTION_SEND);
  • C. Intent sendIntent = new Intent(this, UploadService.class) sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage);
  • D. Intent sendIntent = new Intent(this, UploadService.class) sendIntent.setData(Uri.parse(fileUrl));

Answer: A

Explanation:
Create the text message with a string
Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage); sendIntent.setType("text/plain"); Reference:
https://developer.android.com/guide/components/fundamentals

 

NEW QUESTION 27
What is demonstrated by the code below?
// RawDao.kt
@Dao
interface RawDao {
@RawQuery
fun getUserViaQuery(query: SupportSQLiteQuery?): User?
}
// Usage of RawDao
...
val query =
SimpleSQLiteQuery("SELECT * FROM User WHERE id = ? LIMIT 1",
arrayOf<Any>(sortBy))
val user = rawDao.getUserViaQuery(query)
...

  • A. A method in a RoomDatabase class as a query method.
  • B. A method in a Dao annotated class as a query method.
  • C. A method in a Dao annotated class as a raw query method where you can pass the query as a SupportSQLiteQuery.

Answer: C

 

NEW QUESTION 28
For example, we have a BufferedReader reader, associated with the json file through InputStreamReader. To get a file data we can do this:

  • A. 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();
    }
  • B. 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();
    }
  • C. 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();
    }

Answer: C

 

NEW QUESTION 29
Android Tests. You can use the childSelector() method to nest multiple UiSelector instances. For example, the following code example shows how your test might specify a search to find the first ListView in the currently displayed UI, then search within that ListView to find a UI element with the text property Apps.
What is the correct sample?

  • A. UiObject appItem = device.findObject(new UiSelector()
    .className("android.widget.ListView")
    .instance(0)
    .childSelector(new UiSelector()
    .text("Apps")));
  • B. UiObject appItem = device.findObject(new UiSelector()
    .className("android.widget.ListView")
    .instance(new UiSelector()
    .text("Apps")));
  • C. UiObject appItem = device.findObject(new UiSelector()
    .className(ListView.class)
    .instance(1)
    .childSelector(new UiSelector()
    .text("Apps")));

Answer: A

 

NEW QUESTION 30
When using an ImageView, ImageButton, CheckBox, or other View that conveys information graphically. What attribute to use to provide a content label for that View?

  • A. android:contentDescription
  • B. android:labelFor
  • C. android:hint

Answer: A

Explanation:
Reference:
https://support.google.com/accessibility/android/answer/7158690?hl=en

 

NEW QUESTION 31
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 an open source, Linux-based software stack created for a wide array of devices and form factors.
  • C. Android is a closed source, Windows-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.

Answer: B

Explanation:
Reference:
https://developer.android.com/guide/platform

 

NEW QUESTION 32
If content in a PagedList updates, the PagedListAdapter object receives:

  • A. a completely new PagedList that contains the updated information.
  • B. one or more items from PagedList that contains the updated information.
  • C. only one item from PagedList that contains the updated information.

Answer: A

Explanation:
Reference:
https://developer.android.com/topic/libraries/architecture/paging/ui

 

NEW QUESTION 33
Content labels. What attribute to use to indicate that a View should act as a content label for another View?

  • A. android:labelFor
  • B. android:contentDescription
  • C. android:hint

Answer: A

Explanation:
Reference:
https://support.google.com/accessibility/android/answer/7158690?hl=en

 

NEW QUESTION 34
Under the hood WorkManager uses an underlying job dispatching service based on the following criteri a. You need to move services to the correct places.

Answer:

Explanation:

Explanation:
Videos:
Working with WorkManager, from the 2018 Android Dev Summit
WorkManager: Beyond the basics, from the 2019 Android Dev Summit
Reference:
https://developer.android.com/reference/androidx/work/WorkManager?hl=en

 

NEW QUESTION 35
In a class PreferenceFragmentCompat. As a convenience, this fragment implements a click listener for any preference in the current hierarchy. So, in what overridden method we can handle that a preference in the tree rooted at this PreferenceScreen has been clicked?

  • A. onCreateRecyclerView
  • B. onCreateLayoutManager
  • C. onPreferenceTreeClick
  • D. onCreatePreferences

Answer: C

 

NEW QUESTION 36
@Query is the main annotation used in DAO classes. It allows you to perform read/write operations on a database. Each @Query method is verified at compile time, so what happens if there is a problem with the query?

  • A. a runtime error occurs instead of a compilation failure.
  • B. a compilation error occurs instead of a runtime failure.
  • C. both compilation error and runtime failure occurs.

Answer: B

 

NEW QUESTION 37
An example. In our ViewModelFactory (that implements ViewModelProvider.Factory) we have an instance of our Repository, named mRepository. Our ViewModel has such constructor:
class MyViewModel(private val mRepository: MyRepository) : ViewModel() ...
Next, in our ViewModelFactory create ViewModel method (overriden) looks like this:
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
return try {
//MISSED RETURN VALUE HERE"
} catch (e: InstantiationException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
} catch (e: IllegalAccessException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
} catch (e: NoSuchMethodException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
} catch (e: InvocationTargetException) {
throw RuntimeException("Cannot create an instance of $modelClass", e)
}
}
What should we write instead of "//MISSED RETURN VALUE HERE"?

  • A. modelClass.getConstructor()
    .newInstance(mRepository)
  • B. modelClass.getConstructor(MyRepository::class.java)
    .newInstance()
  • C. modelClass.getConstructor(MyRepository::class.java)
    .newInstance(mRepository)

Answer: C

 

NEW QUESTION 38
......

Authentic Best resources for Associate-Android-Developer Online Practice Exam: https://www.prep4away.com/Google-certification/braindumps.Associate-Android-Developer.ete.file.html