Important Interview Questions for Android 


Q 1: What is the significance of Android in the smartphone industry?

Ans: Developers may produce and record apps running in Android environments in particular. This implies that any Android-enabled mobile device may support these apps and operate them. With Android mobile devices' rising popularity, developers may benefit from this trend by developing and submitting their applications to everyone in the Android Market for distribution.

Q 2: Distinguish service from activities.

Ans:  Activities can be stopped, or the user desires closed at any moment. The services are, however, meant to function and act independently in the background. Most services are ongoing regardless of whether specific actions are performed or not.

Activities             

  • They are intended to be at the forefront.     
  • Used when the user interface is necessary.
  • They are dependent.

Services

  • They are designed mostly for background running. There are also foreground services.
  • Used if the user interface is not required.
  • They act independently.

Q 3: What's an intent? Describe three frequent uses for the intent. 

Ans: Intent is a message object used to request an action from other program components. It is also suitable for starting an activity, sending messages, email, webpage display, etc. It shows user notification messages from an Android device. It notifies the user of a certain occurring condition. The two types of intents in Android are; Implicit Intent, which is used to invoke the system components, and the Explicit Intent used to invoke the activity class.

Notable uses for the intent include:

  • Cases of common usage to utilize an intent include:
  • You may start an activity by sending an Intent to startActivity() function.
  • By passing an intent on a starterservice(), you may start a single action (for example, download a file).
  • By giving an intent to sendBroadcast() or sendOrderedBroadcast(), you may send a broadcast to other applications ().

Q 4: Explain the dialog boxes supported on Android.

Ans:  Android supports four dialog boxes. They are:

AlertDialog:

The AlertDialog supports a list of selectable elements like as checkboxes and Radio buttons with 0-3 buttons. It is used to request the user to decide between yes and no while keeping in a certain activity without changing screens in response to any special measures made by the user.

DatePickerDialog:

the user uses it to select the date.

TimePickerDialog:

it is used for the purpose of time selection by the user.

ProgressDialog:

It is an AlertDialog extension and is used to display an advance bar. It can also support added buttons. In API level 26, this class has been devalued since the user cannot interact with the program. Instead, we may use the ProgressBar indication integrated into the user interface of your program.

Q 5: What is Google Android SDK? Which are the tools placed in Android SDK?

Ans:  The Google Android SDK is an application-writing toolkit used by developers on Android devices. The tools placed in Android SDK are given below:

  • Android Emulator - Android Emulator is a software program that simulates Android devices on your computer so you may test the application without needing every real device on a wide range of devices and Android API levels.
  • DDMS (Dalvik Debug Monitoring Services) is an Android Software Development Kit (SDK) debugging tool that includes text formation, call spoofing, screenshots capture, etc.
  • ADB(Android Debug Bridge) is a tool for the command line to control the emulator instance communication.
  • AAPT(Android Asset Packaging Tool) is a building tool that allows developers to see, create, and update ZIP files. (zip, jar, and apk)