Brush-Up Android Concepts Before Interview - Part 1

by Tuesday, December 30, 2014 0 comments


Android Application Architecture:










Android Application Architecture has following components such as
Services, Intent, Resources Externalization, Notification signaling users, Content providers



Dalvik Virtual Machine
It is optimizes the JVM for memory,battery,performance. It optimized for mobile devices.

Activities
An activity represents a single screen with user interface.
 public void MyActivity extends Activity{  
 }  

Service
Service is like an Activity but has no interface. It is component that runs in background for long running process eg: music player
Types:
  • Unbound Services 
    • It runs in the background indefinitely, even if the activity which started this  service ends.
  • Bound Services
    • It runs till lifespan of the activity which started this service. Client-Server interface.
 public void MyService extends Service{  
 }  
 <service android:name=”.MyService”/>  

Intent
Describing specific action. 
Types:
  • Implicit Intent
    • It redirect from Activity in application to external application activity.
    •  Uri uri = Uri.parse(“http://www.google.com”);  
       Intent i = new Intent(Intent.ACTION_VIEW,uri);  
       startActivity(i);  
      
  • Explicit Intent
    • It redirect from Activity to another Activity in application.
    •  Intent i = new Intent(this,SecondActivity.class);  
       startActivity(i);  
      

BroadcastReceiver
It simply respond to broadcast messages from other applications or from the system.
 public class MyReceiver extends BroadcastReceiver{  
 public void onReceive(Context context,Intent intent){}  
 }  

Content Providers
A content provider component supplies data from one application to others on request.

karthik nagarajan

Androider

Welcome to Android-Action Blog. I’m a normal guy, who is passionate about Mobile Coding. Here I am writing about Android. Happy learning

0 comments:

Post a Comment