
Android app development is a complex process, but with the right tools and knowledge, you can create a top-notch app.
To start building an Android app, you'll need to choose a development environment, such as Android Studio, which provides a comprehensive set of tools for building, testing, and debugging Android apps.
The Android SDK (Software Development Kit) is a crucial component of the development process, providing a library of pre-built UI components, APIs, and tools for building Android apps.
Here are some key features of the Android SDK: it includes the Android API, which provides a set of libraries and tools for building Android apps, and the Android NDK (Native Development Kit), which provides a set of tools for building native code for Android apps.
You might like: Android Studio Sdk Manager
Android App Basics
An app is not just a single entity, but rather a collection of activities that work together to provide a cohesive user experience.
An activity is essentially a single screen that the user interacts with.
Intriguing read: Azure Assign Application to User
The icons you see in the app tray correspond to activities, not applications or .apk files.
If an activity is marked as exported in the manifest, the launcher can show the user an icon for it, which can be tapped to launch that activity.
An app may contain multiple exported activities, resulting in multiple icons appearing in the launcher.
This is why you might see multiple icons for a single app in the app tray.
Readers also liked: Application Launcher for Drive by Google Extension
App Structure
An Android application resides in a file with extension .apk, which is an extension of the .jar file format used for Java applications.
The .apk file contains several key components, including the AndroidManifest.xml file, which serves as the app manifest. This file tells the Android system about the app's components, the Android versions it will run on, and the hardware features and permissions it needs.
The AndroidManifest.xml file also lists the permissions required by the app, which are displayed to the user when they try to install the app from the Google Play Store. This allows users to choose whether to accept or reject the app based on its permissions.
Here are the main components of an Android application:
- AndroidManifest.xml
- Compiled Java bytecode in Dalvik classes.dex format
- (Optional) native machine code in architecture-specific subdirectories
- Application resources, such as screen layouts, text strings, and icons
Get Wikipedia App
The official Wikipedia app is now available for Android users.
You can browse mobile Wikipedia, share articles, and save them for offline use with the app.
It took years for Wikipedia to release an official Android app, but it's finally here.
The app pulls from the mobile site, allowing you to bookmark pages or search for entries located near you.
Android users get some extra perks, including saving articles for offline use and using Android's "Share" function.
You can also view any given article in a different language, rather than switching the language of the whole site.
Some reviewers have mentioned problems with the GPS not quitting correctly when the app is closed.
For your interest: How to Use Google Drive for Android
Writing Java Apps
Android applications are primarily written in the Java programming language.
The Java language syntax and semantics are reused by Android, but it doesn't provide the full class libraries and APIs bundled with Java SE or ME. Instead, Android provides its own GUI classes and doesn't support the full Java Beans API.
Curious to learn more? Check out: Web Based Application Programming Language
Each application runs in its own instance of the Dalvik Virtual Machine and under its own Linux user, designed to maintain a secure operating environment.
Android applications are delivered in form of .apk-files (zip-files signed with jartool, just with another suffix), which hold all the files needed for the application to operate.
These packages include the classes.dex-file, which is the file that gets executed inside the Dalvik VM, and the AndroidManifest.xml, which is a binary representation of the plain-text XML Manifest.
The Android SDK was released on November 12, 2007, and multiple versions have been released since then, including the Android 0.9 SDK beta and the Android 1.0 SDK.
Android applications are compiled into a .dex file format binary and are then packaged into an apk (zip archive) file.
The supported IDE for writing android Application is Eclipse, but it is by no means mandatory to use it.
If this caught your attention, see: Download Azure Wiki Files
Application Structure
An Android application typically resides in a file with the extension .apk, which is an extension of the .jar file format.
This file contains several key components, including the AndroidManifest.xml file, which tells the Android system about the components of the app, what Android versions it will run on, and what hardware features and permissions it needs.
The AndroidManifest.xml file also shows the permissions required by the app to the user when they want to install it from the Google Play Store, allowing them to choose whether to accept or reject the app.
The compiled Java bytecode in the .apk file is in Dalvik classes.dex format, rather than the traditional JVM.class format.
The .apk file can also include native machine code, which is architecture-specific and can be supplied in alternative versions under different subdirectories named armeabi, mips, and so on.
Application resources, such as screen layouts, text strings, icons, and colour specifications, are also included in the .apk file, mostly in XML format.
These resources can be created at runtime directly in the code, but keeping them in static form usually allows for easier management and allows the Android system to automatically provide selection from alternative resources based on the system configuration.
Recommended read: Azure Devops Wiki Code Block
App vs. Activity
An app is not the same as an activity, despite what you might think. An activity is essentially a single screen that the user interacts with.
In the app tray, you'll see icons that correspond to activities, not apps. These icons are shown because the activity is marked as exported in the manifest.
An app can have multiple activities, but not all of them are visible to the user. Only the exported activities will appear as separate icons in the launcher.
Think of it like a website with multiple pages. Each page is like an activity, and the website as a whole is like the app.
A different take: Free Website Blocker for Android
Tasks and Back Stack
A task is anything started by tapping an icon in the launcher, and it's automatically populated with entries from all installed apps.
These entries can be copied to home screens, and it's also possible to add shortcuts to home screens.
Typically, a task is started in a new process, and if such a process is already running, tapping the icon simply brings the existing process to the front.
However, it is possible to alter both these behaviours.
The first activity in a task can launch additional activities as appropriate, and any application you write other than the very simplest is likely to consist of more than one activity.
Pressing the standard Android Back key normally terminates the topmost activity, and makes the previously-topmost one active.
Terminating the root activity of a task terminates the task and returns the user to whatever task was running before, perhaps the launcher.
Activities within a task are never reordered as long as they are running; the only way to bring an activity that is not at the top of the back stack of a task to the top is to terminate all the activities above it in that task.
Tasks can be reordered, since any of the most recent eight tasks launched can be brought to the front at any time simply by leaning on the Home key and tapping on one of the entries that appear.
Explore further: Tracking User Activity in Web Applications
Save/Restore Instance State
Save/Restore Instance State is a mechanism that makes it look like your process has been running all along, even if the system needed to kill it due to low memory or an orientation change.
This is not the same as saving/restoring user data, but rather a way to resume your activity as if it had never terminated.
The system calls onSaveInstanceState and onRestoreInstanceState methods to save and restore the instance state of your activity.
However, if your activity is frontmost and the user presses the Back button, these methods are not called, and your activity will not resume precisely as though it had never terminated.
If your activity is frontmost and the user launches another activity on top of it, onSaveInstanceState methods will be called along with onPause.
When the user returns to your activity while it is still running, onResume will be called as usual, but there is no need to call onRestoreInstanceState.
Suggestion: Android Auto Not Working after Update
But if the system ran short of memory while your activity was not frontmost, it can be killed without the user noticing, and when the user returns to it, it will be relaunched, and onRestoreInstanceState will be called.
You get to decide what constitutes "instance state", so you can choose what to save and restore, like a map viewer app reverting to a fully-zoomed-out view every time the user launches it.
This means you can tailor the instance state to your app's specific needs, such as remembering the scroll position and zoom magnification.
Security and Performance
An APK file must be digitally signed by the developer before it can be installed on an Android device, allowing the device to verify the authenticity of the app.
This digital signature is not registered with Google or any other entity, it's simply a way to identify the developer.
The Android system assigns a dynamically-generated Linux user ID to each app, preventing them from accessing each other's data unless authorized to do so.
Expand your knowledge: Remove Ads from Youtube App Android
This user ID is a key part of Android's security model, ensuring that apps can't snoop on each other's activities.
Any processes and threads associated with an app continue to run even when the app is in the background, but they can't perform UI-related operations, except for sending notifications to the user.
Main Thread
The Main Thread is the initial thread that your app process starts with. It's the only thread where all UI calls must happen, with the exception of Handler methods and Activity.runOnUiThread.
You can't invoke Android UI classes on any other thread, as they're not thread-safe. This means you need to use an AsyncTask to manage background activities that need to coordinate with the UI.
The UI thread runs a Looper, which you can also instantiate on your own threads. If the UI Looper doesn't get CPU time within 5 seconds of a user event, you'll see the "Application Not Responding" (ANR) alert.
On a similar theme: Do I Need Onedrive on My Android Phone

You can queue short tasks to the Looper via Handlers using the post and postAtTime methods. More time-consuming operations should be relegated to a background thread.
Programmers familiar with Java from other platforms may be accustomed to using a TimerTask, but these run on their own thread and aren't safe for directly making UI calls.
Security Model
The security model of Android is designed to keep your device and data safe. An APK file must be digitally signed by the developer before it can be installed on an Android device.
This digital signature is what allows the device to verify that two different APK files come from the same developer. There's no need to register your signing key with Google or anyone else.
Once an app is installed, it's assigned its own dynamically-generated Linux user ID. This prevents apps from accessing each other's data, except in carefully-authorized ways.
The Android UI works in terms of tasks and activities, rather than standard POSIX-style processes and threads. But don't worry, this isn't something you need to worry about as a user.
Even when an activity is "stopped" in the background, its processes and threads keep running normally. The only recommended UI-related operations at this point are sending notifications to the user.
Discover more: Managing Applicant Data Why Is It Important
Memory Usage
Memory usage is a major concern for Android app developers, especially when it comes to Java code. Java objects are restricted to a heap size of about 20MB.
This limited heap size can cause issues, especially when working with Bitmap objects, which are also limited to their own heap area of a similar size. Failure to properly manage these objects can result in a "java.lang.OutOfMemoryError: bitmap size exceeds VM budget" error.
To avoid this, it's essential to call the recycle method on bitmaps when you've finished with them, as this will help free up memory and prevent crashes. Don't rely on the recycle method being optional, as it's not – it's a crucial step in memory management.
For another approach, see: Web Programming in Java
Trackers
Trackers can significantly slow down your computer, with some trackers consuming up to 30% of your CPU resources.
Malicious trackers can be used to steal sensitive information, including login credentials and credit card numbers, as seen in the example of the notorious "Heartbleed" bug.
Trackers can also be used to compromise your online security, by allowing hackers to access your system remotely.
The article section on "Malware" explains how trackers can be used to spread malware, making it essential to keep your antivirus software up to date.
Some trackers are so persistent that they can even survive a system reboot, as illustrated in the example of the "Cookie" tracker.
Regularly clearing your browser's cache and cookies can help to remove trackers and improve your online security.
Trackers can be used to build detailed profiles of your online behavior, allowing advertisers to target you with highly personalized ads.
This can be especially problematic for users who value their online privacy, as seen in the example of the "Cookie" tracker.
For your interest: Azure Asg
Development and Tools
The tools you'll need to develop an Android app are numerous, but some key ones include Android Studio, which is the official integrated development environment (IDE) for Android app development.
On a similar theme: Azure Application Development
Android Studio provides a comprehensive set of tools for building, testing, and debugging apps, including a code editor, a debugger, and a simulator.
To get started with Android app development, you'll also need the Java Development Kit (JDK) and the Android SDK. The JDK provides the necessary tools for compiling and running Java code, while the Android SDK provides the necessary libraries and resources for building Android apps.
A fresh viewpoint: Building Web Applications with Uml
Emulators And Subsystems
Android emulators are a crucial tool for developers, allowing them to test and run Android apps on their computers.
BlueStacks is a popular Android emulator that enables users to run Android apps on their Windows or macOS devices.
Genymotion is another well-known emulator that offers a range of Android versions and devices for testing.
LeapDroid is a lightweight emulator that's designed for testing Android apps on Windows devices.
MIT App Inventor is a free online platform that allows users to create and test Android apps without needing to write code.
Curious to learn more? Check out: Android Go Devices
Android Studio is a comprehensive development environment that includes an emulator for testing Android apps.
Android-x86 is a project that allows users to run Android on their Windows, macOS, or Linux computers.
Windows Subsystem for Android is a feature that enables users to run Android apps directly on Windows 11 devices.
Waydroid is a Linux-based emulator that allows users to run Android apps on their Linux systems.
Here are some popular Android emulators and subsystems, listed for easy reference:
- BlueStacks
- Genymotion
- LeapDroid
- MIT App Inventor
- Android Studio
- Android-x86
- Windows Subsystem for Android
- Waydroid
Alternative Programming Languages
Alternative programming languages offer Android developers a range of options beyond the traditional Java and Kotlin.
You can write programs for Android in JavaScript, HTML5, and CSS3 using Android/PhoneGap, which is discussed in another chapter of this book.
SL4A supports many scripting languages, giving developers a flexible choice for their projects.
Kivy is another option for writing Python apps for Android, providing a unique approach to app development.
Python For Android, used in conjunction with SL4A, allows developers to create Python apps for Android.
The Java code snippet `import java.util.ArrayList;` shows how Java is used in Android development.
Utility Libraries
Utility libraries can be a huge time-saver for Android developers, allowing you to write more efficient code and create a consistent user experience across different devices.
ActionBarSherlock is a popular utility library that supports modern action-bar style interfaces on earlier Android releases. This means you can create an app that looks and feels modern, even on older devices.
One library that simplifies UI and asynchronous coding is android-query. It's a great tool to have in your toolkit, especially when working on complex Android projects.
SlidingMenus is another utility library that provides a convenient way to implement the "slide panel right to reveal a menu" functionality in your app. This feature is a great way to add some visual interest to your app and provide users with easy access to important features.
Here are some popular utility libraries for Android development:
- ActionBarSherlock: supports modern action-bar style interfaces on earlier Android releases
- AndroidAnnotations: code generator that simplifies Android UI and asynchronous coding
- SlidingMenus: provides the "slide panel right to reveal a menu" functionality
- android-query: simplifies UI and asynchronous coding
Anime Tools
Anime Tools are a must for any fan of Japanese animation.
Jellyfin is a popular solution for anime enthusiasts, allowing them to easily download and manage their favorite shows.

If you're looking for a dedicated anime downloader, Crunchyroll-Downloader is a great option, although it's not specified which platform it's available on.
Another anime downloader worth considering is Anime Downloader NX, but unfortunately, its platform is also unknown.
For organizing your anime collection, Jellyfin and Emby are both great choices, with Jellyfin being a specific solution mentioned in the article.
Here's a quick rundown of some popular anime tools:
Client Tools
Client tools are a crucial part of the development process, and there are many options available.
For Android apps that support the mihon extension system, you can use them as clients for Jellyfin, Komga, Kavita, and LANraragi. Some examples of these apps include MAL-Sync, Jellyfin MPV Shim, and komf[Script].
If you're looking for Android emulators and subsystems, you have several options. BlueStacks, Genymotion, and LeapDroid are just a few examples, and you can also consider using Android Studio, Android-x86, or Windows Subsystem for Android.
Expand your knowledge: Connections - Oracle Fusion Cloud Applications
The type of client tool you choose will depend on your specific needs. For instance, if you're working with anime, you might want to use Jellyfin. If you're working with manga, Komga or Kavita might be a better choice.
Here are some client tools organized by the type of media they support:
These are just a few examples, and there are many more client tools available depending on your specific needs.
Featured Images: pexels.com


