Download as pdf or txt
Download as pdf or txt
You are on page 1of 70

Android Studio Arctic Fox Essentials

Java Edition Developing Android Apps


Using Android Studio 2020 31 and Java
Neil Smyth
Visit to download the full and correct content document:
https://ebookmeta.com/product/android-studio-arctic-fox-essentials-java-edition-devel
oping-android-apps-using-android-studio-2020-31-and-java-neil-smyth/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Android Studio Electric Eel Essentials Java Edition


Developing Android Apps Using Android Studio 2022 1 1
and Java Neil Smyth

https://ebookmeta.com/product/android-studio-electric-eel-
essentials-java-edition-developing-android-apps-using-android-
studio-2022-1-1-and-java-neil-smyth/

Android Studio Electric Eel Essentials Kotlin Edition


Developing Android Apps Using Android Studio 2022 1 1
and Kotlin Neil Smyth

https://ebookmeta.com/product/android-studio-electric-eel-
essentials-kotlin-edition-developing-android-apps-using-android-
studio-2022-1-1-and-kotlin-neil-smyth/

Building Android Apps in Python Using Kivy with Android


Studio: With Pyjnius, Plyer, and Buildozer 1st Edition
Ahmed Fawzy Mohamed Gad

https://ebookmeta.com/product/building-android-apps-in-python-
using-kivy-with-android-studio-with-pyjnius-plyer-and-
buildozer-1st-edition-ahmed-fawzy-mohamed-gad/

Beginning Android Programming with Android Studio


_unlocked 4th Edition Jerome Dimarzio

https://ebookmeta.com/product/beginning-android-programming-with-
android-studio-_unlocked-4th-edition-jerome-dimarzio/
Android for Absolute Beginners - Getting Started with
Mobile Apps Development Using the Android Java SDK 1st
Edition Grant Allen

https://ebookmeta.com/product/android-for-absolute-beginners-
getting-started-with-mobile-apps-development-using-the-android-
java-sdk-1st-edition-grant-allen/

Learn Android Studio 3 with Kotlin: Efficient Android


App Development 1st Edition Ted Hagos

https://ebookmeta.com/product/learn-android-studio-3-with-kotlin-
efficient-android-app-development-1st-edition-ted-hagos/

Learn Java for Android Development Second Edition Jeff


Friesen

https://ebookmeta.com/product/learn-java-for-android-development-
second-edition-jeff-friesen/

Android for Java Programmers 1st Edition Abdul-Rahman


Mawlood-Yunis

https://ebookmeta.com/product/android-for-java-programmers-1st-
edition-abdul-rahman-mawlood-yunis/

Java Programming for Android Developers For Dummies 2nd


Edition Barry Burd

https://ebookmeta.com/product/java-programming-for-android-
developers-for-dummies-2nd-edition-barry-burd/
Android Studio Arctic Fox
Essentials
Java Edition
Android Studio Arctic Fox Essentials – Java Edition
ISBN-13: 978-1-951442-36-1
© 2021 Neil Smyth / Payload Media, Inc. All Rights Reserved.
is book is provided for personal use only. Unauthorized use, reproduction
and/or distribution strictly prohibited. All rights reserved.
e content of this book is provided for informational purposes only.
Neither the publisher nor the author o ers any warranties or representation,
express or implied, with regard to the accuracy of information contained in
this book, nor do they accept any liability for any loss or damage arising
from any errors or omissions.
is book contains trademarked terms that are used solely for editorial
purposes and to the bene t of the respective trademark owner. e terms
used within this book are not intended as infringement of any trademarks.
Rev: 1.0
Table of Contents
1. Introduction
1.1 Downloading the Code Samples
1.2 Feedback
1.3 Errata
2. Setting up an Android Studio Development Environment
2.1 System Requirements
2.2 Downloading the Android Studio Package
2.3 Installing Android Studio
2.3.1 Installation on Windows
2.3.2 Installation on macOS
2.3.3 Installation on Linux
2.4 e Android Studio Setup Wizard
2.5 Installing Additional Android SDK Packages
2.6 Making the Android SDK Tools Command-line Accessible
2.6.1 Windows 8.1
2.6.2 Windows 10
2.6.3 Linux
2.6.4 macOS
2.7 Android Studio Memory Management
2.8 Updating Android Studio and the SDK
2.9 Summary
3. Creating an Example Android App in Android Studio
3.1 About the Project
3.2 Creating a New Android Project
3.3 Creating an Activity
3.4 De ning the Project and SDK Settings
3.5 Modifying the Example Application
3.6 Modifying the User Interface
3.7 Reviewing the Layout and Resource Files
3.8 Adding Interaction
3.9 Summary
4. Creating an Android Virtual Device (AVD) in Android Studio
4.1 About Android Virtual Devices
4.2 Creating a New AVD
4.3 Starting the Emulator
4.4 Running the Application in the AVD
4.5 Running on Multiple Devices
4.6 Stopping a Running Application
4.7 Supporting Dark eme
4.8 Running the Emulator in a Tool Window
4.9 AVD Command-line Creation
4.10 Android Virtual Device Con guration Files
4.11 Moving and Renaming an Android Virtual Device
4.12 Summary
5. Using and Con guring the Android Studio AVD Emulator
5.1 e Emulator Environment
5.2 e Emulator Toolbar Options
5.3 Working in Zoom Mode
5.4 Resizing the Emulator Window
5.5 Extended Control Options
5.5.1 Location
5.5.2 Displays
5.5.3 Cellular
5.5.4 Battery
5.5.5 Camera
5.5.6 Phone
5.5.7 Directional Pad
5.5.8 Microphone
5.5.9 Fingerprint
5.5.10 Virtual Sensors
5.5.11 Snapshots
5.5.12 Record and Playback
5.5.13 Google Play
5.5.14 Settings
5.5.15 Help
5.6 Working with Snapshots
5.7 Con guring Fingerprint Emulation
5.8 e Emulator in Tool Window Mode
5.9 Summary
6. A Tour of the Android Studio User Interface
6.1 e Welcome Screen
6.2 e Main Window
6.3 e Tool Windows
6.4 Android Studio Keyboard Shortcuts
6.5 Switcher and Recent Files Navigation
6.6 Changing the Android Studio eme
6.7 Summary
7. Testing Android Studio Apps on a Physical Android Device
7.1 An Overview of the Android Debug Bridge (ADB)
7.2 Enabling ADB on Android-based Devices
7.2.1 macOS ADB Con guration
7.2.2 Windows ADB Con guration
7.2.3 Linux adb Con guration
7.3 Testing the adb Connection
7.4 Summary
8. e Basics of the Android Studio Code Editor
8.1 e Android Studio Editor
8.2 Splitting the Editor Window
8.3 Code Completion
8.4 Statement Completion
8.5 Parameter Information
8.6 Parameter Name Hints
8.7 Code Generation
8.8 Code Folding
8.9 Quick Documentation Lookup
8.10 Code Reformatting
8.11 Finding Sample Code
8.12 Live Templates
8.13 Summary
9. An Overview of the Android Architecture
9.1 e Android So ware Stack
9.2 e Linux Kernel
9.3 Android Runtime – ART
9.4 Android Libraries
9.4.1 C/C++ Libraries
9.5 Application Framework
9.6 Applications
9.7 Summary
10. e Anatomy of an Android Application
10.1 Android Activities
10.2 Android Fragments
10.3 Android Intents
10.4 Broadcast Intents
10.5 Broadcast Receivers
10.6 Android Services
10.7 Content Providers
10.8 e Application Manifest
10.9 Application Resources
10.10 Application Context
10.11 Summary
11. An Overview of Android View Binding
11.1 Find View by Id
11.2 View Binding
11.3 Converting the AndroidSample project
11.4 Enabling View Binding
11.5 Using View Binding
11.6 Choosing an Option
11.7 View Binding in the Book Examples
11.8 Migrating a Project to View Binding
11.9 Summary
12. Understanding Android Application and Activity Lifecycles
12.1 Android Applications and Resource Management
12.2 Android Process States
12.2.1 Foreground Process
12.2.2 Visible Process
12.2.3 Service Process
12.2.4 Background Process
12.2.5 Empty Process
12.3 Inter-Process Dependencies
12.4 e Activity Lifecycle
12.5 e Activity Stack
12.6 Activity States
12.7 Con guration Changes
12.8 Handling State Change
12.9 Summary
13. Handling Android Activity State Changes
13.1 New vs. Old Lifecycle Techniques
13.2 e Activity and Fragment Classes
13.3 Dynamic State vs. Persistent State
13.4 e Android Lifecycle Methods
13.5 Lifetimes
13.6 Foldable Devices and Multi-Resume
13.7 Disabling Con guration Change Restarts
13.8 Lifecycle Method Limitations
13.9 Summary
14. Android Activity State Changes by Example
14.1 Creating the State Change Example Project
14.2 Designing the User Interface
14.3 Overriding the Activity Lifecycle Methods
14.4 Filtering the Logcat Panel
14.5 Running the Application
14.6 Experimenting with the Activity
14.7 Summary
15. Saving and Restoring the State of an Android Activity
15.1 Saving Dynamic State
15.2 Default Saving of User Interface State
15.3 e Bundle Class
15.4 Saving the State
15.5 Restoring the State
15.6 Testing the Application
15.7 Summary
16. Understanding Android Views, View Groups and Layouts
16.1 Designing for Di erent Android Devices
16.2 Views and View Groups
16.3 Android Layout Managers
16.4 e View Hierarchy
16.5 Creating User Interfaces
16.6 Summary
17. A Guide to the Android Studio Layout Editor Tool
17.1 Basic vs. Empty Activity Templates
17.2 e Android Studio Layout Editor
17.3 Design Mode
17.4 e Palette
17.5 Design Mode and Layout Views
17.6 Night Mode
17.7 Code Mode
17.8 Split Mode
17.9 Setting Attributes
17.10 Transforms
17.11 Tools Visibility Toggles
17.12 Converting Views
17.13 Displaying Sample Data
17.14 Creating a Custom Device De nition
17.15 Changing the Current Device
17.16 Layout Validation (Multi Preview)
17.17 Summary
18. A Guide to the Android ConstraintLayout
18.1 How ConstraintLayout Works
18.1.1 Constraints
18.1.2 Margins
18.1.3 Opposing Constraints
18.1.4 Constraint Bias
18.1.5 Chains
18.1.6 Chain Styles
18.2 Baseline Alignment
18.3 Con guring Widget Dimensions
18.4 Guideline Helper
18.5 Group Helper
18.6 Barrier Helper
18.7 Flow Helper
18.8 Ratios
18.9 ConstraintLayout Advantages
18.10 ConstraintLayout Availability
18.11 Summary
19. A Guide to Using ConstraintLayout in Android Studio
19.1 Design and Layout Views
19.2 Autoconnect Mode
19.3 Inference Mode
19.4 Manipulating Constraints Manually
19.5 Adding Constraints in the Inspector
19.6 Viewing Constraints in the Attributes Window
19.7 Deleting Constraints
19.8 Adjusting Constraint Bias
19.9 Understanding ConstraintLayout Margins
19.10 e Importance of Opposing Constraints and Bias
19.11 Con guring Widget Dimensions
19.12 Design Time Tools Positioning
19.13 Adding Guidelines
19.14 Adding Barriers
19.15 Adding a Group
19.16 Working with the Flow Helper
19.17 Widget Group Alignment and Distribution
19.18 Converting other Layouts to ConstraintLayout
19.19 Summary
20. Working with ConstraintLayout Chains and Ratios in Android
Studio
20.1 Creating a Chain
20.2 Changing the Chain Style
20.3 Spread Inside Chain Style
20.4 Packed Chain Style
20.5 Packed Chain Style with Bias
20.6 Weighted Chain
20.7 Working with Ratios
20.8 Summary
21. An Android Studio Layout Editor ConstraintLayout Tutorial
21.1 An Android Studio Layout Editor Tool Example
21.2 Creating a New Activity
21.3 Preparing the Layout Editor Environment
21.4 Adding the Widgets to the User Interface
21.5 Adding the Constraints
21.6 Testing the Layout
21.7 Using the Layout Inspector
21.8 Summary
22. Manual XML Layout Design in Android Studio
22.1 Manually Creating an XML Layout
22.2 Manual XML vs. Visual Layout Design
22.3 Summary
23. Managing Constraints using Constraint Sets
23.1 Java Code vs. XML Layout Files
23.2 Creating Views
23.3 View Attributes
23.4 Constraint Sets
23.4.1 Establishing Connections
23.4.2 Applying Constraints to a Layout
23.4.3 Parent Constraint Connections
23.4.4 Sizing Constraints
23.4.5 Constraint Bias
23.4.6 Alignment Constraints
23.4.7 Copying and Applying Constraint Sets
23.4.8 ConstraintLayout Chains
23.4.9 Guidelines
23.4.10 Removing Constraints
23.4.11 Scaling
23.4.12 Rotation
23.5 Summary
24. An Android ConstraintSet Tutorial
24.1 Creating the Example Project in Android Studio
24.2 Adding Views to an Activity
24.3 Setting View Attributes
24.4 Creating View IDs
24.5 Con guring the Constraint Set
24.6 Adding the EditText View
24.7 Converting Density Independent Pixels (dp) to Pixels (px)
24.8 Summary
25. A Guide to using Apply Changes in Android Studio
25.1 Introducing Apply Changes
25.2 Understanding Apply Changes Options
25.3 Using Apply Changes
25.4 Con guring Apply Changes Fallback Settings
25.5 An Apply Changes Tutorial
25.6 Using Apply Code Changes
25.7 Using Apply Changes and Restart Activity
25.8 Using Run App
25.9 Summary
26. An Overview and Example of Android Event Handling
26.1 Understanding Android Events
26.2 Using the android:onClick Resource
26.3 Event Listeners and Callback Methods
26.4 An Event Handling Example
26.5 Designing the User Interface
26.6 e Event Listener and Callback Method
26.7 Consuming Events
26.8 Summary
27. Android Touch and Multi-touch Event Handling
27.1 Intercepting Touch Events
27.2 e MotionEvent Object
27.3 Understanding Touch Actions
27.4 Handling Multiple Touches
27.5 An Example Multi-Touch Application
27.6 Designing the Activity User Interface
27.7 Implementing the Touch Event Listener
27.8 Running the Example Application
27.9 Summary
28. Detecting Common Gestures Using the Android Gesture Detector
Class
28.1 Implementing Common Gesture Detection
28.2 Creating an Example Gesture Detection Project
28.3 Implementing the Listener Class
28.4 Creating the GestureDetectorCompat Instance
28.5 Implementing the onTouchEvent() Method
28.6 Testing the Application
28.7 Summary
29. Implementing Custom Gesture and Pinch Recognition on Android
29.1 e Android Gesture Builder Application
29.2 e GestureOverlayView Class
29.3 Detecting Gestures
29.4 Identifying Speci c Gestures
29.5 Installing and Running the Gesture Builder Application
29.6 Creating a Gestures File
29.7 Creating the Example Project
29.8 Extracting the Gestures File from the SD Card
29.9 Adding the Gestures File to the Project
29.10 Designing the User Interface
29.11 Loading the Gestures File
29.12 Registering the Event Listener
29.13 Implementing the onGesturePerformed Method
29.14 Testing the Application
29.15 Con guring the GestureOverlayView
29.16 Intercepting Gestures
29.17 Detecting Pinch Gestures
29.18 A Pinch Gesture Example Project
29.19 Summary
30. An Introduction to Android Fragments
30.1 What is a Fragment?
30.2 Creating a Fragment
30.3 Adding a Fragment to an Activity using the Layout XML File
30.4 Adding and Managing Fragments in Code
30.5 Handling Fragment Events
30.6 Implementing Fragment Communication
30.7 Summary
31. Using Fragments in Android Studio - An Example
31.1 About the Example Fragment Application
31.2 Creating the Example Project
31.3 Creating the First Fragment Layout
31.4 Migrating a Fragment to View Binding
31.5 Adding the Second Fragment
31.6 Adding the Fragments to the Activity
31.7 Making the Toolbar Fragment Talk to the Activity
31.8 Making the Activity Talk to the Text Fragment
31.9 Testing the Application
31.10 Summary
32. Modern Android App Architecture with Jetpack
32.1 What is Android Jetpack?
32.2 e “Old” Architecture
32.3 Modern Android Architecture
32.4 e ViewModel Component
32.5 e LiveData Component
32.6 ViewModel Saved State
32.7 LiveData and Data Binding
32.8 Android Lifecycles
32.9 Repository Modules
32.10 Summary
33. An Android Jetpack ViewModel Tutorial
33.1 About the Project
33.2 Creating the ViewModel Example Project
33.3 Reviewing the Project
33.3.1 e Main Activity
33.3.2 e Content Fragment
33.3.3 e ViewModel
33.4 Designing the Fragment Layout
33.5 Implementing the View Model
33.6 Associating the Fragment with the View Model
33.7 Modifying the Fragment
33.8 Accessing the ViewModel Data
33.9 Testing the Project
33.10 Summary
34. An Android Jetpack LiveData Tutorial
34.1 LiveData - A Recap
34.2 Adding LiveData to the ViewModel
34.3 Implementing the Observer
34.4 Summary
35. An Overview of Android Jetpack Data Binding
35.1 An Overview of Data Binding
35.2 e Key Components of Data Binding
35.2.1 e Project Build Con guration
35.2.2 e Data Binding Layout File
35.2.3 e Layout File Data Element
35.2.4 e Binding Classes
35.2.5 Data Binding Variable Con guration
35.2.6 Binding Expressions (One-Way)
35.2.7 Binding Expressions (Two-Way)
35.2.8 Event and Listener Bindings
35.3 Summary
36. An Android Jetpack Data Binding Tutorial
36.1 Removing the Redundant Code
36.2 Enabling Data Binding
36.3 Adding the Layout Element
36.4 Adding the Data Element to Layout File
36.5 Working with the Binding Class
36.6 Assigning the ViewModel Instance to the Data Binding Variable
36.7 Adding Binding Expressions
36.8 Adding the Conversion Method
36.9 Adding a Listener Binding
36.10 Testing the App
36.11 Summary
37. An Android ViewModel Saved State Tutorial
37.1 Understanding ViewModel State Saving
37.2 Implementing ViewModel State Saving
37.3 Saving and Restoring State
37.4 Adding Saved State Support to the ViewModelDemo Project
37.5 Summary
38. Working with Android Lifecycle-Aware Components
38.1 Lifecycle Awareness
38.2 Lifecycle Owners
38.3 Lifecycle Observers
38.4 Lifecycle States and Events
38.5 Summary
39. An Android Jetpack Lifecycle Awareness Tutorial
39.1 Creating the Example Lifecycle Project
39.2 Creating a Lifecycle Observer
39.3 Adding the Observer
39.4 Testing the Observer
39.5 Creating a Lifecycle Owner
39.6 Testing the Custom Lifecycle Owner
39.7 Summary
40. An Overview of the Navigation Architecture Component
40.1 Understanding Navigation
40.2 Declaring a Navigation Host
40.3 e Navigation Graph
40.4 Accessing the Navigation Controller
40.5 Triggering a Navigation Action
40.6 Passing Arguments
40.7 Summary
41. An Android Jetpack Navigation Component Tutorial
41.1 Creating the NavigationDemo Project
41.2 Adding Navigation to the Build Con guration
41.3 Creating the Navigation Graph Resource File
41.4 Declaring a Navigation Host
41.5 Adding Navigation Destinations
41.6 Designing the Destination Fragment Layouts
41.7 Adding an Action to the Navigation Graph
41.8 Implement the OnFragmentInteractionListener
41.9 Adding View Binding Support to the Destination Fragments
41.10 Triggering the Action
41.11 Passing Data Using Safeargs
41.12 Summary
42. An Introduction to MotionLayout
42.1 An Overview of MotionLayout
42.2 MotionLayout
42.3 MotionScene
42.4 Con guring ConstraintSets
42.5 Custom Attributes
42.6 Triggering an Animation
42.7 Arc Motion
42.8 Keyframes
42.8.1 Attribute Keyframes
42.8.2 Position Keyframes
42.9 Time Linearity
42.10 KeyTrigger
42.11 Cycle and Time Cycle Keyframes
42.12 Starting an Animation from Code
42.13 Summary
43. An Android MotionLayout Editor Tutorial
43.1 Creating the MotionLayoutDemo Project
43.2 ConstraintLayout to MotionLayout Conversion
43.3 Con guring Start and End Constraints
43.4 Previewing the MotionLayout Animation
43.5 Adding an OnClick Gesture
43.6 Adding an Attribute Keyframe to the Transition
43.7 Adding a CustomAttribute to a Transition
43.8 Adding Position Keyframes
43.9 Summary
44. A MotionLayout KeyCycle Tutorial
44.1 An Overview of Cycle Keyframes
44.2 Using the Cycle Editor
44.3 Creating the KeyCycleDemo Project
44.4 Con guring the Start and End Constraints
44.5 Creating the Cycles
44.6 Previewing the Animation
44.7 Adding the KeyFrameSet to the MotionScene
44.8 Summary
45. Working with the Floating Action Button and Snackbar
45.1 e Material Design
45.2 e Design Library
45.3 e Floating Action Button (FAB)
45.4 e Snackbar
45.5 Creating the Example Project
45.6 Reviewing the Project
45.7 Removing Navigation Features
45.8 Changing the Floating Action Button
45.9 Adding an Action to the Snackbar
45.10 Summary
46. Creating a Tabbed Interface using the TabLayout Component
46.1 An Introduction to the ViewPager2
46.2 An Overview of the TabLayout Component
46.3 Creating the TabLayoutDemo Project
46.4 Creating the First Fragment
46.5 Duplicating the Fragments
46.6 Adding the TabLayout and ViewPager2
46.7 Creating the Pager Adapter
46.8 Performing the Initialization Tasks
46.9 Testing the Application
46.10 Customizing the TabLayout
46.11 Summary
47. Working with the RecyclerView and CardView Widgets
47.1 An Overview of the RecyclerView
47.2 An Overview of the CardView
47.3 Summary
48. An Android RecyclerView and CardView Tutorial
48.1 Creating the CardDemo Project
48.2 Modifying the Basic Activity Project
48.3 Designing the CardView Layout
48.4 Adding the RecyclerView
48.5 Adding the Image Files
48.6 Creating the RecyclerView Adapter
48.7 Initializing the RecyclerView Component
48.8 Testing the Application
48.9 Responding to Card Selections
48.10 Summary
49. A Layout Editor Sample Data Tutorial
49.1 Adding Sample Data to a Project
49.2 Using Custom Sample Data
49.3 Summary
50. Working with the AppBar and Collapsing Toolbar Layouts
50.1 e Anatomy of an AppBar
50.2 e Example Project
50.3 Coordinating the RecyclerView and Toolbar
50.4 Introducing the Collapsing Toolbar Layout
50.5 Changing the Title and Scrim Color
50.6 Summary
51. An Android Studio Primary/Detail Flow Tutorial
51.1 e Primary/Detail Flow
51.2 Creating a Primary/Detail Flow Activity
51.3 Modifying the Primary/Detail Flow Template
51.4 Changing the Content Model
51.5 Changing the Detail Pane
51.6 Modifying the WebsiteDetailFragment Class
51.7 Modifying the WebsiteListFragment Class
51.8 Adding Manifest Permissions
51.9 Running the Application
51.10 Summary
52. An Overview of Android Intents
52.1 An Overview of Intents
52.2 Explicit Intents
52.3 Returning Data from an Activity
52.4 Implicit Intents
52.5 Using Intent Filters
52.6 Checking Intent Availability
52.7 Summary
53. Android Explicit Intents – A Worked Example
53.1 Creating the Explicit Intent Example Application
53.2 Designing the User Interface Layout for MainActivity
53.3 Creating the Second Activity Class
53.4 Designing the User Interface Layout for SecondActivity
53.5 Reviewing the Application Manifest File
53.6 Creating the Intent
53.7 Extracting Intent Data
53.8 Launching SecondActivity as a Sub-Activity
53.9 Returning Data from a Sub-Activity
53.10 Testing the Application
53.11 Summary
54. Android Implicit Intents – A Worked Example
54.1 Creating the Android Studio Implicit Intent Example Project
54.2 Designing the User Interface
54.3 Creating the Implicit Intent
54.4 Adding a Second Matching Activity
54.5 Adding the Web View to the UI
54.6 Obtaining the Intent URL
54.7 Modifying the MyWebView Project Manifest File
54.8 Installing the MyWebView Package on a Device
54.9 Testing the Application
54.10 Summary
55. Android Broadcast Intents and Broadcast Receivers
55.1 An Overview of Broadcast Intents
55.2 An Overview of Broadcast Receivers
55.3 Obtaining Results from a Broadcast
55.4 Sticky Broadcast Intents
55.5 e Broadcast Intent Example
55.6 Creating the Example Application
55.7 Creating and Sending the Broadcast Intent
55.8 Creating the Broadcast Receiver
55.9 Registering the Broadcast Receiver
55.10 Testing the Broadcast Example
55.11 Listening for System Broadcasts
55.12 Summary
56. A Basic Overview of Java reads, Handlers and Executors
56.1 An Overview of reads
56.2 e Application Main read
56.3 read Handlers
56.4 A reading Example
56.5 Building the App
56.6 Creating a New read
56.7 Implementing a read Handler
56.8 Passing a Message to the Handler
56.9 Java Executor Concurrency
56.10 Working with Runnable Tasks
56.11 Shutting down an Executor Service
56.12 Working with Callable Tasks and Futures
56.13 Handling a Future Result
56.14 Scheduling Tasks
56.15 Summary
57. An Overview of Android Services
57.1 Started Services
57.2 Intent Service
57.3 Bound Service
57.4 e Anatomy of a Service
57.5 Controlling Destroyed Service Restart Options
57.6 Declaring a Service in the Manifest File
57.7 Starting a Service Running on System Startup
57.8 Summary
58. Implementing an Android Started Service – A Worked Example
58.1 Creating the Example Project
58.2 Designing the User Interface
58.3 Creating the Service Class
58.4 Adding the Service to the Manifest File
58.5 Starting the Service
58.6 Testing the IntentService Example
58.7 Using the Service Class
58.8 Creating the New Service
58.9 Launching the Service
58.10 Running the Application
58.11 Adding reading to the Service
58.12 Summary
59. Android Local Bound Services – A Worked Example
59.1 Understanding Bound Services
59.2 Bound Service Interaction Options
59.3 A Local Bound Service Example
59.4 Adding a Bound Service to the Project
59.5 Implementing the Binder
59.6 Binding the Client to the Service
59.7 Completing the Example
59.8 Testing the Application
59.9 Summary
60. Android Remote Bound Services – A Worked Example
60.1 Client to Remote Service Communication
60.2 Creating the Example Application
60.3 Designing the User Interface
60.4 Implementing the Remote Bound Service
60.5 Con guring a Remote Service in the Manifest File
60.6 Launching and Binding to the Remote Service
60.7 Sending a Message to the Remote Service
60.8 Summary
61. An Android Noti cations Tutorial
61.1 An Overview of Noti cations
61.2 Creating the NotifyDemo Project
61.3 Designing the User Interface
61.4 Creating the Second Activity
61.5 Creating a Noti cation Channel
61.6 Creating and Issuing a Noti cation
61.7 Launching an Activity from a Noti cation
61.8 Adding Actions to a Noti cation
61.9 Bundled Noti cations
61.10 Summary
62. An Android Direct Reply Noti cation Tutorial
62.1 Creating the DirectReply Project
62.2 Designing the User Interface
62.3 Creating the Noti cation Channel
62.4 Building the RemoteInput Object
62.5 Creating the PendingIntent
62.6 Creating the Reply Action
62.7 Receiving Direct Reply Input
62.8 Updating the Noti cation
62.9 Summary
63. Foldable Devices and Multi-Window Support
63.1 Foldables and Multi-Window Support
63.2 Using a Foldable Emulator
63.3 Entering Multi-Window Mode
63.4 Enabling and using Freeform Support
63.5 Checking for Freeform Support
63.6 Enabling Multi-Window Support in an App
63.7 Specifying Multi-Window Attributes
63.8 Detecting Multi-Window Mode in an Activity
63.9 Receiving Multi-Window Noti cations
63.10 Launching an Activity in Multi-Window Mode
63.11 Con guring Freeform Activity Size and Position
63.12 Summary
64. An Overview of Android SQLite Databases
64.1 Understanding Database Tables
64.2 Introducing Database Schema
64.3 Columns and Data Types
64.4 Database Rows
64.5 Introducing Primary Keys
64.6 What is SQLite?
64.7 Structured Query Language (SQL)
64.8 Trying SQLite on an Android Virtual Device (AVD)
64.9 e Android Room Persistence Library
64.10 Summary
65. e Android Room Persistence Library
65.1 Revisiting Modern App Architecture
65.2 Key Elements of Room Database Persistence
65.2.1 Repository
65.2.2 Room Database
65.2.3 Data Access Object (DAO)
65.2.4 Entities
65.2.5 SQLite Database
65.3 Understanding Entities
65.4 Data Access Objects
65.5 e Room Database
65.6 e Repository
65.7 In-Memory Databases
65.8 Database Inspector
65.9 Summary
66. An Android TableLayout and TableRow Tutorial
66.1 e TableLayout and TableRow Layout Views
66.2 Creating the Room Database Project
66.3 Converting to a LinearLayout
66.4 Adding the TableLayout to the User Interface
66.5 Con guring the TableRows
66.6 Adding the Button Bar to the Layout
66.7 Adding the RecyclerView
66.8 Adjusting the Layout Margins
66.9 Summary
67. An Android Room Database and Repository Tutorial
67.1 About the RoomDemo Project
67.2 Modifying the Build Con guration
67.3 Building the Entity
67.4 Creating the Data Access Object
67.5 Adding the Room Database
67.6 Adding the Repository
67.7 Modifying the ViewModel
67.8 Creating the Product Item Layout
67.9 Adding the RecyclerView Adapter
67.10 Preparing the Main Fragment
67.11 Adding the Button Listeners
67.12 Adding LiveData Observers
67.13 Initializing the RecyclerView
67.14 Testing the RoomDemo App
67.15 Using the Database Inspector
67.16 Summary
68. Accessing Cloud Storage using the Android Storage Access
Framework
68.1 e Storage Access Framework
68.2 Working with the Storage Access Framework
68.3 Filtering Picker File Listings
68.4 Handling Intent Results
68.5 Reading the Content of a File
68.6 Writing Content to a File
68.7 Deleting a File
68.8 Gaining Persistent Access to a File
68.9 Summary
69. An Android Storage Access Framework Example
69.1 About the Storage Access Framework Example
69.2 Creating the Storage Access Framework Example
69.3 Designing the User Interface
69.4 Adding the Activity Launchers
69.5 Creating a New Storage File
69.6 Saving to a Storage File
69.7 Opening and Reading a Storage File
69.8 Testing the Storage Access Application
69.9 Summary
70. Video Playback on Android using the VideoView and
MediaController Classes
70.1 Introducing the Android VideoView Class
70.2 Introducing the Android MediaController Class
70.3 Creating the Video Playback Example
70.4 Designing the VideoPlayer Layout
70.5 Downloading the Video File
70.6 Con guring the VideoView
70.7 Adding the MediaController to the Video View
70.8 Setting up the onPreparedListener
70.9 Summary
71. Android Picture-in-Picture Mode
71.1 Picture-in-Picture Features
71.2 Enabling Picture-in-Picture Mode
71.3 Con guring Picture-in-Picture Parameters
71.4 Entering Picture-in-Picture Mode
71.5 Detecting Picture-in-Picture Mode Changes
71.6 Adding Picture-in-Picture Actions
71.7 Summary
72. An Android Picture-in-Picture Tutorial
72.1 Adding Picture-in-Picture Support to the Manifest
72.2 Adding a Picture-in-Picture Button
72.3 Entering Picture-in-Picture Mode
72.4 Detecting Picture-in-Picture Mode Changes
72.5 Adding a Broadcast Receiver
72.6 Adding the PiP Action
72.7 Testing the Picture-in-Picture Action
72.8 Summary
73. Making Runtime Permission Requests in Android
73.1 Understanding Normal and Dangerous Permissions
73.2 Creating the Permissions Example Project
73.3 Checking for a Permission
73.4 Requesting Permission at Runtime
73.5 Providing a Rationale for the Permission Request
73.6 Testing the Permissions App
73.7 Summary
74. Android Audio Recording and Playback using MediaPlayer and
MediaRecorder
74.1 Playing Audio
74.2 Recording Audio and Video using the MediaRecorder Class
74.3 About the Example Project
74.4 Creating the AudioApp Project
74.5 Designing the User Interface
74.6 Checking for Microphone Availability
74.7 Initializing the Activity
74.8 Implementing the recordAudio() Method
74.9 Implementing the stopAudio() Method
74.10 Implementing the playAudio() method
74.11 Con guring and Requesting Permissions
74.12 Testing the Application
74.13 Summary
75. Working with the Google Maps Android API in Android Studio
75.1 e Elements of the Google Maps Android API
75.2 Creating the Google Maps Project
75.3 Obtaining Your Developer Signature
75.4 Adding the Apache HTTP Legacy Library Requirement
75.5 Testing the Application
75.6 Understanding Geocoding and Reverse Geocoding
75.7 Adding a Map to an Application
75.8 Requesting Current Location Permission
75.9 Displaying the User’s Current Location
75.10 Changing the Map Type
75.11 Displaying Map Controls to the User
75.12 Handling Map Gesture Interaction
75.12.1 Map Zooming Gestures
75.12.2 Map Scrolling/Panning Gestures
75.12.3 Map Tilt Gestures
75.12.4 Map Rotation Gestures
75.13 Creating Map Markers
75.14 Controlling the Map Camera
75.15 Summary
76. Printing with the Android Printing Framework
76.1 e Android Printing Architecture
76.2 e Print Service Plugins
76.3 Google Cloud Print
76.4 Printing to Google Drive
76.5 Save as PDF
76.6 Printing from Android Devices
76.7 Options for Building Print Support into Android Apps
76.7.1 Image Printing
76.7.2 Creating and Printing HTML Content
76.7.3 Printing a Web Page
76.7.4 Printing a Custom Document
76.8 Summary
77. An Android HTML and Web Content Printing Example
77.1 Creating the HTML Printing Example Application
77.2 Printing Dynamic HTML Content
77.3 Creating the Web Page Printing Example
77.4 Removing the Floating Action Button
77.5 Removing Navigation Features
77.6 Designing the User Interface Layout
77.7 Accessing the WebView from the Main Activity
77.8 Loading the Web Page into the WebView
77.9 Adding the Print Menu Option
77.10 Summary
78. A Guide to Android Custom Document Printing
78.1 An Overview of Android Custom Document Printing
78.1.1 Custom Print Adapters
78.2 Preparing the Custom Document Printing Project
78.3 Creating the Custom Print Adapter
78.4 Implementing the onLayout() Callback Method
78.5 Implementing the onWrite() Callback Method
78.6 Checking a Page is in Range
78.7 Drawing the Content on the Page Canvas
78.8 Starting the Print Job
78.9 Testing the Application
78.10 Summary
79. An Introduction to Android App Links
79.1 An Overview of Android App Links
79.2 App Link Intent Filters
79.3 Handling App Link Intents
79.4 Associating the App with a Website
79.5 Summary
80. An Android Studio App Links Tutorial
80.1 About the Example App
80.2 e Database Schema
80.3 Loading and Running the Project
80.4 Adding the URL Mapping
80.5 Adding the Intent Filter
80.6 Adding Intent Handling Code
80.7 Testing the App Link
80.8 Associating an App Link with a Web Site
80.9 Summary
81. An Android Biometric Authentication Tutorial
81.1 An Overview of Biometric Authentication
81.2 Creating the Biometric Authentication Project
81.3 Con guring Device Fingerprint Authentication
81.4 Adding the Biometric Permission to the Manifest File
81.5 Designing the User Interface
81.6 Adding a Toast Convenience Method
81.7 Checking the Security Settings
81.8 Con guring the Authentication Callbacks
81.9 Adding the CancellationSignal
81.10 Starting the Biometric Prompt
81.11 Testing the Project
81.12 Summary
82. Creating, Testing and Uploading an Android App Bundle
82.1 e Release Preparation Process
82.2 Android App Bundles
82.3 Register for a Google Play Developer Console Account
82.4 Con guring the App in the Console
82.5 Enabling Google Play App Signing
82.6 Creating a Keystore File
82.7 Creating the Android App Bundle
82.8 Generating Test APK Files
82.9 Uploading the App Bundle to the Google Play Developer Console
82.10 Exploring the App Bundle
82.11 Managing Testers
82.12 Rolling the App Out for Testing
82.13 Uploading New App Bundle Revisions
82.14 Analyzing the App Bundle File
82.15 Summary
83. An Overview of Android Dynamic Feature Modules
83.1 An Overview of Dynamic Feature Modules
83.2 Dynamic Feature Module Architecture
83.3 Creating a Dynamic Feature Module
83.4 Converting an Existing Module for Dynamic Delivery
83.5 Working with Dynamic Feature Modules
83.6 Handling Large Dynamic Feature Modules
83.7 Summary
84. An Android Studio Dynamic Feature Tutorial
84.1 Creating the DynamicFeature Project
84.2 Adding Dynamic Feature Support to the Project
84.3 Designing the Base Activity User Interface
84.4 Adding the Dynamic Feature Module
84.5 Reviewing the Dynamic Feature Module
84.6 Adding the Dynamic Feature Activity
84.7 Implementing the launchIntent() Method
84.8 Uploading the App Bundle for Testing
84.9 Implementing the installFeature() Method
84.10 Adding the Update Listener
84.11 Using Deferred Installation
84.12 Removing a Dynamic Module
84.13 Summary
85. An Overview of Gradle in Android Studio
85.1 An Overview of Gradle
85.2 Gradle and Android Studio
85.2.1 Sensible Defaults
85.2.2 Dependencies
85.2.3 Build Variants
85.2.4 Manifest Entries
85.2.5 APK Signing
85.2.6 ProGuard Support
85.3 e Top-level Gradle Build File
85.4 Module Level Gradle Build Files
85.5 Con guring Signing Settings in the Build File
85.6 Running Gradle Tasks from the Command-line
85.7 Summary
Index
1. Introduction
Fully updated for Android Studio Arctic Fox, the goal of this book is to
teach the skills necessary to develop Android based applications using the
Java programming language.
Beginning with the basics, this book provides an outline of the steps
necessary to set up an Android development and testing environment. An
overview of Android Studio is included covering areas such as tool windows,
the code editor and the Layout Editor tool. An introduction to the
architecture of Android is followed by an in-depth look at the design of
Android applications and user interfaces using the Android Studio
environment.
Chapters are also included covering the Android Architecture Components
including view models, lifecycle management, Room database access, the
Database Inspector, app navigation, live data and data binding.
More advanced topics such as intents are also covered, as are touch screen
handling, gesture recognition, and the recording and playback of audio. is
edition of the book also covers printing, transitions, cloud-based le storage
and foldable device support.
e concepts of material design are also covered in detail, including the use
of oating action buttons, Snackbars, tabbed interfaces, card views,
navigation drawers and collapsing toolbars.
Other key features of Android Studio Arctic Fox and Android are also
covered in detail including the Layout Editor, the ConstraintLayout and
ConstraintSet classes, MotionLayout Editor, view binding, constraint chains,
barriers and direct reply noti cations.
Chapters also cover advanced features of Android Studio such as App Links,
Dynamic Delivery, Gradle build con guration, and submitting apps to the
Google Play Developer Console.
Assuming you already have some Java programming experience, are ready
to download Android Studio and the Android SDK, have access to a
Windows, Mac or Linux system and ideas for some apps to develop, you are
ready to get started.
1.1 Downloading the Code Samples
e source code and Android Studio project les for the examples contained
in this book are available for download at:
https://www.ebookfrenzy.com/retail/arcticfoxjava/index.php
e steps to load a project from the code samples into Android Studio are as
follows:
1. From the Welcome to Android Studio dialog, click on the Open button
option.
2. In the project selection dialog, navigate to and select the folder containing
the project to be imported and click on OK.
1.2 Feedback
We want you to be satis ed with your purchase of this book. If you nd any
errors in the book, or have any comments, questions or concerns please
contact us at feedback@ebookfrenzy.com.
1.3 Errata
While we make every e ort to ensure the accuracy of the content of this
book, it is inevitable that a book covering a subject area of this size and
complexity may include some errors and oversights. Any known issues with
the book will be outlined, together with solutions, at the following URL:
https://www.ebookfrenzy.com/errata/arcticfoxjava.html
In the event that you nd an error not listed in the errata, please let us know
by emailing our technical support team at feedback@ebookfrenzy.com. ey
are there to help you and will work to resolve any problems you may
encounter.
2. Setting up an Android Studio Development
Environment
Before any work can begin on the development of an Android application,
the rst step is to con gure a computer system to act as the development
platform. is involves a number of steps consisting of installing the
Android Studio Integrated Development Environment (IDE) which also
includes the Android So ware Development Kit (SDK) and OpenJDK Java
development environment.
is chapter will cover the steps necessary to install the requisite
components for Android application development on Windows, macOS and
Linux based systems.
2.1 System Requirements
Android application development may be performed on any of the following
system types:
•Windows 8/10 64-bit
•macOS 10.14 or later, Intel Core, AMD, or Apple silicon
•Chrome OS device with Intel i5 or higher
•Linux systems with version 2.31 or later of GNU C Library (glibc)
•Minimum of 8GB of RAM
•Approximately 8GB of available disk space
•1280 x 800 minimum screen resolution
2.2 Downloading the Android Studio Package
Most of the work involved in developing applications for Android will be
performed using the Android Studio environment. e content and
examples in this book were created based on Android Studio Arctic Fox
2020.3.1 using the Android 11.0 (R) API 30 SDK which, at the time of
writing, are the current versions.
Android Studio is, however, subject to frequent updates so a newer version
may have been released since this book was published.
e latest release of Android Studio may be downloaded from the primary
download page which can be found at the following URL:
https://developer.android.com/studio/index.html
If this page provides instructions for downloading a newer version of
Android Studio it is important to note that there may be some minor
di erences between this book and the so ware. A web search for “Android
Studio Arctic Fox” should provide the option to download the older version
in the event that these di erences become a problem. Alternatively, visit the
following web page to nd Android Studio Arctic Fox in the archives:
https://developer.android.com/studio/archive
2.3 Installing Android Studio
Once downloaded, the exact steps to install Android Studio di er
depending on the operating system on which the installation is being
performed.
2.3.1 Installation on Windows
Locate the downloaded Android Studio installation executable le (named
android-studio-<version>-windows.exe) in a Windows Explorer window and
double-click on it to start the installation process, clicking the Yes button in
the User Account Control dialog if it appears.
Once the Android Studio setup wizard appears, work through the various
screens to con gure the installation to meet your requirements in terms of
the le system location into which Android Studio should be installed and
whether or not it should be made available to other users of the system.
When prompted to select the components to install, make sure that the
Android Studio and Android Virtual Device options are all selected.
Although there are no strict rules on where Android Studio should be
installed on the system, the remainder of this book will assume that the
installation was performed into C:\Program Files\Android\Android Studio
and that the Android SDK packages have been installed into the user’s
AppData\Local\Android\sdk sub-folder. Once the options have been
con gured, click on the Install button to begin the installation process.
On versions of Windows with a Start menu, the newly installed Android
Studio can be launched from the entry added to that menu during the
installation. e executable may be pinned to the task bar for easy access by
navigating to the Android Studio\bin directory, right-clicking on the
executable and selecting the Pin to Taskbar menu option.
2.3.2 Installation on macOS
Android Studio for macOS is downloaded in the form of a disk image
(.dmg) le. Once the android-studio-<version>-mac.dmg le has been
downloaded, locate it in a Finder window and double-click on it to open it
as shown in Figure 2-1:

Figure 2-1
To install the package, simply drag the Android Studio icon and drop it onto
the Applications folder. e Android Studio package will then be installed
into the Applications folder of the system, a process which will typically take
a few seconds to complete.
To launch Android Studio, locate the executable in the Applications folder
using a Finder window and double-click on it.
For future easier access to the tool, drag the Android Studio icon from the
Finder window and drop it onto the dock.
2.3.3 Installation on Linux
Having downloaded the Linux Android Studio package, open a terminal
window, change directory to the location where Android Studio is to be
installed and execute the following command:
unzip /<path to package>/android-studio-ide-<version>-
linux.zip
Note that the Android Studio bundle will be installed into a sub-directory
named android-studio. Assuming, therefore, that the above command was
executed in /home/demo, the so ware packages will be unpacked into
/home/demo/android-studio.
To launch Android Studio, open a terminal window, change directory to the
android-studio/bin sub-directory and execute the following command:
./studio.sh
When running on a 64-bit Linux system, it will be necessary to install some
32-bit support libraries before Android Studio will run. On Ubuntu these
libraries can be installed using the following command:
sudo apt-get install libc6:i386 libncurses5:i386
libstdc++6:i386 lib32z1 libbz2-1.0:i386
On Red Hat and Fedora based 64-bit systems, use the following command:
sudo yum install zlib.i686 ncurses-libs.i686 bzip2-
libs.i686
2.4 e Android Studio Setup Wizard
If you are installing Android Studio for the rst time the initial dialog that
appears once the setup process starts may resemble that shown in Figure 2-2
below:

Figure 2-2
If this dialog appears, click the Next button to display the SDK Components
Setup dialog (Figure 2-3). Within this dialog, make sure that the Android
SDK option is selected along with the latest API package before clicking on
the Next button:
Figure 2-3
A er clicking Next, Android Studio will download and install the Android
SDK and tools.
If you have previously installed an earlier version of Android Studio, the rst
time that this new version is launched, a dialog may appear providing the
option to import settings from a previous Android Studio version. If you
have settings from a previous version and would like to import them into
the latest installation, select the appropriate option and location.
Alternatively, indicate that you do not need to import any previous settings
and click on the OK button to proceed.
A er these initial setup steps have been taken, click the Finish button to
display the Welcome to Android Studio screen:

Figure 2-4
2.5 Installing Additional Android SDK Packages
e steps performed so far have installed the Android Studio IDE and the
current set of default Android SDK packages. Before proceeding, it is worth
taking some time to verify which packages are installed and to install any
missing or updated packages.
is task can be performed by clicking on the More Actions link in the
within the welcome dialog and selecting the SDK Manager option from the
drop down menu. Once invoked, the Android SDK screen of the Preferences
dialog will appear as shown in Figure 2-5:

Figure 2-5
Immediately a er installing Android Studio for the rst time it is likely that
only the latest released version of the Android SDK has been installed. To
install older versions of the Android SDK simply select the checkboxes
corresponding to the versions and click on the Apply button.
Most of the examples in this book will support older versions of Android as
far back as far as Android 8.0 (Oreo). is is to ensure that the apps run on a
wide range of Android devices. Within the list of SDK versions, enable the
checkbox next to Android 8.0 (Oreo) and click on the Apply button. In the
resulting con rmation dialog click on the OK button to install the SDK.
Subsequent dialogs will seek acceptance of licenses and terms before
performing the installation. Click Finish once the installation is complete.
It is also possible that updates will be listed as being available for the latest
SDK. To access detailed information about the packages that are available
for update, enable the Show Package Details option located in the lower
right-hand corner of the screen. is will display information similar to that
shown in Figure 2-6:

Figure 2-6
e above gure highlights the availability of an update. To install the
updates, enable the checkbox to the le of the item name and click on the
Apply button.
In addition to the Android SDK packages, a number of tools are also
installed for building Android applications. To view the currently installed
packages and check for updates, remain within the SDK settings screen and
select the SDK Tools tab as shown in Figure 2-7:

Figure 2-7
Within the Android SDK Tools screen, make sure that the following
packages are listed as Installed in the Status column:
•Android SDK Build-tools
•Android Emulator
•Android SDK Platform-tools
•Google Play Services
•Intel x86 Emulator Accelerator (HAXM installer)
•Google USB Driver (Windows only)
•Layout Inspector image server
Note the Intel x86 Emulator Accelerator (HAXM installer) cannot be
installed on Apple silicon-based Macs.
In the event that any of the above packages are listed as Not Installed or
requiring an update, simply select the checkboxes next to those packages
and click on the Apply button to initiate the installation process. If the
HAXM emulator settings dialog appears, select the recommended memory
allocation:

Figure 2-8
Once the installation is complete, review the package list and make sure that
the selected packages are now listed as Installed in the Status column. If any
are listed as Not installed, make sure they are selected and click on the Apply
button again.
2.6 Making the Android SDK Tools Command-line
Accessible
Most of the time, the underlying tools of the Android SDK will be accessed
from within the Android Studio environment. at being said, however,
there will also be instances where it will be useful to be able to invoke those
tools from a command prompt or terminal window. In order for the
operating system on which you are developing to be able to nd these tools,
it will be necessary to add them to the system’s PATH environment variable.
Regardless of operating system, the PATH variable needs to be con gured to
include the following paths (where <path_to_android_sdk_installation>
represents the le system location into which the Android SDK was
installed):
<path_to_android_sdk_installation>/sdk/tools
<path_to_android_sdk_installation>/sdk/tools/bin
<path_to_android_sdk_installation>/sdk/platform-tools
e location of the SDK on your system can be identi ed by launching the
SDK Manager and referring to the Android SDK Location: eld located at the
top of the settings panel as highlighted in Figure 2-9:

Figure 2-9
Once the location of the SDK has been identi ed, the steps to add this to the
PATH variable are operating system dependent:
2.6.1 Windows 8.1
1. On the start screen, move the mouse to the bottom right-hand corner of
the screen and select Search from the resulting menu. In the search box,
enter Control Panel. When the Control Panel icon appears in the results
area, click on it to launch the tool on the desktop.
2. Within the Control Panel, use the Category menu to change the display to
Large Icons. From the list of icons select the one labeled System.
3. In the Environment Variables dialog, locate the Path variable in the
System variables list, select it and click on the Edit… button. Using the
New button in the edit dialog, add three new entries to the path. For
example, assuming the Android SDK was installed into
C:\Users\demo\AppData\Local\Android\Sdk, the following entries would
need to be added:
C:\Users\demo\AppData\Local\Android\Sdk\platform-tools
C:\Users\demo\AppData\Local\Android\Sdk\tools
C:\Users\demo\AppData\Local\Android\Sdk\tools\bin
4. Click on OK in each dialog box and close the system properties control
panel.
Open the command prompt window (move the mouse to the bottom right-
hand corner of the screen, select the Search option and enter cmd into the
search box). Select Command Prompt from the search results.
Within the Command Prompt window, enter:
echo %Path%
e returned path variable value should include the paths to the Android
SDK platform tools folders. Verify that the platform-tools value is correct by
attempting to run the adb tool as follows:
adb
e tool should output a list of command line options when executed.
Similarly, check the tools path setting by attempting to run the AVD
Manager command line tool (don’t worry if the avdmanager tool reports a
problem with Java - this will be addressed later):
avdmanager
In the event that a message similar to the following message appears for one
or both of the commands, it is most likely that an incorrect path was
appended to the Path environment variable:
'adb' is not recognized as an internal or external
command,
operable program or batch file.
2.6.2 Windows 10
Right-click on the Start menu, select Settings from the resulting menu and
enter “Edit the system environment variables” into the Find a setting text
eld. In the System Properties dialog, click the Environment Variables...
button. Follow the steps outlined for Windows 8.1 starting from step 3.
2.6.3 Linux
On Linux, this con guration can typically be achieved by adding a
command to the .bashrc le in your home directory (speci cs may di er
depending on the particular Linux distribution in use). Assuming that the
Android SDK bundle package was installed into /home/demo/Android/sdk,
the export line in the .bashrc le would read as follows:
export PATH=/home/demo/Android/sdk/platform-
tools:/home/demo/Android/sdk/tools:/home/demo/Android/sdk/
tools/bin:/home/demo/android-studio/bin:$PATH
Note also that the above command adds the android-studio/bin directory to
the PATH variable. is will enable the studio.sh script to be executed
regardless of the current directory within a terminal window.
2.6.4 macOS
A number of techniques may be employed to modify the $PATH
environment variable on macOS. Arguably the cleanest method is to add a
new le in the /etc/paths.d directory containing the paths to be added to
$PATH. Assuming an Android SDK installation location of
/Users/demo/Library/Android/sdk, the path may be con gured by creating a
new le named android-sdk in the /etc/paths.d directory containing the
following lines:
/Users/demo/Library/Android/sdk/tools
/Users/demo/Library/Android/sdk/tools/bin
/Users/demo/Library/Android/sdk/platform-tools
Note that since this is a system directory it will be necessary to use the sudo
command when creating the le. For example:
sudo vi /etc/paths.d/android-sdk
2.7 Android Studio Memory Management
Android Studio is a large and complex so ware application that consists of
many background processes. Although Android Studio has been criticized
in the past for providing less than optimal performance, Google has made
signi cant performance improvements in recent releases and continues to
do so with each new version. Part of these improvements include allowing
the user to con gure the amount of memory used by both the Android
Studio IDE and the background processes used to build and run apps. is
allows the so ware to take advantage of systems with larger amounts of
RAM.
If you are running Android Studio on a system with su cient unused RAM
to increase these values (this feature is only available on 64-bit systems with
5GB or more of RAM) and nd that Android Studio performance appears to
be degraded it may be worth experimenting with these memory settings.
Android Studio may also notify you that performance can be increased via a
dialog similar to the one shown below:
Figure 2-10
To view and modify the current memory con guration, select the File ->
Settings... (Android Studio -> Preferences... on macOS) menu option and, in
the resulting dialog, select the Memory Settings option listed under System
Settings in the le -hand navigation panel as illustrated in Figure 2-11 below.
When changing the memory allocation, be sure not to allocate more
memory than necessary or than your system can spare without slowing
down other processes.

Figure 2-11
2.8 Updating Android Studio and the SDK
From time to time new versions of Android Studio and the Android SDK
are released. New versions of the SDK are installed using the Android SDK
Manager. Android Studio will typically notify you when an update is ready
to be installed.
To manually check for Android Studio updates, use the Help -> Check for
Updates... menu option from the Android Studio main window (Android
Studio -> Check for Updates... on macOS).
2.9 Summary
Prior to beginning the development of Android based applications, the rst
step is to set up a suitable development environment. is consists of the
Android SDKs and Android Studio IDE (which also includes the OpenJDK
development environment). In this chapter, we have covered the steps
necessary to install these packages on Windows, macOS and Linux.
3. Creating an Example Android App in Android
Studio
e preceding chapters of this book have covered the steps necessary to
con gure an environment suitable for the development of Android
applications using the Android Studio IDE. Before moving on to slightly
more advanced topics, now is a good time to validate that all of the required
development packages are installed and functioning correctly. e best way
to achieve this goal is to create an Android application and compile and run
it. is chapter will cover the creation of an Android application project
using Android Studio. Once the project has been created, a later chapter will
explore the use of the Android emulator environment to perform a test run
of the application.
3.1 About the Project
e project created in this chapter takes the form of a rudimentary currency
conversion calculator (so simple, in fact, that it only converts from dollars to
euros and does so using an estimated conversion rate). e project will also
make use of one of the most basic of Android Studio project templates. is
simplicity allows us to introduce some of the key aspects of Android app
development without overwhelming the beginner by trying to introduce too
many concepts, such as the recommended app architecture and Android
architecture components, at once. When following the tutorial in this
chapter, rest assured that all of the techniques and code used in this initial
example project will be covered in much greater detail in later chapters.
3.2 Creating a New Android Project
e rst step in the application development process is to create a new
project within the Android Studio environment. Begin, therefore, by
launching Android Studio so that the “Welcome to Android Studio” screen
appears as illustrated in Figure 3-1:
Another random document with
no related content on Scribd:
LIST OF WORKS REFERRED TO IN THE TEXT.
Adamson, S. A. (88) Notes on a recent discovery of Stigmaria
ficoides at Clayton, Yorkshire. Quart. Journ. Geol. Soc. vol. xliv. p.
375, 1888.
Agassiz, S. (88) Three Cruises of the U. S. Coast and Geodetic
Survey Steamer “Blake” in the Gulf of Mexico, in the Caribbean
Sea, and along the Atlantic Coast of the United States, from 1877
to 1880. London, 1888.
Andrae, K. J. (53) Fossile Flora Siebenbürgens und des Banates.
Abhand. k. k. geol. Reichsanst. Bd. ii. Abth. iii. No. 4, 1853.
Andrussow, N. (87) Eine fossile Acetabularia als Gestein-bildender
Organismus. Ann. k. k. nat. hist. Hofmuseum, Wien. Bd. ii. Heft ii.
p. 77, 1887.
d’Archiac, E. J. A. (43) Description géologique du département de
l’Aisne. Mém. Soc. Géol. France, vol. v. pt. ii. p. 129, 1843.
Artis, F. T. (25) Antediluvian Phytology. London, 1825.
Baker, J. G. (87) Handbook of the Fern-Allies. London, 1887.
Balfour, J. H. (72) Palaeontological Botany. Edinburgh, 1872.
Barber, C. A. (89) The Structure of Pachytheca. Annals Bot. vol. iii.
p. 141, 1889.
—— (90) The Structure of Pachytheca. Ibid. vol. v. p. 145, 1890.
—— (92) Nematophycus Storriei, nov. sp. Ibid. vol. vi. p. 329, 1892.
Barrois, C. (88) Note sur l’existence du genre Oldhamia dans les
Pyrénées. Ann. Soc. Géol. Nord, vol. xv. p. 154, 1888.
Barton, R. (1751) Lectures in Natural Philosophy. Dublin, 1751.
Bary, A. de. (84) Comparative anatomy of the vegetative organs of
the Phanerogams and Ferns. Oxford, 1884.
—— (87) Lectures on Bacteria. Oxford, 1887.
Bates, H. W. (63) The Naturalist on the River Amazons. London,
1863. 2 vols.
Bateson, W. B. (88) Suggestion that certain fossils known as
Bilobites may be regarded as casts of Balanoglossus. Proc.
Camb. Phil. Soc. vol. vi. p. 298, 1888.
Batters, E. A. (90) Vide Holmes, E. M.
—— (92) On Conchocelis, a new genus of perforating Algae.
Phycological Memoirs. London, p. 25, 1892.
Benecke, E. W. (76) Geognostisch-paläontologische Beiträge. Vol.
ii. Heft iii., 1876.
Bennett, J. J. and Brown, R. (38). Plantae Javanicae. London,
1838–52.
Bentham, G. (70) Presidential Address. Proc. Linn. Soc. p. lxxiv.
1869–70.
Bertrand, C. E. (93) Les Bogheads à Algues. Bull. Soc. Belg. Géol.
Paléont. Hydrol. vol. vii. p. 45, 1893.
—— (96) Nouvelles remarques sur le Kerosene Shale de la
Nouvelle-Galles du Sud. Soc. d’hist. nat. Autun, 1896.
Bertrand, C. E. and Renault, B. (92) Pila bibractensis et le Boghead
d’Autun. Soc. d’hist. nat. Autun., 1892.
—— (94) Reinschia Australia et premières remarques sur le
Kerosene Shale de la Nouvelle-Galles du Sud. Soc. d’hist. nat.
Autun, 1894.
Binney, E. W. (68) Observations on the Structure of Fossil plants
found in the Carboniferous Strata. Pt. i. Calamites and
Calamodendron. Palaeont. Soc. London, 1868.
—— (71) Ibid. Pt. ii. Lepidostrobus and some allied cones.
Bischoff, G. W. (28) Die cryptogamischen Gewächse. Nürnberg,
1828.
Bornemann, J. G. (56) Über organische Reste der Lettenkohlen-
Gruppe Thüringens. Leipzig, 1856.
—— (86) Geologische Algenstudien. Jahrb. K. Preuss. Geol.
Landesanst. Bergakad., 1886.
—— (87) Die Versteinerungen des Cambrischen Schichtensystems
der Insel Sardinien. Nova Acta Acad. Caes. Leop. Car. vol. li.,
1887.
—— (91) Ibid. vol. lvi., 1891.
Bornet, E. and Flahault. (89) Note sur deux nouveaux genres
d’algues perforantes. Journ. Bot. vol. ii. p. 161, 1888.
—— (892) Sur quelques plantes vivant dans le test calcaire des
mollusques. Bull. Soc. Bot. France, vol. xxxvi. p. clxvii., 1889.
Bower, F. O. (94) Studies in the morphology of Spore-producing
members. Equisetineae and Lycopodineae. Phil. Trans. R. Soc.
vol. clxxxv. B. p. 473, 1894.
Brongniart, A. (22) Sur la classification et la distribution des
végétaux fossiles en général. Mém. Mus. Hist. Nat. Paris, vol. viii.
p. 233, 1822.
—— (28) Prodrome d’une histoire des végétaux fossiles. Paris,
1828.
—— (282) Histoire des végétaux fossiles. Paris, 1828.
—— (39) Observations sur la structure intérieure du Sigillaria
elegans. Arch. Mus. d’hist. nat. vol. i. p. 405, 1839.
—— (49) Tableau des genres de végétaux fossiles. Extrait du
Dictionnaire d’histoire naturelle, vol. xiii. p. 49. Paris, 1849.
Brown, A. (94) On the structure and affinities of the genus
Solenopora. Geol. Mag. [4] vol. i. p. 145, 1894.
Brown, R. (11) Some observations on the parts of fructification in
Mosses, with characters and descriptions of two new genera of
that order. Trans. Linn. Soc. vol. x. p. 312, 1811.
—— (38) Vide Bennett, J. J.
Bryce, J. (72) The Geology of Arran. Glasgow and London, 1872.
Buckland, W. (37) Geology and Mineralogy considered with
reference to Natural Theology. London, 1858.
Buckman, J. (50) On some fossil plants from the Lower Lias. Quart.
Journ. Geol. Soc. vol. vi. p. 413, 1850.
Bunbury, C. J. F. (51) On some fossil plants from the Jurassic Strata
of the Yorkshire Coast. Quart. Journ. Geol. Soc. vol. vii. p. 179,
1851.
—— (61) Notes on a collection of fossil plants from Nágpur, Central
India. Ibid. vol. xvii. p. 325, 1861.
—— (83) Botanical Fragments. London, 1883.
Bütschli, O. (83) Bronn’s Klassen und Ordnungen des Thier-Reichs,
vol. i. Leipzig and Heidelberg, 1883–87.
Campbell, D. (95) The structure and development of the Mosses
and Ferns. London, 1895.
Carpenter, W. B., Parker, W. K. and Jones, T. R. (62) Introduction
to the study of the Foraminifera. (Ray Society) London, 1862.
Carruthers, W. (67) On the structure of the fruit of Calamites. Journ.
Bot. Vol. v. 1867.
—— (70) On the structure of a Fern stem from the Lower Eocene of
Herne Bay. Quart. Journ. Geol. Soc. vol. xxvi. p. 349, 1870.
—— (71) On some supposed vegetable fossils. Ibid. vol. xxvii. p
443, 1871.
—— (72) On the history, histological structure, and affinities of
Nematophycus Logani, Carr. (Prototaxites Logani, Dawson), an
alga of Devonian age. Micros. Journ. vol. viii. p. 160, 1872.
—— (722) Vide Woodward, H., p. 168.
— (76) Address before the Geologists’ Association, 1876–77. Proc.
Geol. Assoc. vol. v. p. 17, 1876.
Cash, W. and Hick, T. (78) A contribution to the flora of the Lower
Coal-Measures of the Parish of Halifax, Yorkshire. Proc. Yorks.
Geol. Polyt. Soc. vol. vii. p. 73, 1878–81.
—— (782) On fossil fungi from the Lower Coal-Measures of Halifax.
Proc. Yorks. Geol. Polyt. Soc. vol. vii. p. 115, 1878.
—— (81) A contribution to the flora of the Lower Coal-Measures of
the Parish of Halifax, Yorkshire. Pt. iii. Proc. Yorks. Geol. Polyt.
Soc. vol. vii. p. 400, 1881.
Castracane, F. (76) Die Diatomeen in der Kohlenperiode.
Pringsheim’s Jahrb. vol. x. p. 1, 1876.
Cayeux, L. (92) Sur la présence de nombreuses Diatomées dans
les gaizes crétacées du bassin de Paris. Compt. Rend. vol. cxiv.
p. 375, 1892.
—— (97) Contribution à l’étude micrographique des terrains
sédimentaires. Mém. Soc. Géol. Nord, vol. iv. ii. Lille, 1897.
“Challenger.” Reports on the Scientific results of the Voyage of
H.M.S. “Challenger” during the years 1873–76, under the
command of Captain Nares and Captain Thomson. Prepared
under the Superintendence of Sir C. Wyville Thomson and John
Murray. London, 1880–95.
—— (85) Narrative, vols. i. and ii. 1882–85.
—— (91) Deep Sea Deposits. J. Murray and A. F. Renard, 1891.
Christison, R. (76) Notice of Fossil trees recently discovered in
Craigleith Quarry near Edinburgh. Phil. Trans. Edinburgh, vol.
xxvii. p. 203, 1876.
Church, A. H. (95) The structure of the Thallus of Neomeris
dumetosa, Lam. Annals Bot. vol. ix. p. 581, 1895.
Coemans, E. and Kickx, J. J. (64) Monographie des
Sphenophyllum d’Europe. Bull. Acad. Roy. Belg. vol. xviii. [2] p.
160, 1864.
Cohn, F. (62) Über die Algen des Carlsbader Sprudels und deren
Antheil an der Bildung des Sprudel-Sinters. Abh. Schles. Ges.
vaterland. Cultur, 1862, p. 65.
Cole, G. (94) On some examples of cone-in-cone structure. Mineral.
Journ. vol. x. 1894.
Comstock, T. H. (88) An introduction to Entomology. Ithaca, 1888.
Conwentz, H. (78) Über ein tertiäres Vorkommen Cypressenartiger
Hölzer bei Calistoga in Californien. Neues Jahrb. p. 800, 1878.
—— (80) Die fossilen Hölzer von Karlsdorf am Zobten. 1880.
—— (90) Monographie der baltischen Bernsteinbäume. Danzig,
1890.
—— (96) On English Amber and Amber generally. Nat. Science, vol.
ix. p. 99, 1896.
Corda, A. J. (45) Beiträge zur Flora der Vorwelt. Prag, 1845. (New
edition, unaltered, 1867.)
Cormack, B. G. (93) On a cambial development in Equisetum.
Annals Bot. vol. vii. p. 63, 1893.
Costa, Mendes da. (1758) An account of the impressions of plants
on the slates of coal. Phil. Trans. R. S. London, vol. l. p. 228,
1758.
Cotta, C. B. (50) Die Dendrolithen in Beziehung auf ihren inneren
Bau. Dresden, 1850. (Original edition, 1832.)
Cramer, C. (87) Über die verticillaten Siphoneen, besonders
Neomeris und Cymopolia. Denksch. Schweiz. Nat. Ges. vol. xxv.
1887.
—— (90) Über die verticillaten Siphoneen, besonders Neomeris und
Bornetella. Denksch. Schweiz. Nat. Ges. vol. xxxii. 1890.
Credner, H. (87) Elemente der Geologie. Leipzig, 1887.
Crépin, F. (81) L’emploi de la Photographie pour la reproduction des
empreintes végétales. Bull. Soc. Bot. Belg. vol. xx. pt. ii. 1881.
Damon, R. (88) A supplement to the geology of Weymouth and the
Isle of Portland. Weymouth, 1888.
Darwin, C. (82) The Origin of Species. (Edit. 6.) London, 1882.
—— (87) The life and letters of Charles Darwin. Edited by Francis
Darwin. London, 1887. (Edit. 2.)
—— (90) A Naturalist’s Voyage. London, 1890.
Dawson, J. W. (59) On fossil plants from the Devonian rocks of
Canada. Quart. Journ. Geol. Soc. vol. xv. p. 477, 1859.
—— (66) On the conditions of the deposition of coal. Ibid. vol. xxii. p.
95, 1866.
—— (71) The fossil plants of the Devonian and Upper Silurian
formations of Canada. Geol. Surv. Canada, 1871.
—— (81) Notes on new Erian (Devonian) plants. Quart. Journ. Geol.
Soc. vol. xxxvii. p. 299, 1881.
—— (82) Notes on Prototaxites and Pachytheca discovered by Dr
Hicks in the Denbighshire Grits of Corwen, North Wales. Ibid. vol.
xxxviii. p. 103, 1882.
—— (88) The geological history of plants. London, 1888.
—— (90) On burrows and tracks of invertebrate animals in
Palaeozoic rocks. Quart. Journ. Geol. Soc. vol. xlvi. p. 595, 1890.
Deecke, W. (83) Über einige neue Siphoneen. Neues Jahrb. Jahrg.
i. p. 1, 1883.
Defrance. (26) Dictionnaire des Sciences naturelles. Article
Polytrype, vol. xlii. p. 453, 1826.
Delgado, J. F. N. (86) Étude sur les Bilobites. Secc. Trav. Géol.
Portugal. Lisbon, 1886.
Dixon, H. H. and Joly, J. (97) Coccoliths in our coastal waters.
Nature, vol. lvi. p. 468, 1897.
Dixon, H. N. and Jameson, H. G. (96) The Student’s Handbook of
British Mosses. London, 1896.
Duncan, P. M. (76) On some unicellular algae parasitic within
Silurian and Tertiary Corals, with a notice of their presence in
Calceolina sandalina and other fossils. Quart. Journ. Geol. Soc.
vol. xxxii. p. 205, 1876.
—— (762) On some Thallophytes parasitic within recent
Madreporaria. Proc. R. Soc. vol. xxv. p. 238, 1876.
Dunker, W. (46) Monographie der norddeutschen Wealdenbildung.
Braunschweig, 1846.
Duval-Jouve, J. (64) Histoire naturelle des Equisetum de France.
Paris, 1864.
Ehrenberg, C. G. (36) Über das Massenverhältniss der jetzt
lebenden Kieselfusorien und über ein neues Infusiorien-
Conglomerat als Polirschiefer von Jastrabo in Ungarn. Abh. k.
Akad. Wiss. Berlin, 1836, p. 109.
—— (54) Mikrogeologie. Leipzig, 1854.
Ellis, J. (1755) An essay towards a Natural History of the Corallines.
London, 1755.
Engelhardt, H. (87) Über Rosselinia conjugata (Beck.) eine neue
Pilzart aus der Braunkohlen-formation Sachsens. Ges. Isis.
Dresden, Abh. 4, p. 33, 1887.
Etheridge, R. (81) Vide Hicks, H.
Etheridge, R. junr. (92) On the occurrence of microscopic fungi,
allied to the genus Palaeachyla, Duncan, in the Permo-
Carboniferous rocks of New South Wales and Queensland. Rec.
Geol. Surv. N.S.W. Pt. iii. p. 95, 1892.
—— (95) On the occurrence of a plant in the Newcastle or Upper
Coal-Measures possessing characters both of the genera
Phyllotheca Brongn. and Cingularia Weiss. Ibid. vol. iv. Pt. iv. p.
148, 1895.
Ettingshausen, C. von. (55) Die Steinkohlenflora von Radnitz in
Böhmen. Abhand. k. k. geol. Reichsanst. Wien, vol. ii. p. 1, 1855.
—— (66) Die fossile Flora des Mährisch-Schlesischen
Dachschiefers. Ibid. vol. xxv. p. 77, 1866.
Ettingshausen, C. von and Gardner, J. S. (79) A monograph of the
British Eocene Flora. Palaeontographical Society. London, 1879–
1882.
Feilden, H. W. (96) Note on the glacial Geology of Arctic Europe and
its islands. Pt. i. Kolguev Island. Quart. Journ. Geol. Soc. vol. lii.
p. 52, 1896. Appendix by A. C. Seward, p. 61.
Feistmantel, O. (73) Das Kohlenvorkommen bei Rothwaltersdorf in
der Grafschaft Glatz und dessen organische Einschlüsse. Zeit.
Deutsch. Geol. Ges. vol. xxv. p. 463, 1873.
—— (75) Die Versteinerungen der böhmischen
Kohlenablagerungen. Palaeontograph. vol. xxiii. p. 1, 1875–76.
—— (81) The Fossil Flora of the Gondwana System. Mem. Geol.
Surv. India, (Ser. xii.) vol. iii. 1881. (The Flora of the Damuda-
Panchet Divisions, pp. 1–77. Pls. i. A–xvi. A bis, 1880.)
—— (90) Geological and palaeontological relations of the Coal and
plant-bearing beds of Palaeozoic and Mesozoic age in Eastern
Australia and Tasmania. Mem. Geol. Surv. N. S. Wales.
Palaeontology, No. 3, 1890.
Felix, J. (86) Untersuchungen über den inneren Bau westfälischer
Carbon-Pflanzen. Abh. Geol. Landesanst. 1886, p. 153.
—— (94) Studien über fossile Pilze. Zeit. deutsch. geol. Ges. Heft i.
p. 269, 1894.
—— (96) Untersuchungen über den inneren Bau westfälischer
Carbon-pflanzen. Földtani Közlöny, vol. xxvi. p. 165, 1896.
Fischer, A. (92) Die Pilze. Rabenhorst’s Kryptogamen Flora, vol. i.
Abt. iv. Leipzig, 1892.
Fliche, P. and Bleicher, —. Étude sur la flore de l’oolithe inférieure
aux environs de Nancy. Bull. Soc. Sci. Nancy, vol. v. [2] p. 54,
1881.
Forbes, E. (56) On the Tertiary fluviomarine formation of the Isle of
Wight. Mem. Geol. Surv. 1856.
Forbes, H. O. (85) A Naturalist’s Wanderings in the Eastern
Archipelago. London, 1885.
Früh, J. (90) Zur Kenntniss der gesteinbildenden Algen. Abh.
Schweiz. pal. Ges. vol. xviii. 1890.
Fuchs, T. (94) Über eine fossile Halimeda aus dem Eocänen
Sandstein von Greifenstein. Sitzbericht. Abh. Wien, vol. ciii. Abt. i.
p. 300, 1894.
—— (95) Studien über Fucoiden und Hieroglyphen. Denksch. Akad.
Wien, vol. lxii. p. 369, 1895.
Gardner, J. S. (79) Vide Ettingshausen.
—— (84) Fossil plants. Proc. Geol. Assoc. vol. viii. p. 299, 1884.
—— (86) On Mesozoic Angiosperms. Geol. Mag. vol. iii. p. 193,
1886.
—— (87) On the leaf-beds and gravels of Ardtun, Carsaig, &c., in
Mull. Quart. Journ. Geol. Soc. vol. xliii. p. 270, 1887.
Geikie, A. (93) A Text-book of Geology. London, 1893. (Edit iii.)
Geinitz, H. B. (55) Die Versteinerungen der Steinkohlenformation in
Sachsen. Leipzig, 1855.
Germar, E. F. (44) Die Versteinerungen des Steinkohlengebirges
von Wettin und Löbejün in Saalkreis, bildlich dargestellt und
beschrieben. Halle, 1844–53.
Germar, E. F. and Kaulfuss, F. (31) Über einige merkwürdige
Pflanzen-Abdrücke. Nova Acta Leop. Car. vol. xv. 1831.
Giesenhagen, K. (92) Über hygrophile Farne. Flora, vol. lxxvi. p.
157, 1892.
Gomont, M. (88) Recherches sur les enveloppes cellulaires des
nostocacées filamenteuses. Bull. Soc. Bot. France, vol. xxxv. p.
204, 1888.
—— (92) Monographie des Oscillariées. Ann. Sci. Nat. vol. xv. [7] p.
263, 1892.
Göppert, H. R. (36) Über den Zustand in welchem sich die fossilen
Pflanzen befinden, und über den Versteinerungsprocess
insbesondere. Poggendorf’s Annalen, vol. xxxviii. p. 561, 1836.
(Also the Edinburgh New Philosophical Journal, vol. xxiii. p. 73,
1837.)
—— (362) Die fossilen Farnkräuter. Nova Acta Leop. Car. vol. xvii.
(Supplt.) 1836.
—— (45) Tchihatcheff’s Voyage Scientifique dans l’Altaï oriental, pp.
379–390. Paris, 1845.
—— (52) Über die Flora des Übergangsgebirges. Nova Acta Ac.
Caes. Leop. Car. vol. xxii. (Supplt.) 1852.
—— (57) Über den versteinten Wald von Radowenz bei Adersbach
in Böhmen und über den Versteinerungsprocess überhaupt. Jahrb.
k. k. Geol. Reichs. Wien, vol. viii. p. 725, 1857.
—— (60) Über die fossile Flora der Silurischen, der Devonischen
und unteren Kohlenformation. Nova Acta Ac. Caes. Leop. Car. vol.
xxvii. p. 427, 1860.
—— (64) Die fossile Flora der Permischen Formation.
Palaeontograph. vol. xii. 1864–65.
Göppert, H. R. and Berendt, G. C. (45) Der Bernstein und die in
ihm befindlichen Pflanzenreste der Vorwelt. Berlin, 1845.
Göppert, H. R. and Menge, A. (83) Die Flora des Bernsteins. Vol. i.
Danzig, 1883.
Gottsche, C. M. (86) Über die im Bernstein eingeschlossenen
Lebermoose. Bot. Central. vol. xxv. p. 95, 1886.
Grand’Eury, C. (69) Observations sur les Calamites et les
Asterophyllites. Compt. Rend. vol. lxviii. p. 705, 1869.
—— (77) Flora Carbonifère du dépt. de la Loire et du centre de la
France. Mém. Ac. Sci. Paris, vol. xxiv. 1877.
—— (82) Mémoire sur la formation de la houille. Ann. Mines, vol. i.
1882.
—— (87) Formation des couches de houille et du terrain houiller.
Mém. Soc. Géol. France, vol. iv. [3] 1887.
—— (89) Calamariées. Arthropitus et Calamodendron. Compt.
Rend. vol. cviii. p. 1086, 1889.
—— (90) Géologie et paléontologie du bassin houiller du Gard. St.
Étienne, 1890.
Greville, R. K. (47) Notice of a new species of Dawsonia. Ann. Mag.
Nat. Hist. vol. xix. p. 226, 1847.
Guillemard, F. H. H. (86) The Cruise of the “Marchesa” to
Kamschatka and New Guinea. London, 1886.
Gümbel, C. W. (71) Die sogenannten Nulliporen. Pt. ii. Abh. k.
Münchener Akad. Wiss. vol. xi. p. 231, 1871.
Gutbier, A. von. (49) Die Versteinerungen des Rothliegendes in
Sachsen. Dresden and Leipzig, 1849.
Haberlandt, G. (96) Physiologische Pflanzenanatomie (edit. 2).
Leipzig, 1896.
Hall, J. (47) and (52) Natural History of New York. Palaeontology.
Vol. i. Albany, 1847, vol. ii. Albany, 1852.
Harker, A. (95) Petrology for students. Cambridge,1895.
Harper, R. A. (95) Die Entwickelung des Peritheciums bei
Sphaerotheca Castagnei. Bericht. deutsch. Bot. Ges. vol. xiii. p.
475, 1895.
Harrison, J. B. (91) Vide Jukes-Browne.
Hartig, R. (78) Die Zersetzungserscheinungen des Holzes der
Nadelholzbäume und der Eiche in förstlicher botanischer und
chemischer Richtung bearbeitet. Berlin, 1878.
—— (94) Text-book of the diseases of trees. (Translation by W.
Somerville.) London, 1894.
Harvey, W. H. (58) Phycologia Australica. London, 1858.
Hauck, F. (85) Die Meeresalgen Deutschlands und Oesterreichs.
Rabenhorst’s Kryptogamen Flora, vol. ii. Leipzig, 1885.
Heer, O. (53) Beschreibung der angeführten Pflanzen und Insekten.
Neue Denksch. Schweiz. Ges. gesammt. Wiss. Vol. xiii. 5, p. 117,
1853. (Appendix to a Memoir by A. Escher v. d. Linth.)
—— (55) Flora Tertiaria Helvetiae. Winterthur, 1855.
—— (65) Die Urwelt der Schweiz. Zürich, 1865.
—— (68) Flora fossilis Arctica. Die fossile Flora der Polarlände. Vol.
i. 1868. Vol. ii. 1871. Vol. iii. 1875. Vol. iv. 1877. Vol. v. 1878. Vols.
vi. and vii., Flor. foss. Grön. Die fossile Flora Grönlands. 1882–83.
—— (76) Flora fossilis Helvetiae. Zürich, 1876.
—— (77) Beiträge zur Jura-Flora Ost-Sibiriens und des Amurlandes.
Flora fossilis Arctica, vol. v. Zürich, 1877.
—— (82) Nachträge zur Jura-Flora Sibiriens. (Flor. foss.
Grönlandica, Th. i.) Flora foss. Arct. vol. vi. Zürich, 1882.
Heim, A. (78) Untersuchungen über den Mechanismus der
Gebirgsbildung. Basel, 1878.
Heinricher, E. (82) Die näheren Vorgänge bei der Sporenbildung der
Salvina natans verglichen mit den der übrigen Rhizocarpeen.
Sitzber. kais. Akad. Wiss. Wien, vol. lxxxvii. Abt. i. p. 494, 1882.
Hensen, V. (92) Ergebnisse der in dem Atlantischen Ocean
Plankton-Expedition der Humboldt Stiftung. Kiel and Leipzig, vol. i.
1892.
Herzer, H. (93) A new fungus from the Coal-Measures. American
Geologist, vol. xi. p. 365, 1893.
Hick, T. (78) and (81) Vide Cash, W.
—— (93) Calamostachys Binneyana, Schimp. Proc. Yorks. Geol.
Polytech. Soc. vol. xii. pt. iv. p. 279, 1893.
—— (932) The fruit-spike of Calamites. Nat. Science, vol. ii. p. 354,
1893.
—— (94) On the primary structure of the stem of Calamites. Proc.
Lit. and Phil. Soc. [4] vol. viii. p. 158. Manchester, 1894.
—— (95) On the structure of the leaves of Calamites. Ibid. vol. ix. [4]
p. 179, 1895.
—— (96) On a sporangiferous spike, from the Middle Coal-
Measures, near Rochdale. Ibid. vol. x. [4] p. 73, 1896.
Hicks, H. (81) On the discovery of some remains of plants at the
base of the Denbighshire grits, near Corwen, N. Wales; with an
appendix by R. Etheridge. Quart. Journ. Geol. Soc. vol. xxxvii. p.
482, 1881.
Hinde, G. J. and Fox, H. (95) On a well-marked horizon of
Radiolarian rocks in the Lower Culm-Measures of Devon, Cornwall
and West Somerset. Quart. Journ. Geol. Soc. vol. li. p. 609, 1895.
Hirschwald, J. (73) Über Umwandlung von verstürzter
Holzzimmerung in Braunkohle im alten Mann der Grube Dorothea
bei Clausthal. Zeit. deutsch. geol Ges. vol. xxv. p. 364, 1873.
Holmes, E. M. and Batters, E. A. (90) A revised list of British marine
algae. Annals Bot. vol. v. p. 63, 1890–91.
Holmes, W. H. (80) Fossil forests of the Volcanic Tertiary formations
of the Yellowstone National Park. Bull. U. S. Geol. Surv. vol. v. no.
2, 1880.
Hooker, J. D. (44) The Botany of the Antarctic voyage of H. M.
Discovery Ships “Erebus” and “Terror” in the years 1839–43.
London, 1844.
—— (53) Vide Strickland.
—— (81) Presidential Address before Section E of the York meeting
of the British Association. Annual Report, p. 727, 1881.
—— (89) On Pachytheca. Annals Bot. vol. iii. p. 135, 1889.
—— (91) Himalayan Journals. London, 1891. (Minerva Library
Edition.)
Hooker, W. J. (20) Musci Exotici. Vol. ii. London, 1820.
—— (61) A second century of ferns. London, 1861.
Howse, R. (88) A catalogue of fossil plants from the Hutton
Collection. Newcastle, 1888.
Hughes, T. McKenny (79) On the relation of the appearance and
duration of the various forms of life upon the earth to the breaks in
the continuity of the sedimentary strata. Proc. Phil. Soc.
Cambridge, vol. iii. pt. vi. p. 247, 1879.
—— (84) On some tracks of terrestrial and freshwater animals.
Quart. Journ. Geol. Soc. vol. xl. p. 178, 1884.
Humboldt, A. von. (48) Cosmos. (Translated by E. C. Otté.)
London, 1848.
Huxley, T. H. (93) Science and Hebrew tradition. Collected Essays,
vol. iv. London, 1893.
Jäger, G. F. (27) Über die Pflanzenversteinerungen welche in dem
Bausandstein von Stuttgart vorkommen. Stuttgart, 1827.
James, J. F. (93) Studies in the problematic organisms. No. 2. The
genus Fucoides. Journ. Cincinnati Soc. Nat. Hist. 1893.
—— (932) Notes on fossil fungi. U. S. Dpt. Agriculture, vol. vii. no. 3,
p. 268, 1893.
—— (933) Fossil fungi. Translated from the French of R. Ferry, with
remarks. Journ. Cincinnati Soc. Nat. Hist. 1893, p. 94.
Judeich, J. F. and Nitsche, F. (95) Lehrbuch der mitteleuropäischen
Forstinsektenkunde. Vienna, 1895.
Jukes-Browne, A. J. (86) The Student’s Handbook of Historical
Geology. London, 1886.
Jukes-Browne, A. J. and Harrison, J. B. (91) The Geology of
Barbados. Quart. Journ. Geol. Soc. vol. xlvii. p. 197, 1891.
Kayser, E. (95) Text-book of Comparative Geology. (Translated and
edited by P. Lake.) London, 1895.
Kent, S. (93) The Great Barrier Reef of Australia. London, 1893.
Kickx, J. J. (64) Vide Coemans, E.
Kidston, R. (83) Report on fossil plants collected by the Geological
Survey of Scotland in Eskdale and Liddesdale. Trans. R. Soc.
Edinburgh, vol. xxx. p. 531, 1883.
—— (832) On the affinities of the genus Pothocites, Paterson; with
the description of a specimen from Glencartholm, Eskdale. Trans.
Bot. Soc. Edinburgh, vol. xvi. p. 28.
—— (86) Catalogue of the Palaeozoic plants in the department of
geology and palaeontology, British Museum. London, 1886.
—— (88) Vide Young.
—— (90) On the fructification of Sphenophyllum trichomatosum,
Stur, from the Yorkshire Coal-field. Proc. R. Soc. Phys. Edinburgh,
vol. xi. p. 56, 1890–91.
—— (902) Note on the Palaeozoic species mentioned in Lindley and
Hutton’s fossil Flora. Proc. R. Soc. Phys. Edinburgh, vol. x. p. 345,
1890–91.
—— (92) On the occurrence of the genus Equisetum (E.
Hemingwayi, Kidston) in the Yorkshire Coal-Measures. Annals
Mag. Nat. Hist. vol. ix. [6] p. 138, 1892.
—— (93) On the fossil plants of the Kilmarnock, Galston, and
Kilwinning Coal-fields, Ayrshire. Trans. R. Soc. Edinburgh, vol.
xxxvii. pt. ii. p. 307, 1893.
—— (94) On the various divisions of British Carboniferous rocks as
determined by their fossil flora. Proc. R. Soc. Phys. Soc.
Edinburgh, vol. xii. p. 183, 1894.
Kinahan, J. R. (58) The genus Oldhamia. Trans. R. Irish Acad. vol.
xxiii. p. 547, 1858.
Kippis, A. (78) A narrative of the voyage round the world, performed
by Captain James Cook. London, 1878.
Kitton, F. (81) Vide Shrubsole, W. H.
KJellman, F. R. (83) The Algae of the Arctic Sea. Kongl. Svensk
Vetenskaps Akad. Hand. vol. xx. no. 5, 1883.
Knowlton, F. H. (89) Fossil wood and lignite of the Potomac
formation. Bull. U. S. Geol. Surv. no. 56, 1889.
—— (892) Description of a problematic organism from the Devonian
at the falls of the Ohio. Amer. Journ. Science, vol. xxxvii. [3] p.
202, 1889.
—— (94) Fossil plants as aids to geology. Journ. Geol. vol. ii. no. 4,
p. 365, 1894.
—— (96) The nomenclature question. Bot. Gazette, vol. xxi. p. 82,
1896.
Koechlin-Schlumberger, J. Vide Schimper, W. P.
Kölliker, A. (59) On the frequent occurrence of vegetable parasites
in the hard structures of animals. Annals Mag. Nat. Hist. vol. iv. [3]
p. 300, 1859.
—— (592) Über das ausgebreitete Vorkommen von pflanzlichen
Parasiten in den Hartgebilden niederer Thiere. Zeitsch. wiss. Zool.
vol. x. p. 215, 1859.
König, C. (29) Vide Murchison (29) p. 298.
Kuntze, O. (80) Über Geysirs und nebenan entstehende verkieselte
Bäume. Ausland, 1880, p. 361.
Lake, P. (95) The Denbighshire series of South Denbighshire. Quart.
Journ. Geol. Soc. vol. li. p. 9, 1895.
Lamarck, de. (16) Histoire naturelle des animaux sans vertèbres.
Paris, vol. ii. 1816.
Lamouroux, J. (21) Exposition méthodique des genres de l’ordre
des Polypiers. Paris, 1821.
Lapworth, C. (81) Appendix to W. Keeping’s Geology of Central
Wales. Quart. Journ. Geol. Soc. vol. xxxvii. p. 171, 1881.
Leckenby, J. (64) On the sandstones and shales of the Oolites of
Scarborough, with descriptions of some new species of fossil
plants. Quart. Journ. Geol. Soc. vol. xx. p. 74, 1864.
Lehmann. (1756) Dissertation sur les fleurs de l’Aster montanus.
Hist. Acad. R. Sci. et bell. lett. Berlin, 1756.
Lesquereux, L. (66) Geological Survey of Illinois. Vol. ii. New York,
1866.
—— (70) Ibid. vol. iv. 1870.
—— (79) Atlas to the Coal Flora of Pennsylvania and of the
Carboniferous formation throughout the United States. Second
Geol. Surv. Penn. Report of Progress P. Harrisburg, 1879.
—— (80) Description of the Coal Flora of the Carboniferous
formation in Pennsylvania and throughout the United States. Ibid.
1880 and 1884.
—— (84) Ibid. vol. iii. 1884.
—— (87) A species of Fungus recently discovered in the shale of the
Darlington Coal bed at Canneton, Pennsylvania. Proc. Amer. Phil.
Soc. vol. xvii. p. 173, 1887.
Lhwyd (Luidius), E. (1760) (1699) Lithophylacii Britannici
ichnographia. Oxford, 1760. (First edition published in 1699.)
Limpricht, K. G. (90) Die Laubmoose. Rabenhorst’s Kryptogamen
Flora, vol. iv. Leipzig, 1890.
Lindenberg, J. B. W. (39) Species Hepaticarum. Bonn, 1839.
Lindley, J. and Hutton, W. (31) The fossil Flora of Great Britain.
London, 1831–37.
Vol. i. Pls. 1–79; 1831–33.
Vol. ii. Pls. 80–156; 1833–35.
Vol. iii. Pls. 157–230; 1837.
Linnarsson, J. G. O. (69) On some fossils found in the Eophyton
Sandstones at Lugnås in Sweden. Geol. Mag. vol. vi. p. 393,
1869.
Lister, A. (94) A monograph of the Mycetozoa, being a descriptive
Catalogue of the species in the Herbarium of the British Museum.
London, 1894.
Ludwig, R. (57) Fossile Pflanzen aus der jüngsten Wetterauer
Braunkohle. Palaeontograph, vol. v. p. 81, 1857.
—— (59) Fossile Pflanzen aus der ältesten Abtheilung der
Rheinisch-Wetterauer Tertiär-Formation. Palaeontograph, vol. viii.
Luerssen, C. (89) Die Farnpflanzen oder
Gefässbündelkryptogamen. Rabenhorst’s Krypt. Flora, vol. iii.
Leipzig, 1889.
Lydekker, R. (89) Vide Nicholson.
Lyell, C. (29) On a recent formation of freshwater limestone in
Forfarshire. Trans. Geol. Soc. vol. ii. [2] p. 73, 1829.
—— (45) Travels in North America. London, 1845.
—— (55) A manual of Elementary Geology. London, 1855, (Edit. 5).
—— (67) Principles of Geology. London, 1867, (Edit. 10).
—— (78) Elements of Geology. London, 1878, (Edit. 3).
M‘Coy, F. (47) On the Fossil Botany and Zoology of the rocks
associated with the coal of Australia. Annals Mag. Nat. Hist. vol.
xx. p. 145, 1847.
Mahr, — (68) Über Sphenophyllum Thoni, eine neue Art aus dem
Steinkohlengebirge von Ilmenau. Zeit. deutsch. geol. Ges. vol. xx.
p. 433, 1868.
Mantell, G. (44) Medals of Creation. London, 1844.
Marsh, O. C. (71) Notice of a fossil forest in the Tertiary of California.
Amer. Journ. Sci. vol. i. [3] p. 266, 1871.
Martin, W. (09) Petrificata Derbiensia. Wigan, 1809.
Maskell, W. M. (87) The Scale-insects. Wellington, 1887.
Massalongo, E. G. (51) Sopra le piante fossili dei terreni terziarj del
Vicentino, Osservazioni, &c. Padova, 1851.
—— (59) Studii sulla flora fossile e geologia stratigrafica del
Senigalliese. Imola, 1859.

You might also like