Android Interview Questions and Answers

Questions

66

Last updated

Dec 31, 2021

Android is a most popular mobile operating system which is not only used in mobile phone but on TV, cars, and smartwatches as well. Speaking of mobile phones, the primary function of android is to give the command to mobile applications to do the task. It’s like if you want to dial a number than android indicates Mobile to dial it. These Android Interview Questions are specially curated highly experienced industry professionals to help candidates in their future job success.

Advantages of Android

  • Multitasking is one of the main benefits of Android. You could listen to songs along with an Internet browsering on Android.
  • Access to hundreds of thousands of applications. You want to learn cooking, find the cooking app and start your learning.
  • An android user has many options for phones, and it's branding, which is available in the different price range. So, there is a variety of choices with Android.

Most Frequently Asked Android Interview Questions

Here in this article, we will be listing frequently asked Android Interview Questions and Answers with the belief that they will be helpful for you to gain higher marks. Also, to let you know that this article has been written under the guidance of industry professionals and covered all the current competencies.

Q1. What is Android? Explain
Answer

It is an open-source, Linux-based operating system which is used in mobile, phones, tablets, televisions, etc.

Q2. Who developed Android?
Answer

Andy Rubin

Q3. What does ADB stands for & what is it’s primary function?
Answer

Android Debug Bridge is the full form of ADB. ADB could control sharing of files along with cut & copy function of any PC from your system with the help of a USB.

Q4. What do you mean by ANR in Android ?
Answer

ANR stands for Application Not Responding. This pop-up comes when any application gets extra load , due to which it becomes unresponsive to open.

Q5. Is it possible to share similar Linux user I’d & same virtual machine in Android . If yes how ?
Answer

Yes , it could be possible when applications are signed with one certificate.

Q6. Should we change the name of a file after installing?
Answer

We should never change it as it could bring few errors in working of the application.

Q7. Write down the syntax to get a view element in the program?
Answer

[Android.Runtime.Register("findViewById", "(I)Landroid/view/View;",
"GetFindViewById_IHandler")]
public virtual View FindViewById (Int32 id)

Q8. Kindly name few of the last code given to android different versions?
Answer

Nougat, Marshmallow, Lollipop, KitKat, Jelly Bean, Ice Cream, Sandwitch & Honeycomb are the few of the last codes used for android versions .

Q9. What do you mean by intent in Android ?
Answer

Intent is sort of Instruction or information which is given to the components. Such as opening of any game, online page , send email & so on. Intent is further divided into 2 parts, which are Implicit & Explicit Intent.

Q10. Could you point out some of the prime advantages of Android?
Answer
  • Multitasking is one of the main advantage of android. You could listen songs along with Internet browsing on android.
  • Access to hundred of thousands applications. You want to learn cooking , just find cooking app and start your learning.
  • An android user has many options of phones and it's brands, which are available in different price range. So, there is variety of choices with android.
Q11. How could we move the data in sub activity?
Answer

Data could be moved from one activity to another with the help of bundles.
To know the coding, refer below :

Bundle b=new Bundle();
b.putString(“Email”, “[email protected]”);
i.putExtras(b); //where I is intent

Q12. What is an Android Virtual Device?
Answer

An Android Virtual Device is a device configuration that is run with the Android emulator. Android virtual device is used to test an application without any mobile or a tablet. It works on Android Emulator which gives a virtual device facilities. It gives the platform to install & run the application in order to test it.

Q13. What do you understand with an activity in Android?
Answer

An activity of android is a frame or a screen of any application. Any app, could create more than one activity . It’s like when we start any application its shows one activity , when we pause it displays panother activity & go on same way .

Q14. What is an android toast ?
Answer

An android toast is a form of message, which reflect for a user in terms of feedback. This message reflect for a very short time & goes away automatically.

Toast.makeText(getApplicationContext(),"Best Interview Questions",Toast.LENGTH_SHORT).show();

Q15. What are the storage facilities available on android?
Answer

Internal storage is the main facility given by android which is Internally based in device . Android also support external storage which could be done in the form of USB or Pen drive . Apart from internal and external storage , Android gives the facility of shared preferences and network connection for storage . Adding to this , SQLite database stores data in the form of text file & which is made for mobile devices .

Q16. Define fragment in Android?
Answer

Fragment is a section of an activity & usually called as sub - activity. Fragment functions in creating modular activity which enables multiple screen in a same time.

Q17. What do you understand by ANR dialogue box?
Answer

ANR stands for Application not responding . This dialogue box appears when any application is no longer working .

Q18. How could you show icon of an activity in manifest file?
Answer

<activity android:icon="@drawable/app_icon" android:name=".MyTestActivity"></activity>

To show icon in manifest file , open the ‘manifest’ & click on ‘AndroidManifest.xml’ . There we would find Application node . Just add the above code in application .

Q19. What do you mean by Android SDK?
Answer

Android SDK is tool for app developers to create app for google. SDK performs the necessary actions of app development like debugging & testing.

Q20. Could you name a few key components of Android?
Answer

Key components of android includes view, intent, service, activity, fragment, content provider & android virtual device.

Q21. How to mention an activity in manifest file?
Answer

<manifest></manifest>
<application></application>
<activity android:name="”.MyIntellipaat”"> </activity>

Q22. How android is beneficial for app. developers?
Answer

Android is one of the most popular mobile platform today in the world. App. developer just needs to create and register his app on android platform. After this, any android user from across the globe could download and install his application. By just having presence on android platform, an app. developer gets huge market of ready customers.

Q23. What is the core work of intent filter?
Answer

The basic function of intent is to identify & select the type of intent for any component.

Q24. Specify key disadvantages of android?
Answer
  • Many android apps contain viruses, which destroys a mobile health.
  • Android needs internet to perform any task. It is of no use for a person not having an internet connection.
  • You couldn't work in flow on android as bulk advertising stops you every time.
Q25. In Android, how to insert swipe animation?
Answer

<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator=”false”>
<translate android:fromXDelta=”-100%”
android:toXDelta=”0%”
android:fromYDelta=”0%”
android:toYDelta=”0%”
android:duration=”700"/>
</set>

Q26. What do you mean by Service in Android?
Answer

A service in Android is a component which runs in the background even when the application is demolished.

Q27. What do you mean by ActivityCreator?
Answer

It is a batch file and shell script which was used to create a new Android project. It is now replaced with "Create New Project" in Android SDK.

Q28. Lists life cycle methods of android activity?
Answer
  • onCreate()
  • onStart()
  • onResume()
  • onPause()
  • onStop()
  • onRestart()
  • onDestroy()
Q29. Why we use LINUX ID in android?
Answer

A unique Linux ID is assigned to each application in android and it is used for the tracking of a process.

Q30. Explain the Android Application Architecture?
Answer

It has following application components architecture.

  • Services
  • Intent
  • Resource Externalization
  • Notification
  • Content Providers
Q31. What do you mean by adb?
Answer

Adb stands for Android Debug Bridge. It helps developers the power to execute remote shell commands. It's basic function is to allow and control communication towards and from the emulator port.

Q32. What do you mean AIDL?
Answer
AIDL stands for Android Interface Definition Language. It handles the interface requirements between a client and a service so both can communicate at the same level through interprocess communication.
Q33. What is the use of content provider?
Answer

It is used to share information between Android applications.

Q34. How to communicate between two fragments in Android?
Answer
Q35. How do you make a view visible and invisible on Android?
Answer
Q36. What are the different Viewgroups in Android?
Answer
Q37. How are Android touch events delivered?
Answer
Q38. What is the difference between RecyclerView and ListView in android?
Answer
Q39. What is the ViewHolder pattern? Why should we use it?
Answer
Q40. What is the use of BroadcastReceiver in Android?
Answer
Q41. What happens to AsyncTask if activity is destroyed?
Answer
Q42. How do you handle bitmaps in Android as it takes too much memory?
Answer
Q43. How do you manage portrait and landscape on Android?
Answer
Q44. How do you find memory leaks in Android applications?
Answer
Q45. How to reduce battery usage in an android application?
Answer
Q46. What is the difference JVM, DVM and ART?
Answer
Q47. What is Android Jetpack and why to use this?
Answer
Q48. What is the use of LiveData in Android?
Answer
Q49. How do you troubleshoot a crashing application in android?
Answer
Q50. What is the difference between Serializable and Parcelable? Which is the best approach in Android?
Answer
Q51. What is the best way to update the screen periodically in Android?
Answer
Q52. How to create custom Annotation in Android?
Answer
Q53. What is the use of dependency injection in Android?
Answer
Q54. What is the difference between MVC MVP and MVVM in Android?
Answer
Q55. How to make offline first app in Android?
Answer
Q56. What are the disadvantages of using robolectric in Android?
Answer
Q57. How to measure method execution time in Android?
Answer
Q58. How to use firebase realtime database in your app in Android?
Answer
Q59. Why enumeration is faster than iterator?
Answer
Q60. Why can't we run standard Java bytecode on Android?
Answer
Q61. What are Launch modes in Android?
Answer
Q62. How does job scheduler work in Android?
Answer
Q63. What is the ontrimmemory() method Android?
Answer
Q64. What are the advantages of using fragment compared to activity?
Answer
Q65. What is singleton class in Android?
Answer
Q66. What is the name of debugging tool available in Android?
Answer