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 :
http://eazyprogramming.blogspot.in/2013/05/intent-and-intent-types-explicit-intent.html

What are types of Intent ?
               Explicit and Implicit Intents
see more :
http://eazyprogramming.blogspot.in/2013/05/intent-and-intent-types-explicit-intent.html

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 : 

Comments

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

For COMPLETE TUTORIALS see here :
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 sqlite.java : String s =editinfo.getText().toString(); long l=Long.parseLong(s); DBAdapter adapter=new DBAdapter(SQliteExample.this); adapter.open(); String returnedname=adapter.returnName(l); String returnednickname=adapter.returnickname(l); adapter.close(); editName.setText(returnedname); editNickName.setText(returnednickname);

How To Finish All Previous Activities in ANDROID ?

Some times we may need to close previous all activities before calling an intent, so that the previous activity do not loads on clicking the Android back button.Here is a simple sniffet for it.. Intent intent = new Intent(getApplicationContext(), MainClass.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent);