Android Developer Interview Questions
1.What is android?
Android is open source Linux based operating system with middle ware and some key applications
2.What are the advantages of android?
It means no licence, distribution and development fee.
Android is platform independent we can develop applications in mac, Linux and windows also by using android studio
Supports various technologies:
It supports camera, Bluetooth, WiFi, speech, EDGE etc. technologies.
DVM is highly optimized virtual machine which will convert to .dex file
3.What is an Activity?
Activity is like a frame or window in java that represents GUI. It represents one screen of android.
4.What is Activity life cycle?
There are 7 life-cycle methods of activity. They are as follows:
- onCreate() — called when activity is first created.
- onStart() — onStatrt will invoked when activity is becoming visible to the user.
- onResume() — onResume will invoked when activity will start interacting with the user.
- onPause() onPause will invoked when activity is not visible to the user.
- onStop() — onStop will invoked if activity is no longer visible to the user.
- onRestart() — onRestart will invoked if your activity is stopped and prior to start.
- onDestroy() — onDestroy will invoked before the activity is destroyed
5.What is the difference between margin and padding?
if you want to take your widget like TextView, EditText far away from other. You should use margin from top,right,left,bottom.
By giving padding the component size will be increased
6.What is the difference between gravity and layout_gravity?
android:gravity Is to specify to place content with in the object.if gravity is left means object content is going to be left to the component.
android:layout_gravity is an attribution the child can supply to its parent, to specify the gravity the view within its parents
7.What is APK?
APK means Android Package Kit.android is going to make apk file with all resources and code to install on mobile phone
8.What DVM and difference between DVM and JVM?
DVM means Dalvik Virtual Machine
DVM is Register based and specially designed to run on low memory
uses its own byte code and runs .Dex file
JVM is Stack based and convert all java code to .class files
9.What is AndroidManifest.xml?
Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory.We will register every activity ,services,broadcast receivers and content providers.We will declare all permissions in manifest file only.
10.What is a service in android?
Service is a background process that can run for a long time even after closing activity also.
11.What is Content Provider?
Content Providers are used to share data between the applications.
12.What is Broadcast Receiver?
A broadcast receiver (receiver) is an Android component it allows you to register for system events Like calls, notifications. Once we register a receiver, automatically receiver is going to call once that functionality is triggered.