Skip to main content

Interview Questions 1 -- 10

See more basics on Android along with interview questions

What is definition of Android ?
               Android is a software stack for mobile devices that middleware, operating systems,
   and application-specific key. The application must be implemented in its own process
   and the Dalvik virtual machine interface. DVM is used effectively run multiple virtual
   machines. Java byte code is executed which is converted file format called Dex.

How the data will be stored in Android or types of data stored in Android ?
  •   Internal Storage
  •   Connecting to a network 
  •   General preferences 
  •   SQLite database
  •   External Storage
What are the components of Android Application ?
               Android is written in java programming language.Android application are composed of 
     some of the main components such as:
  •     Activities
  •     Services
  •     Content providers
  •     Broadcast receivers  
Explain each components of Android Application ?
  see this post

Explain life cycle of Android Appllication ?
              An activity is usually a single screen that the user sees on the device at one time. 
An application typically has multiple activities, and the user flips back and forth 
among them. As such, activities are the most visible part of your application.Activity 
Manager is responsible for creating, destroying, and managing activities. For example, 
when the user starts an application for the first time, the Activity Manager will create 
its activity and put it onto the screen. Later, when the user switches screens, the Activity 
Manager will move that previous activity to a holding place. This way, if the user wants to 
go back to an older activity, it can be started more quickly. Older activities that the user 
hasn’t used in a while will be destroyed in order to free more space for the currently active 
one. This mechanism is designed to help improve the speed of the user interface and thus 
improve the overall user experience.
see more :

What is an Android apk format?
              APK file is compressed AndroidManifest.xml file with the extension. Apk.
This android package file contains all of the files related to a single Android app.
This is the compressed collection of
  •     manifest file
  •     application code
  •     resource files
  •     and other files
What is an Intent ?
              All the components are activated by a message called Intents. Intents bind individual components to each other at runtime, whether the component belongs to your application or another. An intent is created with an Intent object, which defines a message to activate either a specific component or a specific type of component—an intent can be either explicit or implicit, respectively.
An intent is an abstract description of an operation to be performed. Intents are send to the Android system via a method call, e.g. via the startActivity() method. They can be said as a message which allow android components to request functionality from other components.
see more :

What are types of Intent ?
               Explicit and Implicit Intents
see more :

What are Intent Filters ?
               Activities and intent receivers include one or more filters in their manifest to describe what kinds of intents or message they can handle or want to receive.An intent filters lists a set of requirements, such as datatypes,action requested and URI format that the intent or message must fulfil. 

Explain Android Architecture?
see more : 


Popular posts from this blog

Passing Images between Activities in Android

in First Activity:
Intent intent=new Intent(FirstClass.this, SecondClass.class); Bundle bundle=new Bundle(); bundle.putInt("image",R.drawable.ic_launcher); intent.putExtras(bundle); startActivity(intent); in Second Acticity:
Bundle bundle=this.getIntent().getExtras(); int pic=bundle.getInt("image"); v.setImageResource(pic);another method:
in First Activity:
Drawable drawable=imgv.getDrawable(); Bitmap bitmap= ((BitmapDrawable)drawable).getBitmap(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.PNG, 100, baos); byte[] b = baos.toByteArray(); Intent intent=new Intent(Passimage.this,myclass.class); intent.putExtra("picture", b); startActivity(intent); in Second Acticity:
Bundle extras = getIntent().getExtras(); byte[] b = extras.getByteArray("picture"); Bitmap bmp = BitmapFactory.decodeByteArray(b, 0, b.length); Image…

Get a single record from SQLite in ANDROID

in DATABASE HELPER class: String[] coloumns = new String[] { KEY_ROWID, KEY_NAME, KEY_NICKNAME }; // calling elements in an array Cursor c = db.query(DATABASE_TABLE, coloumns, KEY_ROWID + "=" + l,null, null, null, null); if (c != null) { c.moveToFirst(); String name = c.getString(1); // since name is in position 1 ie second coloumn return name; } return null; in : String s =editinfo.getText().toString(); long l=Long.parseLong(s); DBAdapter adapter=new DBAdapter(SQliteExample.this);; String returnedname=adapter.returnName(l); String returnednickname=adapter.returnickname(l); adapter.close(); editName.setText(returnedname); editNickName.setText(returnednickname);

TextView Animation or Alpha animation (FadeIn , FadeOut) in ANDROID

An Alpha Animation is animation that controls the alpha level of an object, i.e. fading it in and out. In Android, you can apply that fading effect to almost anything, from simple text, to images, buttons, check boxes, etc…

This can be done both from xml and from java class.

Here I will explain a simple way to give a FadeIn and FadeOut for a textview on button click.. public class Textviewanimation extends Activity { Animation fadeIn,fadeOut; TextView tv; Button startanimation; Boolean fadeflag=true; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_textviewanimation); tv=(TextView) findViewById(; startanimation=(Button) findViewById(; fadeIn = new AlphaAnimation(0.0f , 1.0f ) ; fadeIn.setDuration(1200); fadeIn.setFillAfter(true); fadeOut = new AlphaAnimation(1.0f , 0.0f); fadeOut.setDurati…