Learning objectives
- Provide an overview of the difference between mobile apps and mobile websites.
- Explain how the mobile Operating system works.
- The Android Operating system.
- Introduction to Android development.
Mobile Platforms
A mobile app is an installable software that runs on a smartphone device. Mobile apps use the device's hardware, and software features and usually provide an efficient, more intuitive, and seamless user experience.
What is the difference between a mobile app and a mobile website?
A mobile app is software that runs on a hardware device whereas a mobile website works on a mobile app and does not involve any hardware to be functional.
What are the advantages of mobile apps and a mobile website?
Mobile app
- Faster than mobile websites
- Can access resources eg location, Bluetooth, etc.
- Can work without internet access
Mobile website
- Cheap to build and maintain
- Need not to be built from scratch to be compatible with other platforms
- No approval is required from Appstore
Note:To determine whether to develop a mobile website or mobile app always ask yourself what specific actions you expect your product to perform.
How does a Mobile OS work
The most fundamental software for any mobile device is its OS. An OS is designed to coordinate communications that occur between the hardware and apps of mobile devices. It manages the overall experiences of an app.
Mobile operating system
A mobile OS typically starts up when a device powers on, displaying different application icons and user interface (UI) elements to users.
Uses of Operating system
- Allows smartphones, tablets, and personal digital assistants (PDAs) to run applications.
- OS provides a channel with which applications can access device resources such as the processor, memory, Wi-Fi, Bluetooth, and more.
The most common operating systems are Android and iOS.
Android
- Android is a mobile OS that was released in 2008.
- Android OS is based on a modified version of the Linux kernel and is an open-source software which means anyone can modify it.
- Android OS was built primarily for smartphones, Chromebook, Android TV, and Android Auto, as well as wearables such as smartwatches.
- Android has built-in sensors such as gyroscopes and accelerometers, which gives users a multi-touch experience.
iOS
- iOS is Apple’s proprietary OS that runs on the iPhone, iPad, and other mobile devices
- Same as Android, iOS has built-in sensors such as gyroscopes and accelerometers, which gives users a multi-touch experience through several actions such as swiping, pulling, and tapping, and users can seamlessly interact with the screen.
- With the rise in popularity of iOS, developers now have more controls and access to its features.
Other mobile operating systems include kaiOS which runs on Mozilla Firefox, SailfishOS from Jolla, and Huawei's HarmonyOS which was released in 2019 and runs on a microkernel that Huawei developed. Mostly used in IoT devices.
Android Platforms
- Being the most used operating system in the world, Android is not limited to only mobile devices. Android is also used to power other devices due to its openness to others.
- Android platforms include, Chromebook, Android TV, Android Auto, and WearOS.
Chromebook
- Chromebooks are portable laptops that have support for running Android apps, which gives them more features.
- Chromebooks operate on Google's ChromeOS.
- Ability to use convertible form factors to not necessarily build apps from scratch for phones and tablets from ChromeOS.
Android TV
- Android TV is designed to bring the mobile experience to your TV.
- The voice control feature of the TV allows you to have complete control over your devices.
Android Auto
- It allows you to connect your phone to your car display.
- It automatically shows your apps on your car display and makes it possible for you to get driving directions and navigate seamlessly.
- Android Auto is made to help you stay focused on the road.
WearOS
- WearOS is Google's Android OS that is specifically designed to power smartwatches and other wearables.
- The early release of WearOS allowed watching owners to install WearOS apps through their mobile phones from the google play store.
Introduction to Android Development
Android Languages
- In the world of Android development, Java and Kotlin are both extremely popular programming languages.
- Java, which was released by Sun Microsystems in 1995 while Kotlin was introduced by JetBrains in 2011.
-Kotlin has officially become the preferred language for Android app development due to the following reasons;
1. It is concise and standardized hence low code errors.
2. Easier to maintain complex projects due to low code.
3. It is compatible with java hence easy to convert java
code to Kotlin.
4. Kotlin handles errors that crash Android apps better
than java.
The Android OS
- Android is a Linux-based OS primarily designed for touchscreen mobile devices such as smartphones and tablets.
- Some of the unique features and characteristics of the Android OS include:
- Near-field communication: This feature makes it easy for electronic devices to communicate over short distances.
- Wi-Fi: With this feature, users can connect to various wireless access points around them due to these in-built technologies that support Wi-Fi protocols.
- Custom home screen: Android OS allows you to further personalize your home screen the way you like it.
- Widgets: Used for home-screen customization to give you a glance view of users' most important data.
- App downloads: users can unlock the full potential of the Android operating system through app downloads.
- Custom ROMS: Android can use customized and modified versions of Android OS to access features of a recent on an older device.
The Android OS Architecture
- Consists of components that Android needs to be functional.
- Android is built on top of an open-source Linux kernel and other C and C++ libraries exposed via application framework services.
-
The Android OS is a stack of software components roughly divided into five sections:
- Applications
- Application frameworks
- Android runtime
- Platform Libraries
- Linux Kernel
These are separated into 4 layers, as shown in the architecture diagram below.
Android App Cheatsheet
- To get started with developing an app, you need a clear understanding of relevant concepts.
- These concepts include:
Top-level component
- Enables apps to connect to the internet, make calls, and take pictures through BroadcastReceiver, ContentProvider, and Service and activity accessible in Android SDK.
Activity Components
- These are activities present for content users to interact with on the screen.
- Single activity architecture pattern allows one activity or a relatively small number of activities to be used for an entire app.
Android views
- This is the design interface that occupies a rectangular area on the screen and is responsible for drawing and event handling. It displays text, images, and more.
Android layout files
- In Android, each layout is represented by an XML file. These plain text files serve as blueprints for the interface that your application presents to the user.
Project files
- Android Project Files belong to one of three main categories: configuration,code, and resource. Configuration files define the project structure, code files provide the logic, and resource files provide essentially everything else.
Anatomy of An Android App
- This basically looks into the components that go in when creating an App.
- An Android app is made up of four major components that serve as the building blocks of any Android app in the market.
- The four major components include:
- Activities: This is the entry point of users that represent a single user. It allows you to place UI components, widgets, or user interfaces on a single screen. eg a music player app may have an activity that shows you a list of your favorite songs, another activity that allows you to play a specific song, and another which shows you a list of trending songs.
- Services: They run in the background and constantly update the data sources and activities with the latest changes. It also performs tasks when users are not active on applications. eg A good example of a service is chatting with someone whilst listening to music.
- Broadcast Receiver: Its purpose is to respond to messages from other applications or systems in real time. eg,imagine you're enjoying your favorite song on your music app when you get a notification that you're running low on battery power.
- Content providers: It's responsible for sharing data between applications. eg A typical example is a social media app that allows users to share their images online.
These Android components are coupled by a configuration file called AndroidManifest.xml. It is used to specify each component and how they interact with each other.
Extensible Markup Language(XML)
- XML (Extensible Markup Language) is used in the presentation of different kinds of data. Its main function is to create data formats that are used to encode information for documentation, records, transactions, and several other data formats.
- For an XML document to be valid, the following conditions must be fulfilled:
- The document must be well-formed.
- The document must comply with all the rules of the XML syntax.
THE END.
Thank you for taking the time to go through the article!!
Top comments (0)