Presentation is loading. Please wait.

Presentation is loading. Please wait.

CHAPTER 1 Introduction. Chapter objectives: Understand what Android is Learn the differences between Java and Android Java Examine the Android project.

Similar presentations


Presentation on theme: "CHAPTER 1 Introduction. Chapter objectives: Understand what Android is Learn the differences between Java and Android Java Examine the Android project."— Presentation transcript:

1 CHAPTER 1 Introduction

2 Chapter objectives: Understand what Android is Learn the differences between Java and Android Java Examine the Android project structure Build a basic application using Android Studio Learn about the Model-View-Controller design

3 1.1Android Platforms First-generation Android phones did not include many of the features users are familiar with Since 2008, Android has been enhanced in a multitude of ways, improving its performance, the user interface design, and adding many features, such as voice searching By 2015, Android applications were including fluid animations, bold color palettes, and sophisticated multitasking menus that featured voice interactions

4 Table 1-1 shows the evolution of Android

5

6 Google services were integrated as part of the Android operating system since the first installment Two of the most substantial inclusions of Android 1.0 were Google Maps and Notifications Notifications remains an important part of the Android user interface In current releases of Android, this feature has been refined to include chat messages and calendar events that support synchronization across all Android devices

7

8 By the time Cupcake appeared in 2009, refinements, such as the inclusion of self- refreshing widgets and copy-and-paste, had been implemented One of the most significant features that emerged with Cupcake was the introduction of a soft keyboard, which also brought the first forms of keyboard skins Keyboard skins are created by third-party developers to provide enhancements to an existing soft keyboard

9 Unique to Android, skins allow users to personalize their keyboard Skins have evolved alongside Android and have shifted beyond basic appearance and into more extensive behavior than originally seen in Cupcake Today, Android device manufacturers regularly offer skins that enhance the user experience by adding functionality to the design.

10 Android 2.2 was created with the ability to execute far faster than previous versions This was due to the introduction of the new Dalvik Just-In-Time (JIT) compiler, first seen on Froyo Dalvik allowed for better CPU performance, which significantly enhanced processing power Froyo’s browser came with a new JavaScript engine, making Internet browsing nearly three times faster than the previously released version of Android Froyo also brought native support for tethering.

11 Gingerbread the first version of Android that backed multi-core processing on mobile devices For application developers, Gingerbread brought support for new technologies, such as NFC (Near Field Communication), and SIP (Session Initiation Protocol) The SIP API provides developers with tools to create applications that perform video conferencing and instant messaging

12 Honeycomb was released as the first version of Android specifically implemented for tablets Prior to Honeycomb, Android tablets were running on phone operating systems that were stretched to fit the screen of a larger tablet

13 Ice Cream Sandwich combined the best characteristics of Gingerbread and Honeycomb into a single operating system that would work for tablets and phones Ice Cream Sandwich was able to bring many of the design elements of Honeycomb to smartphones, while refining the Android experience

14 Jelly Bean it was a faster and smoother Android version Along with its Google Voice Search feature, Jelly Bean was a jump in magnitude of performance This version of Android was often referred to as a turning point for Android, where services and customization options met responsive design guidelines KitKat looked similar to Jelly Bean; however, due to a 512 MB size it was able to run on a much larger array of devices

15 Lollipop is the latest version of Android being used by developers Lollipop and 64-bit chips provide enhanced performance with graphics, decoding and encoding of high-resolution video, and algorithms for facial recognition and speech interaction

16 1.2 Java vs. Android Java A large number of Java libraries are available in the Android platform The SDK includes a debugger, software libraries, and an emulator for an Android device

17 differences between the Java API and the Android API There is no Java virtual machine in the Android platform Dalvik is a specialized virtual machine Once Java has been compiled into bytecode by the Java compiler, it is compiled again into a proprietary bytecode Bytecode loaded by the Dalvik virtual machine should not be confused with Java bytecode The dex bytecode is a compact Dalvik executable format designed for Android systems, which are constrained in terms of memory and processor speed The Android SDK includes the Dalvik dx tool, used to translate java bytecode into Dalvik bytecode

18

19 1.3 Android Studio IDE Android Studio is the official IDE for building Android applications Developed by Google, this environment focuses exclusively on Android development and comes bundled with the Android Software Development Kit, SDK The SDK provides developers with a packaged set of developer tools and API libraries for building complete applications, testing them on virtual devices, and performing debugging and optimization

20 Java Editor Layout Editor Android SDK Android SDK Archive AVD Gradle

21 1.4 The Basics of App Design The process for building an application

22 1.5 The Anatomy of an Android Project A project built in Android Studio, will be structured similar to Figure 1-6 Project structure is organized by source code, the application’s resources, manifest settings, and build files All of these files are eventually packaged into an apk file, which represents the final

23

24 1.5.1 Android Manifest File An AndroidManifest.xml, is required for every Android application This file uses XML code to define specific application information This information can include general application-wide settings such as the application’s style and launch icon.

25 1.5.2 Java Source Code and Activity class files The Java source code of an application is placed in the java directory of the project structure A main file, often named MainActivity or sometimes MyActivity, is a java file that is auto-generated when the project is first built It may have a different name, depending on the Android Studio version you are using

26 1.5.3 Drawable Resources The drawable folder is located in the res directory res contains the application resources Drawable resources are image files, such as application icons, buttons, and background textures

27

28 generalized screen sizes: xlarge screens are at least 960dp x 720dp large screens are at least 640dp x 480dp normal screens are at least 470dp x 320dp small screens are at least 426dp x 320dp

29 1.5.4 Layout XML files User interface screens are visually designed and coded as XML layout files The design and arrangement of the elements on the screen are implemented using XML code in a layout file.

30 1.7 Model-View-Controller Android applications tend to rely on the Model-View-Controller design architecture This architecture assigns one of three roles that objects can play in an application For example, an object can be a Model, View, or Controller

31

32 1.9 Sharing your Android Applications Android requires the application to be digitally signed with a certificate Android uses this certificate to identify the author Android apps typically use self-signed certificates, in which the app developer holds the certificate’s private key


Download ppt "CHAPTER 1 Introduction. Chapter objectives: Understand what Android is Learn the differences between Java and Android Java Examine the Android project."

Similar presentations


Ads by Google