Basic Building Blocks of Android :-
A few objects are defined in the Android SDK that every developer needs to be familiar with the most important ones are
1. Activity
2. Intent
3. Service
4.Content Provider
5.Broadcast Receiver
1. ACTIVITY :-
An Activity is a user interface screen . Application can contain one or more activities to handle different phases of the program. It is the entry point of an android App. Activity is alive i.e. each activity is responsible for saving its own state.
2.Intent :-
Intent is used to provide the communication between activity to activity, activity to broadcast receiver or activity to services. Intent is also a mechanism for describing a specific action,such as opening call log etc. In android Everything happens using intents so you have plenty of opportunities to replace or reuse components.
3. Services :-
A long running background process without any user interface is called Service. for example , consider a music player . The music may be started by an activity , but you want it to keep playing even when the user has moved on to a different program , so the code that does the actual playing should be in a service.
4.Content Providers :-
Content provider is used to share the data between multiple applications. it is the best way to share the global data between applications. for example google provides a content provider for contacts . All the information there -names , addresses , phone numbers and so forth -can be shared by any application that wants to use it.
5. Broadcast Receiver :-
Broadcast receivers are registered for system announcements like headset plugin, power connected/disconnected etc.
0 Comments