• +91 9723535972
  • info@interviewmaterial.com

Android Interview Questions and Answers

Android Interview Questions and Answers

Question - 21 : - How are escape characters used as attribute?

Answer - 21 : -

Escape characters are preceded by double backslashes. For example, a newline character is created using ‘\\n’

Question - 22 : - What is the importance of settings permissions in app development?

Answer - 22 : -

Permissions allow certain restrictions to be imposed primarily to protect data and code. Without these, codes could be compromised, resulting to defects in functionality.

Question - 23 : - What is the function of an intent filter?

Answer - 23 : -

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 is going to make use of it.

Question - 24 : - Enumerate the three key loops when monitoring an activity

Answer - 24 : -

  • Entire lifetime – activity happens between onCreate and onDestroy
  • Visible lifetime – activity happens between onStart and onStop
  • Foreground lifetime – activity happens between onResume and onPause

Question - 25 : - When is the onStop() method invoked?

Answer - 25 : -

A call to onStop method happens when an activity is no longer visible to the user, either because another activity has taken over or if in front of that activity.

Question - 26 : - Is there a case wherein other qualifiers in multiple resources take precedence over locale?

Answer - 26 : -

Yes, there are actually instances wherein some qualifiers can take precedence over locale. There are two known exceptions, which are the MCC (mobile country code) and MNC (mobile network code) qualifiers.

Question - 27 : - What are the different states wherein a process is based?

Answer - 27 : -

There are 4 possible states:

  • foreground activity
  • visible activity
  • background activity
  • empty process

Question - 28 : - How can the ANR be prevented?

Answer - 28 : -

One technique that prevents the Android system from concluding a code that has been responsive for a long period of time is to create a child thread. Within the child thread, most of the actual workings of the codes can be placed, so that the main thread runs with minimal periods of unresponsive times.

Question - 29 : - What role does Dalvik play in Android development?

Answer - 29 : -

Dalvik serves as a virtual machine, and it is where every Android application runs. Through Dalvik, a device is able to execute multiple virtual machines efficiently through better memory management.

Question - 30 : - What is the AndroidManifest.xml?

Answer - 30 : -

This file is essential in every application. It is declared in the root directory and contains information about the application that the Android system must know before the codes can be executed.


NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners