Android Terminology Topics

Android SDK(Software Development Kit)

  • Like JDK of Java, The Android SDK (Software Development Kit) is a set of development tools and libraries provided by Google for creating applications for the Android operating system.
  • It includes a variety of components that enable developers to build, test, and debug Android apps.
  • Developers use the Android SDK to create a wide range of applications, including games, productivity apps, social media apps, and much more.
  • The SDK supports various programming languages, but Java and Kotlin are the most commonly used languages for Android app development.
  • Before starting Android app development, we need to download and install Android Studio, which comes bundled with the Android SDK and all the necessary tools to get started.
  • Some key components of the Android SDK are as follows:-
    • Android Emulator/Android Virtual Device(AVD):
      • The Android Emulator allows developers to run and test their apps on a virtual Android device without the need for a physical device.
      • It comes with various pre-configured device profiles and allows for the simulation of different Android versions and screen sizes.
      • It’s an essential tool for app testing across different Android versions and device configurations.
    • Android Debug Bridge (ADB):
      • ADB is a command-line tool that allows communication between a developer’s computer and an Android device or emulator.
      • It’s used for tasks like installing and debugging apps, accessing the device shell, and transferring files.
    • SDK Manager:
      • The SDK Manager is a tool within Android Studio that enables developers to download and manage different versions of the Android SDK, as well as additional development tools, platforms, and system images for testing on various Android devices.
    • Android Virtual Device (AVD) Manager:
      • The AVD Manager allows developers to create and manage virtual Android devices (AVDs) for use with the Android Emulator.
      • Developers can configure various aspects of the virtual device, such as screen size, Android version, and hardware specifications.
    • Android SDK Tools:
      • The SDK Tools include various command-line utilities, build scripts, and other development-related resources required for app development.
    • Android SDK Build Tools:
      • These are a collection of command-line tools that automate the build process for Android apps.
      • The Build-Tools include tools necessary for building and compiling Android app projects, i.e. They compile code, package resources, and create the APK (Android Package) file that can be installed on devices.
    • Android SDK Platform Tools:
      • These tools contain essential platform-specific utilities or components like ADB, Fastboot, and other utilities for communicating with Android devices and emulators at a lower level.
    • Android Support Library (now replaced by AndroidX):
      • This library provided backward compatibility for older Android versions and various additional features to enhance app development.
    • Android API Documentation:
      • The SDK comes with comprehensive documentation that covers all aspects of Android development, including APIs, classes, and guides.
    • Samples and Code Templates:
      • The SDK also provides sample projects and code templates to help developers get started with different app features and functionalities.

APK File

  • An APK file (Android Package Kit) is the package file format used by the Android operating system for the distribution and installation of mobile apps.
  • It contains all the necessary elements, such as the app’s code, resources, assets, and manifest file, required for installing and running an Android application on a device.
  • The developers create an Android app, they compile it into an APK file, which is essentially a compressed archive in ZIP format.

    Android Tool Repository

    • There is no official & specific “Android Tool Repository” maintained by Google or Android itself. But, the Android Open Source Project (AOSP) is a single entity. However, there are several repositories and tools related to Android development and AOSP available on various platforms and websites which are rich with various tools and resources that developers and users can access to build, modify, and enhance Android applications and devices.
    • ‘Android Tool Repository’ tools are typically available through different sources, including official Google resources, open-source projects, and third-party platforms.
    • As we understand the Android ecosystem is continuously evolving, and new resources and repositories emerge regularly.
    • Some common Android development resources and repositories are:-
      • Android Developer Website:
        • The official Android Developer website, maintained by Google, is a comprehensive resource for Android developers.
        • It provides documentation, tutorials, code samples, best practices, and guidelines for building Android apps.
        • Website: https://developer.android.com/
      • Android Open Source Project (AOSP):
        • AOSP is the open-source codebase of the Android operating system.
        • It includes the core components of Android and serves as the foundation for custom ROMs and other Android-based projects.
        • Website: https://source.android.com/
      • Android Studio IDE:
        • Android Studio is the official integrated development environment (IDE) for Android app development.
        • It offers a suite of tools and features to streamline the app development process.
        • Website: https://developer.android.com/studio
      • GitHub:
        • GitHub is a popular platform for hosting and collaborating on software projects, including Android apps and libraries.
        • Many open-source Android projects and tools are available on GitHub.
        • Website: https://github.com/
      • Android Developer Samples:
        • Google offers a collection of sample apps with source code that demonstrate various Android development techniques.
        • These samples are available on GitHub: https://github.com/android/ and on the official Android Developer website.
      • Android Arsenal:
        • Android Arsenal is a website that curates a collection of Android libraries and tools.
        • It’s a useful resource for discovering new and popular Android projects.
        • Website: https://android-arsenal.com/
      • XDA Developers:
        • XDA Developers is a well-known community forum focused on Android development and customization.
        • It contains discussions, guides, and tools related to Android devices and software.
        • Website: https://www.xda-developers.com/
      • Android Developer Documentation:
        • The official Android developer documentation provides comprehensive guides, API references, tutorials, and other resources for Android app development.
        • Website: https://developer.android.com/docs
      • Android SDK Tools:
        • The Android SDK (Software Development Kit) provides various tools and libraries required for Android app development.
        • We can download it through Android Studio’s SDK Manager.
      • Android NDK (Native Development Kit):
        • This kit is used to develop Android apps using native code (C/C++), the Android NDK is essential. Y
        • We can find information and download it on the official NDK website: https://developer.android.com/ndk
      • Gradle:
        • Gradle is the build automation tool used in Android Studio to manage dependencies and build Android projects.
      • Android Jetpack:
        • Android Jetpack is a suite of libraries and tools that make Android app development more efficient by providing a set of high-level APIs.

    Dalvik Virtual Machine(DVM)

    Link for Difference between DVM and ART

    • Dalvik Virtual Machine (DVM), is a virtual machine used in older versions of the Android operating system to run Android applications. However, with the release of Android 5.0 (Lollipop), the Android Runtime (ART) replaced Dalvik as the default runtime environment. ART uses Ahead-of-Time (AOT) compilation, in which apps are compiled to machine code before they are installed on a device. This offers improved performance compared to the Just-In-Time (JIT) compilation used by Dalvik.
    • Unlike JVM of Java which is a Stack-based VM while DVM is a register-based fast and occupies less memory virtual machine.
    • DVM supports the Android operating system only. 
    • ART brought various improvements over DVM, such as faster app startup times, reduced memory usage, and improved battery life.
    • The name Dalvik comes from a town in Iceland, which is the hometown of Dalvik’s developer, Dan Bornstein.
    • The Dex(Dalvik eXchange) compiler converts one or multiple class files(generated by the Java compiler using Java source codes) into a single .dex file that runs on the Dalvik VM.  Thus, the .dex tool transforms Java bytecode or class files to Dalvik bytecode/.Dex file. This .dex file is finally handled and processed by the Android Assets Packaging Tool (AAPT) and converted into an APK file as a packaging process. Finally, the DVM translates the Dalvik bytecode to binary machine code.

    Manifest File

    • A “manifest file” generally refers to the “AndroidManifest.xml” file which is an XML file that every Android app must include in its root directory.
    • It’s a critical component in an Android app project, which is actually a configuration file that provides essential information about the app to the Android operating system. The main activity (entry point) of the app is declared in the manifest, allowing the system to launch the app when it’s opened by the user.
    • The AndroidManifest.xml file is a required file in every Android app project because It contains metadata about the app, such as its package name, version, permissions, components (activities, services, broadcast receivers, content providers), and required hardware features.
    • It provides crucial information to the Android system about the app’s components, capabilities, permissions, and how the app should interact with the system and other apps.
    • The manifest file contains the major part of the app’s components, including:
      • Activities: User interface screens.
      • Services: Background processes.
      • Broadcast Receivers: Respond to system-wide events.
      • Content Providers: Manage shared app data.

    Thus, the AndroidManifest.xml file contains these mandatory elements/components and configurations, under the <application> XML  encapsulation.

    <manifest      xmlns:android="http://schemas.android.com/apk/res/android"     package="com.example.myapp">
    <application
        android:icon="@drawable/app_icon"
        android:label="@string/app_name">
        <activity
                   android:name=".MainActivity"
                    android:label="@string/app_name">
           <intent-filter>
                           <action android:name="android.intent.action.MAIN" />
                            <category android:name="android.intent.category.LAUNCHER" />
                      </intent-filter>
              </activity>
     </application>
         <uses-permission android:name="android.permission.INTERNET" />
    </manifest>
    • The manifest file lists the permissions the app requires to access certain features or resources on the device, such as accessing the internet, using the camera, reading contacts, etc. When users install the app, they’re informed about the permissions it needs.
    • The manifest XML file contains Intent filters that define how the app responds to various actions or intents. For example, which activities to launch when certain actions occur, like opening a URL or viewing a specific type of file.
    • The manifest file also stores App configuration which includes information like the app’s package name, version code, version name, minimum, and target SDK versions, and more. This helps the system identify and manage the app.
    • Various settings related to additional metadata that provides information to the app, such as the app’s labels, icons, theme styles, minimum required SDK version, target SDK version, etc., are defined in this manifest file. 
    • We can modify the AndroidManifest.xml file using a text editor or the built-in Manifest Editor in Android Studio. Any changes or additions to this file should be made with careful consideration, as incorrect configurations can affect the app’s behavior or prevent it from running as expected. But, it’s important to keep the manifest file accurate and up to date, especially when adding new components, permissions, or making changes to app configuration.

    Logcat 

    • Logcat is a powerful debugging tool provided by the Android operating system that allows developers to view and analyze log messages generated by their applications and the Android system itself from time to time.
    • It helps developers to track and understand the behavior of their apps, identify issues, and monitor the flow of information during app development and testing.
    • It’s a crucial tool for understanding our app’s behavior, tracking down issues, and ensuring a smooth app development and user experience.
    • In Android Studio, we can access Logcat by clicking on the “Logcat” tab at the bottom of the screen. We can choose different filters, highlight specific log levels, and search for specific text within log messages.
    • There are different types of Logcat information/checkpoints generated which have different meanings to track the issues of Android apps. These are –
      • Logging Messages:
        • In Android app development, we can use the Log class to output log messages at various levels of severity. The available log levels are:
          • Log.v(): Verbose
          • Log.d(): Debug
          • Log.i(): Info
          • Log.w(): Warning
          • Log.e(): Error
      • Viewing Logcat Output:
        • We can view log messages using Android Studio’s built-in Logcat viewer or through command-line tools like ADB Logcat.
        • Log messages are displayed in real time, showing the log level, tag (a string identifier for the message source), and the message itself.
      • Filtering Logcat Output:
        • Logcat can display a lot of information, so filtering is essential.
        • We can filter by log level, application package name, or specific tags.
        • This helps us to focus on relevant information while ignoring unrelated messages.
      • Custom Tags:
        • Assigning custom tags to our log messages helps us to categorize and identify messages related to specific components or functionality within our app.
      • Debugging and Troubleshooting:
        • Logcat is an essential tool for diagnosing issues and debugging apps.
        • By analyzing log messages, we can trace the execution flow, understand the sequence of events, and identify potential errors or unexpected behavior.
      • Runtime Information:
        • Logcat is not only useful during development but also for monitoring apps in production.
        • It can provide valuable runtime information about the behavior of our app in real-world scenarios.
      • Security and Privacy Considerations:
        • While log messages are helpful for debugging, it’s important to avoid logging sensitive information, such as passwords or personal data. Log messages can be accessible to others if not properly secured.

    Toast

    • Toast is a form of short alert message shown on the Android screen for a short interval of time.
    • Android Toast is actually a short popup notification that is used to display information when we perform any operation/event in our app.
    • A Toast message disappears automatically after a short time. If a user wants to appear a permanently visible message, then a notification can be used.

    Categories: Android

    0 Comments

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.