Loading...

The Free Online Tutorials, and Always will be.

Android Interview Questions

What is Android ?


Android is an operating system developed by google and it is widely used in mobile phones and tablets. it is linux based os.

What is Activity in Android ?


Activity is a class in the android which provides the screen (UI) in the Android app.
an android app is a collection of Activities.
for example :
main page or (main screen UI) in android app -> MainActivity extends Activity
login page or (login screen UI) in android app -> LoginActivity extends Activity

What are Intents in Android ?


An Intent is used to communicate between two Activities. it is used to start a new Activity in android.
it also used to send data from one Activity to another Activity in android. it provides a message passing technique in android.

Difference b/w Activities and Services ?


Activities runs in screen UI (front-end) whereas Services runs in the background.
In Activities user interacts with app through screen UI but in case of Services user can't interact with the app.
Services runs in background continuously when there is no Activity in the screen (UI). for example :
playing an mp3 song in the background when there is no app screen is present.

What is ANR ?


ANR stands for Application Not Responding. it refers to a small alert dialog in the screen.
it appears when the app don't give any response within specific time period .
for example :
it will appear on the screen if
   -> there is no response to an input event (such as key press) within 5 seconds.
   -> there is a BroadcastReceiver which hasn't finished execution within 10 seconds.

which languages android support for developmment ?


Kotlin is now the official language supported for android development.
but java is popular and widely used language for android app development.
android also supports languages like c, c++.

What is a fragment ?


A fragment represents the portion or part of a UI in Activity. fragments are reusable components i.e used in an Activity.
a fragment is just like a Sub Activity in tha Main Activity which has its own behaviour and layout. it is specially used in multi pane apps.
An Activity can have multiple fragments which have their own behaviours and layouts.