Advanced Android
Héctor Chocobar Torrejón
Software Engineer | Professor | Senior Mentor | Fullstack Developer | Python | React | Data Science enthusiast
Below you can read a couple of paragraphs and technical vocabulary about advanced Android development.
Android Manifest Files
The basis of any Android applications is the?manifest?file: AndroidManifest.xml. This is located in the src/main/ directory of your application? module (the main set of code and other elements). This is where we declare what is inside our application:?activities,?services, etc. It also indicates how these pieces are connected and interact with the android system in general; for example, it indicates what activity (or activities) should appear on the main menu of the device.
When we create an application, we get a self-generated launch manifest. For a simple app, offering a single activity and nothing else, the self-generated manifest will probably work just fine, or perhaps require some minor modifications. At the other end of the spectrum, the manifest file for the Android API demo suite is over 1,000 lines long. An Android application in production will probably fall somewhere in between.
Activity Classes in Android
The Activity class is a crucial component of any Android application, and the way activities are started and grouped is a fundamental part of the platform application model. Unlike programming paradigms in which applications are started with a main() method, the Android system stars the code in an instance of an activity invoking certain callback methods that correspond to specific stages of the activity lifecycle such as onCreate(), onPause() or onDestroy().
The mobile app experience differs from its desktop counterpart in that user interaction with the app does not always start at the same place. Instead, the user’s journey through applications often begins in a non-deterministic way. For example, if we open an email application from the start interface, we might see an email list. Conversely, if we are opening an email?notification?it will take us directly to a specific email. Or via an?intent?we could have a social media application request the email application to open and compose an email to a determined address.
Vocabulary
Manifest
A manifest is a file which provides essential information about the application to the Android build tools, the Android operating system and Google Play.
Activity
An activity is an application component that interacts with the user and is often presented as a full-screen window.
领英推荐
Service
A service is an application component that does not provide a user interface and is intended to perform operations in the background. A service can continue executing for some time after it is started.
Notification
A notification is an application component that consists of a message that Android display outside the user interface of the application. For example, the user can get email notifications, calendar reminders or other information from an application.
Intent
Intent is an application component that uses a messaging object to request an action from another app component (such as activities, content providers, and services). They are also used to transfer data between activities. That is, they facilitate communication between components or the app.
Content provider
A content provider is an application component that manages the access to a set of data, providing mechanisms for defining data security and supplying data from one application to another on request.
Fragment
A fragment is a modular section of an activity that represents a behavior or a portion of user interface. Multiple fragments can be combined into a single activity and also reuse a fragment in multiple activities.
View
A view is the basic block for user interface components. It is the base to create interactive components such as buttons, text field, etc.