Android App Development Basics - PDF

Summary

This document provides an introduction to Android App Development Basics, covering essential aspects such as programming languages, app components, and the AndroidManifest.xml file. It explains key concepts like Activities, Services, Broadcast Receivers, and Intents, offering a foundational understanding of Android app development.

Full Transcript

IT1918 Android App Development Basics The Manifest File App Fundamentals The manifest file (AndroidManifest.xml) details the components...

IT1918 Android App Development Basics The Manifest File App Fundamentals The manifest file (AndroidManifest.xml) details the components Some of the programming languages used in Android development that exists in an app. are the following: The element is the root element of the o C++ is close to C# and Java, it makes it easy for AndroidManifest.xml file. programmers to switch to C++ or vice versa. The element contains sub-elements that declare o Swift is the official programming language for iOS. each of the application's components and has attributes that can o Kotlin combines object-oriented and functional affect all the components. programming features. Kotlin uses two different keywords The required elements in the manifest file are and to declare variables: val (never changes) and var (can , which should occur only once. change). The element must be the last element inside the o Java element. o C# The icon and label that are set in the element are The app components are the essential building blocks of an Android the default icon and label for each of the app's components. app. o Activity is the entry point for interacting with the user. It represents a single screen with a user interface. An example is an activity that shows a list of new emails. o Service runs in the background to perform long-running operations or to perform work for remote processes. An example is playing music in the background while using a different app. o Broadcast receiver is a component that enables the system to deliver events to the app outside of a regular user flow, allowing the app to respond to system-wide broadcast announcements. An example is a broadcast indicating that the battery is low. o Content provider manages a shared set of app data that you can store which your app can access. An example is a content provider that manages the user's contact information and is requested by another app to read information about a particular person. App activities, services, and broadcast receivers are activated by intents. An intent is a message defined by an Intent object that describes an action to perform, including the data to be acted upon, the category of component that should perform the action, and other Figure 1. The Default AndroidManifest.xml File instructions. 02 Handout 1 *Property of STI  [email protected] Page 1 of 2 IT1918 The following must be declared in a manifest file: o The app's package name Ex. package="com.example.myapplication" o The app's components: ▪ for each subclass of Activity ▪ for each subclass of Service ▪ for each subclass of BroadcastReceiver ▪ for each subclass of ContentProvider Ex. o The permissions that the app needs in order to access protected parts of the system or other apps Ex. o The hardware and software features used or required by the app Ex. The element specifies the types of intents that an activity, service, or broadcast receiver can respond to. The element adds an action to an intent filter while adds a category name to an intent filter. References: DiMarzio, J. (2017). Beginning Android programming with Android Studio. Indiana: John Wiley & Sons, Inc. Google Developers Training Team. (2018). Android developer fundamentals (version 2). Retrieved from https://google-developer-training.github.io Android Developers (n.d.). Citing sources. Retrieved from https://developer.android.com/ 02 Handout 1 *Property of STI  [email protected] Page 2 of 2

Use Quizgecko on...
Browser
Browser