In this post, we are discussing about the four fundamental building blocks from which all the android applications builds. These building blocks are implemented as Java classes.
Pictured above is a diagrammatic representation of android application fundamental which explores android components and other fundamentals by Romain Chiappinelli.
There are four major building blocks of Android, let’s understand them.
Unlike activities, services don’t need any user interface and runs in the background thread. We basically place long running operations in services. They provide a way for different processes to request operations and share data. Example: music application, while playing a song, it still plays in the background even though we close the app.
Broadcast receivers are the fundamental components that listens to and responds to events. It acts as a subscriber that listens to its required Intents and respond to it. Example: messaging app, shows a notification when we receive a message.
If an application manages data and needs to expose that data to other applications, we use Content Providers. It allows applications to store and share data. If an application needs to access data from another application this can done through Content Provider of that application. The access might read or write or both operations. Similarly, content provider provides data to the same containing application as well. Thus, we can say content provider is a database style component that handles inter-process communication between applications. Example: messaging app, explores our contacts through contacts application.
Like many people, YouTube has become my primary source of music. I listen to its automatic playlists all the time, and the fact that it seems to learn my preferences and introduces me to new music is just awesome. There is just one annoyance: YouTube ads Now, I don’t hate ads. I actually find them […]
With the increase in a number of digital devices, organizations are facing bandwidth issues. Users within the organization are downloading same content multiple times resulting in the consumption of international bandwidth. A simple solution might be to increase the bandwidth. But, can there be ways to solve this problem? The answer is “YES”. Caching servers […]