Android Basic Interview Questions

android basic interview questions

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:

  1. onCreate() — called when activity is first created.
  2. onStart() — onStatrt will invoked  when activity is becoming visible to the user.
  3. onResume() — onResume will invoked when activity will start interacting with the user.
  4. onPause() onPause will invoked when activity is not visible to the user.
  5. onStop() — onStop will invoked if activity is no longer visible to the user.
  6. onRestart() — onRestart will invoked if your activity is stopped and prior to start.
  7. 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 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.


Kotlin For Android Developers

Kotlin For Android Developers

Kotlin For Android Developers

Kotlin is a new programming language from JetBrains, the maker of the world’s best IDEs. Now Kotlin supported by Google For Android.
Kotlin comes from industry, not academia. It solves problems faced by working programmers today. As an example, the type system helps you avoid null pointer exceptions. Research languages tend to not have null at all.

1. Why Kotlin

1.1 Java Interoperability
Kotlin language is inter-operable with java. It means we can user previous java project with new kotlin classes also and all java frameworks are still available. We have a one click java to kotlin converters also.
1.2 Familiar syntax
Kotlin Language syntax is very familiar to any programing language who came from OOP domine. There are some differences compare to Java such as val, var
Class Example{
val a:String= “Kosmik” //val means unmodifiable
Var i:int=1 // var means modifiable
Fun hellworld(){
Val str=”hello”
print(“$str World”)
1.3 String Interpolation
It’s as if a smarter and more readable version of Java’s String.format() built into the Kotlin language
var x=4
var y=3
print(“sum of $x and $y is ${x+y}”) //sum of 4 and 7 is 11
1.4 Open Source
It is open source under apache 2.0
1.5 Compatibility
Kotlin is fully compatible with JDK6 and kotlin applications can run on older android devices also
1.6 Performance
Kotlin application will run fast as an equal to java
1.7 Support
Kotlin is fully supported from Android Studio 3.0
1.8 Some Syntaxes
  1. No more semicolons ;
  2. Variable declaration is different in kotlin like var is mutable and val is immutable
  3. Functions in kotlin (methods)

fun sum (x: Int ,y: Int): Int{

return x+y


  1. when function

Now switch changed into when a condition, which is very easy to understand  like below example

when (x) {

   1 -> print(“x is 1”)

   2 -> print(“x is 2”)

   3, 4 -> print(“x is 3 or 4”)

   in 5..10 -> print(“x is 5, 6, 7, 8, 9, or 10”)

   else -> print(“x is out of range”)


6.creating a class in kotlin

val rectangle = Rectangle(5.0, 2.0) //no ‘new’ keyword required

val triangle = Triangle(3.0, 4.0, 5.0)

Android Training in Hyderabad

kosmik provides Android training in Hyderabad, we are providing lab facilities with complete real time training & 100% job assistance will be there
Brief History of Android

Brief History of Android

What Is Android?

 Android is an operating system for mobile devices. Such as smartphones and tablet computers. It invented by the Open Handset Alliance led by Google. It built on a Linux foundation. Google purchased the initial developer of the software, Android in 2005. An Android distribution on November 5, 2007, was announced. Android founder of Open Handset Alliance. The consortium of 84 hardware, software, and telecommunication companies standards for mobile devices.

 Android Training  Hyderabad

This alliance shares a common goal of fostering innovation on mobile devices. The consumers a far better user experience is available on today’s mobile platforms. It provides developers with a new level of openness. That enables them to work more Android will speed up the pace. Which new compelling mobile services made available to consumers. Android is often symbolized by the green robot to the right.

Android has evolved since its launch. Google has named all projects after a dessert. The main releases listed below, this is nothing you have to memorize. It’s to illustrate the rapid pace of development and all the innovations. Android developed “on Internet time”, that is much faster than the old style of development Android Training  Hyderabad.

Features & Specifications

Android is an Operating System supporting a large number of Smart Phones. These applications make life more comfortable and advanced for the users. Hardware that supports Android based on ARM architecture platform.

Android comes with an Android market which is an online software store. It developed by Google. Android users to select, download applications developed by third-party developers use them. There are around 2.0 lack+ games, application, and widgets available on the market for users use in Android Training  Hyderabad.
  Android applications are written in Java programming language. Android is available as open source for developers to develop applications. This further used for selling in an android market. There are 200000 applications developed for Android with over 3 billion+ downloads. Android relies on Linux version 2.6 for core system services. It has security, memory management, process management, and network stack and driver model.


These are the basics of Android applications

Android applications composed of one or more application components
• Each component performs a different role in the application behavior activated
• The manifest file must declare all components in the application. It all application requirements the least version of Android hardware configurations required
• Non-code application resources should include alternatives for different device configurations
Google, for software development and application development. It launched two competitions ADC1 and ADC2 innovative applications for Android. It offered prizes of USD 10 million combined in ADC1 and 2. ADC1 launched in January 2008 and ADC 2 launched in May 2009.

 Android Training Hyderabad

Kosmik Provides Android training in Hyderabad. We are providing lab facilities with complete real-time training. Training is based on complete advance concepts. So that you can get easily “hands-on experience”. We will give 100% job assistance.