Introduction
أ.سعاد محمد عثمان
Mobile application   Course name
      flutter        Lab course
                     Lab degree
        40
                     Mid exam
        20
                     Final exam
        40
                                                                                                                           cont
Ord   Units/          Learning                                                                                   Number of act
                                                                  Sub Topics List
 er Topics List       Outcomes                                                                                    Weeks    hour
                                                                                                                             s
                                         What's is mobile application? , Compare Mobile devices vs. desktop
          Getting                         devices.
 1                    a1,a2,b1,d1                                                                                  1w      2
          Started                          Architectures of mobile operating system , Obtaining required tools
                                         Creating virtual device , Launching first application
       Using IDE
               for                       Exploring the IDE, Using Code Completion
 2    application    a1,a2,b1,c1,d1      Debugging the Mobile Application, Publishing the Mobile Application       1w      2
     developmen                          Generating a Signed APK.
                 t
                                         Appling Styles and Themes to an Activity,     Hiding Activity Window
                                         Displaying a Dialog Window,       Displaying a Progress Dialog
       ,Activities                       Linking Activities Using Intents.
 3   ,Fragments      a1,b1,c1,c2,d1      Adding Fragments Statistically and Dynamically, Life Cycle of             3w      6
     And Intents                          Fragments.
                                         Project Management Software, Interaction Between Fragments.
                                         Understanding the Intent Objects        Using Intent Filters
                                         Understanding the Component of a Screen
                                         Adapting to Display Orientation, Managing Changes to Screen
             User                         Orientation.
 4                   a2,b1,b2,c2,d1                                                                                2w      4
        Interface                         Utilizing the Action Bar.
                                         Creating the User Interface Programmatically, Listening for UI
                                          Notification
      Designing                          Using Basic Views
             the                         Using Picker Views
 5               a1,a2, ,b2,c2,d1                                                                                  2w      4
       Interface                          Using List Views to Display Long Lists , Using Spinner View
     With Views                          Understanding Specialized Fragment
            Data                         Saving and Loading User Preferences, Persisting Data to File
 6                 b1,b2 c2,d1,d2                                                                                  3w      6
     Persistence                          Creating and Using Database.
                        a1, b1,b2        Web Services Using HTTP,     JSON Services,   Client-server
 7    Networking                                                                                                    2w      4
                       c1, ,d1,d2         applications
Mobiles and OS
Mobile application
   A mobile application, or mobile app, is a type of software designed to run on mobile
    devices such as smartphones, tablets, and wearable devices. These applications are
    developed to provide specific functionalities or services, ranging from productivity
    tools to entertainment
Key Features of Mobile
:Applications
Platform-specific Development:
        Apps are often built for specific operating systems such as Android or iOS.
        Tools like Android Studio or Xcode are used for development.
   User Interface (UI):
        Mobile apps have interfaces optimized for touch input, smaller screens, and gestures (e.g.,
         swiping, pinching).
   Internet Connectivity:
        Many apps rely on an active internet connection for functions like real-time updates, data
         synchronization, or cloud services.
   Wide Range of Uses:
        Utility apps: Calendars, reminders.
        Social apps: Facebook, WhatsApp.
        Gaming apps: Candy Crush, PUBG.
        E-commerce apps: Amazon, eBay.
        Productivity apps: Google Docs, Trello.
Mobile Operating Systems
    An OS is a software interface that is responsible for managing and operating hardware
     units and assisting the user to use those units. For mobile phones, OSs have been
     developed to enable users to use phones in much the same way as personal computers
     were used 1 or 2 decades ago. The most well-known mobile OSs are Android, iOS,
     Windows phone OS, and Symbian. The market share ratios of those OSs are Android
     47.51%, iOS 41.97%, Symbian 3.31%, and Windows phone OS 2.57%. There are some
     other mobile OSs that are less used (BlackBerry, Samsung, etc.) .
Mobile Operating Systems
    iOS
    Apple's very own operating system, iOS runs the company's iPod, iPad, iPhone, and Apple Watch devices. It
     is only available on Apple products and responds to commands from the user's fingertips. iOS features
     iTunes for music and the App Store for everything else. One of the benefits of the Apple operating system is
     its built-in video chatting and Apple Music capabilities.
    Android
    Android's OS is owned by Google and is considered open-source to Apple's closed system. With an open-
     source system, software developers can build applications and programs to their heart's content and users
     reap the benefits of tons of free software. Most Android lovers cite the operating system's openness, which
     leads to more personalization options, as the reason they're hardcore devotees.
    Windows
    Windows is no stranger to computer operating systems, but its mobile OS was a Microsoft operating system
     for smartphones and Pocket PCs. A version of the Windows mobile OS uses the tiled layout; it can be
     rearranged and moved to the user's preferences.
General Mobile OS Architecture
Layers
   A mobile OS architecture generally consists of the
    following layers:
   Hardware Layer:
        The physical components of the device, including the CPU,    System Libraries and Middleware:
         GPU, memory, sensors, cameras, and communication                 System libraries offer APIs for basic
         modules (e.g., Wi-Fi, Bluetooth).                                 functions like graphics rendering, database
                                                                           management, and file systems.
        Managed by the lower layers of the OS.                           Middleware provides higher-level services
                                                                           such as communication, multimedia, and
   Kernel Layer:                                                          application frameworks.
        Acts as the core of the OS, managing hardware resources
                                                                      Application Framework Layer:
         and providing low-level services such as memory                  Provides tools and libraries for developers to
         management, process scheduling, and hardware                      create applications.
         abstraction.                                                     Includes UI toolkits, APIs for accessing
                                                                           sensors, and other resources.
        Common kernels:                                              Application Layer:
           
                                                                          The user-facing layer where installed
               Android: Modified Linux kernel.
                                                                           applications run.
              iOS: XNU (a hybrid of Mach and BSD).                       Apps interact with the underlying layers via
                                                                           the application framework.
   Hardware Abstraction Layer (HAL):
        Provides a bridge between the hardware and software
         layers.
        Allows higher-level software to communicate with
         hardware without needing to know its implementation
         details.
iOS Architecture
    Core OS:
        Based on the XNU kernel.
        Manages low-level tasks like process scheduling, security, and hardware
         communication.
    Core Services:
        Includes essential services such as SQLite, iCloud storage, and networking APIs.
    Media Layer:
        Manages audio, video, and graphics rendering.
        Frameworks like AVFoundation and CoreGraphics.
    Cocoa Touch Layer:
        High-level frameworks for user interface design and app interaction.
        Includes UIKit, which is central to app development in iOS.
    Applications:
        Native and third-party apps developed using Swift or Objective-C.
Windows Phone (Legacy)
Architecture
    Kernel:
        Based on a modified version of the Windows NT kernel.
    Hardware Abstraction Layer (HAL):
        Abstracts hardware specifics for portability.
    Core Services:
        Provides APIs for networking, file systems, and databases.
    Presentation Layer:
        Handles graphics rendering and UI components.
    Applications:
        Developed using Microsoft’s .NET framework.
Android Architecture
    Linux Kernel:
         Core functionalities like process management, device drivers, and memory management.
         Modified for mobile requirements (e.g., energy efficiency and low latency).
    Hardware Abstraction Layer (HAL):
         Standard interfaces for hardware interaction (e.g., camera, audio, sensors).
    Libraries:
         C/C++ libraries for functions like graphics (OpenGL ES), databases (SQLite), and media
          (Stagefright).
    Android Runtime (ART):
         A runtime environment for executing Android applications.
         Apps are compiled to bytecode and executed in ART.
    Application Framework:
         Components like Activity Manager, Resource Manager, and Content Providers.
         Provides APIs for app development.
    Applications:
         Includes both system apps (e.g., phone, messaging) and user-installed apps.
Harmony OS Architecture
(Huawei)
   Kernel:
       Microkernel design for improved efficiency and security.
   Device Virtualization Layer:
       Enables distributed functionality across devices.
   Application Framework:
       Allows developers to create apps that can run on various devices.
   Applications:
       Cross-platform apps for smartphones, TVs, and IoT devices.
Mobile application
   A mobile application, most commonly referred to as an app, is a type of application
    software designed to run on a mobile device, such as a smartphone or tablet computer.
   Applications are separated into three general categories: native applications, web apps,
    and hybrid applications.
:Native Mobile Apps
   Native mobile apps are designed to be “native” to one platform, whether it’s Apple iOS,
    Google’s Android, or Windows Phone. The native platform can be advantageous
    because it tends to optimize the user experience. Because it was developed specifically
    for the platform, it can operate more quickly.
:Web Apps
   Responsive websites switch to a different design when they are accessed from a mobile device. Adaptive
    web applications, on the other hand, scale to fit the different screen sizes of mobile devices. For these apps,
    the design doesn’t change. Web apps are built using the most popular programming languages, but they
    can’t use hardware on mobile devices or be sold in any app store.
:Hybrid Mobile Apps
These apps can be installed on devices just like native apps, but they run through web
browsers. All hybrid apps are developed through the HTML5 programming language.
Though hybrid apps are not as fast or reliable as native apps, they have a greater capacity
for streamlining the development process. Because you don’t have to build and maintain
apps for separate platforms, your business can save on time and resources.
Cross-Platform applications
   The purpose of these cross-platform apps is to solve the hybrid performance problem
    and the cost problem when writing a variety of native languages for each mobile
    platform.
   Programmers only need to program once and compile or translate into many Native app
    versions corresponding to each different platform.
Flutter
   Flutter is a free and open-source mobile UI framework created by Google and released in May 2017. In a few words,
    this allows you to create a native mobile application with only one code. It means that you can use one programming
    language and one codebase to create two different apps (IOS and Android).
   Flutter is a great tool from Google for creating cross-platform applications which can be deployed to the web,
    desktop, and mobile.
   Google is promoting Flutter as a simple framework that allows us to create quality maintainable solutions. Easy, it is
    just the next cross-platform framework.
Flutter
    Two important parts of flutter particularly responsible for its popularity are:
1.   SDK (Software Development Kit)- It is a collection of tools that supports developing
     applications. This is for creating beautiful apps for mobile, web, and desktop.
2.   Frameworks -It is a collection of reusable elements like text inputs, slide buttons, hot
     reload and many more that can be personalised for our own needs.
A Brief History of Flutter
Flutter Architecture
   Flutter is organized around layers. Each layer is build upon the previous.
Everything is a widget
   In Flutter, Everything is a widget nested inside the another widget. It comes with beautiful,
    customizable widgets and we can control the behavior of each widget and also styling
    becomes easy.
   In Flutter everything is built on Widgets. UI elements, styles, themes, and even state is
    managed in specific Widgets.
   All the widget of a Flutter app form a hierarchy where a widget is a composition of other
    widgets and each widget inherits properties from its parent.
Flutter Key Features
Flutter Key Features
     1. Hot Reload
     The changes made by the developers can be seen instantaneously with Hot Reload. This feature
      is super-handy for developers as it makes the changes visible in the app itself. As the changes
      made are visible within seconds, developers can fix the bugs in no time.
     The team can experiment with new features and improvise them continuously. Thus, this feature
      enables developers and designers to have complete freedom and boosts their creativity further.
     2. Cross-Platform Development
     CPD saves time, energy and money. With Flutter, you need to write the code once, maintain and
      can use that for two apps. The need has gone for developing a different code for a different
      platform. With Flutter, you can try developing for the Fuchsia platform which is a trial OS in
      process at Google.
     3. Accessible Native Features and SDKs
     Your app development process gets easy and delightful through Flutter’s native codes, third-
      party integrations, and platform APIs. Therefore, you can easily access the native features and
      SDKs on both Android and iOS platforms and reuse the widely-used programming languages
      such as Kotlin and Swift.
Flutter Key Features
     4. Minimal Code
     Flutter is developed using Dart programming language. Dart uses JIT and AOT compilation that
      helps improve the overall startup time, functioning and accelerates the performance. JIT
      enhances the development system with the hot reload function. It refreshes the UI without
      putting in the effort to building a new one.
     5. Widgets
     In Flutter, the widgets are given an upper hand. It is capable of developing customizable and
      complex widgets. Most importantly, Flutter has all the sets of widgets from Material Design and
      Cupertino pack and it helps to provide a glitch-free experience in this case over and above all
      the other platforms.
     6. Native Feel and Features
     Flutter enables you to use your existing code Java, Obj-C and Swift to gain the key to native
      features which are platform specific. Camera and Geo location are features connected with the
      use of native languages and offers you the convenience of working in the native language and, it
      provides access to the native features of both iOS and Android platforms.
Dart language
   Dart is the programming language that Flutter uses. It is focused on building front-end user
    interfaces and front-end apps. By using it, you will be able to create either web apps or
    mobile apps.
   It is developed by Google and is a class-based, object-oriented, and strongly typed
    programming language. Dart’s syntax is very similar to languages like Java or JavaScript.
   To implement the dart language open the online IDE:
                                       https://dartpad.dev