Create your account

Already have an account? Login here

Note: By joining, you will receive periodic emails from Coursetro. You can unsubscribe from these emails.

Create account

38. Activity, Fragment Service Receiver and Intent

Design + Code an Android App from Scratch

Woah, wait a second..

Scrounge up some loose change to become a pro member, or login to your account to view this lesson.

Alright, join now. Or login to your account if you're already a pro member.

This video demonstrates the basics of the various components involved in building Android apps. An activity is a single, focused thing that the user can do. Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your UI with setContentView(View).A Fragment represents a behaviour or a portion of user interface in an Activity. You can combine multiple fragments in a single activity to build a multi-pane UI and reuse a fragment in multiple activities. You can think of a fragment as a modular section of an activity, which has its own lifecycle, receives its own input events, and which you can add or remove while the activity is running.A Service is an application component that can perform long-running operations in the background and does not provide a user interface. Another application component can start a service and it will continue to run in the background even if the user switches to another application. A BroadcastReceiver is an Android app component that responds to system-wide broadcast announcements. An intent is an abstract description of an operation to be performed. An Intent provides a facility for performing late runtime binding between the code in different applications. Its most significant use is in the launching of activities, where it can be thought of as the glue between activities.

Course Cirriculum