Question: Which elements can occur only once and must be present?
Answer: Among the different elements, the “and” elements must be present and can occur only once. The rest are optional, which can occur as many times as needed.
Question: What are the core components under the Android application architecture?
Answer: There are 5 key components under the Android application architecture: – services
– intent – resource externalization – notifications – content providers
Question: How are escape characters used as attribute?
Answer: Escape characters are preceded by double backslashes. For example, a newline character is created using ‘\\n’
Question: What is the function of an intent filter?
Answer: Because every component needs to indicate which intents they can respond to, intent filters are used to filter out intents that these components are willing to receive. One or more intent filters are possible, depending on the services and activities that are going to make use of it.
Question: What is a Sticky Intent?
Answer: A Sticky Intent is a broadcast from sendStickyBroadcast() method such that the intent floats around even after the broadcast, allowing others to collect data from it.
Question: When does ANR occur?
Answer: The ANR dialog is displayed to the user based on two possible conditions. One is when there is no response to an input event within 5 seconds, and the other is when a broadcast receiver is not done executing within 10 seconds.