Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please do not attempt this mobile apps(Anroid) development question if you don\'

ID: 3672037 • Letter: P

Question

Please do not attempt this mobile apps(Anroid) development question if you don't know the exact answer.

Use some mobile apps name as an example(facebook, viber, gmail, googlemaps...etc) to explain the following components in mobile apps(Anroid) development. I'm NOT looking for definition only, but it's more important to use apps name as an example to explain how those mobile apps are using these components.

a) Activity

b) Service

c) Content provider

d) Intent

Note: No copy/paste from Google search please.

Explanation / Answer

As I have 2+ years of Android Application Development Experience, make me eligible to answer this question.

Activity

Every application must have an activity. Activity is the container for UI elements. Whenever you start any application you start an activity. You start gmail it shows you list of mails which is in an activity. You start facebook it shows you in feed in an acitivity (this is very high level view). To show anything on screen you need an acitivity.

Service

Services are mostly used for long running background tasks (downloading), schedule tasks (alarms, checking for inbox messages). In gmail to donwload an attachment you use a service. If you have used any app which locks other apps these apps also uses services. Service for these kinds of apps always checks if an app started is password protected if it is then it starts an activity to insert password. Another example of chat messaging apps, they use services to check if new messages are available for user.

Content Providers

A process's data is not shared with other process. This stops other processes to mess around with data of your application. But sometimes you want your application's data to public to be used by other application. In such cases Content Providers comes to rescue. For example when facebook wants to invite friends from your phone contacts, your phone's Contact application provides this data through it's content provider. Yeah! That's right, that's why they are called as content providers.

Intent

"Intent" specifies your intent, your wish to do something. Like send a mail, call a friend, send a message, share on facebook etc. Whenever you want an another activity to do something for you, you use intent. With intent you pass data to another activity to perform operation on it.