100% found this document useful (3 votes)
592 views

Asynchronous Android Programming 2nd Edition Helder Vasconcelos - Download the ebook now and read anytime, anywhere

The document promotes the book 'Asynchronous Android Programming 2nd Edition' by Helder Vasconcelos, which focuses on building responsive Android applications using multi-core mobile devices. It includes links to download the book and other related resources, as well as a detailed table of contents outlining various chapters on asynchronous programming techniques. The author, Helder Vasconcelos, is an experienced software engineer with a background in real-time and multithreaded applications.

Uploaded by

makuluduler
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
592 views

Asynchronous Android Programming 2nd Edition Helder Vasconcelos - Download the ebook now and read anytime, anywhere

The document promotes the book 'Asynchronous Android Programming 2nd Edition' by Helder Vasconcelos, which focuses on building responsive Android applications using multi-core mobile devices. It includes links to download the book and other related resources, as well as a detailed table of contents outlining various chapters on asynchronous programming techniques. The author, Helder Vasconcelos, is an experienced software engineer with a background in real-time and multithreaded applications.

Uploaded by

makuluduler
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

Visit ebookfinal.

com to download the full version and


explore more ebooks or textbooks

Asynchronous Android Programming 2nd Edition


Helder Vasconcelos

_____ Click the link below to download _____


https://ebookfinal.com/download/asynchronous-android-
programming-2nd-edition-helder-vasconcelos/

Explore and download more ebooks or textbook at ebookfinal.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Android Programming Tutorials 3rd Edition Mark L Murphy

https://ebookfinal.com/download/android-programming-tutorials-3rd-
edition-mark-l-murphy/

Professional Android Sensor Programming 1st Edition Greg


Milette

https://ebookfinal.com/download/professional-android-sensor-
programming-1st-edition-greg-milette/

Reactive Programming with RxJS Untangle Your Asynchronous


JavaScript Code 1st Edition Sergi Mansilla

https://ebookfinal.com/download/reactive-programming-with-rxjs-
untangle-your-asynchronous-javascript-code-1st-edition-sergi-mansilla/

The Android Developer s Cookbook 2nd edition Building


Applications with the Android SDK Ronan Schwarz

https://ebookfinal.com/download/the-android-developer-s-cookbook-2nd-
edition-building-applications-with-the-android-sdk-ronan-schwarz/
Android Application Development For Dummies 2nd Edition
Michael Burton

https://ebookfinal.com/download/android-application-development-for-
dummies-2nd-edition-michael-burton/

Handbook of Asynchronous Machines with Variable Speed 1st


Edition Hubert Razik

https://ebookfinal.com/download/handbook-of-asynchronous-machines-
with-variable-speed-1st-edition-hubert-razik/

A Designer s Guide to Asynchronous VLSI 1st Edition Peter


A. Beerel

https://ebookfinal.com/download/a-designer-s-guide-to-asynchronous-
vlsi-1st-edition-peter-a-beerel/

Programming in Haskell 2nd Edition Graham Hutton

https://ebookfinal.com/download/programming-in-haskell-2nd-edition-
graham-hutton/

Programming in Lua 2nd Edition Roberto Ierusalimschy

https://ebookfinal.com/download/programming-in-lua-2nd-edition-
roberto-ierusalimschy/
Asynchronous Android Programming 2nd Edition Helder
Vasconcelos Digital Instant Download
Author(s): Helder Vasconcelos
ISBN(s): 9781785883248, 1785883240
Edition: 2nd
File Details: PDF, 2.30 MB
Year: 2016
Language: english
[1]
Asynchronous Android
Programming
Second Edition

Unlock the power of multi-core mobile devices to build


responsive and reactive Android applications

Helder Vasconcelos

BIRMINGHAM - MUMBAI
Asynchronous Android Programming
Second Edition

Copyright © 2016 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy
of the information presented. However, the information contained in this book is
sold without warranty, either express or implied. Neither the author, nor Packt
Publishing, and its dealers and distributors will be held liable for any damages
caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.

First published: July 2016

Production reference: 1260716

Published by Packt Publishing Ltd.


Livery Place
35 Livery Street
Birmingham B3 2PB, UK.

ISBN 978-1-78588-324-8

www.packtpub.com
Credits

Author Project Coordinator


Helder Vasconcelos Nidhi Joshi

Reviewer Proofreader
Gavin Matthews Safis Editing

Commissioning Editor Indexer


Edward Gordon Mariammal Chettiyar

Acquisition Editor Graphics


Indrajit Das Disha Haria

Content Development Editor Production Coordinator


Siddhesh Salvi Arvindkumar Gupta

Technical Editor Cover Work


Danish Shaikh Arvindkumar Gupta

Copy Editor
Vibha Shukla
About the Author

Helder Vasconcelos is a Portuguese Software Engineer based on Dublin,


Ireland, with more than 10 years of experience designing and developing
real-time/multithreaded Java and C++ applications for the telecommunications
and aviation industries. Apart from his day-to-day job, he occupies his spare
time building native Android applications for Bearstouch Software and
other third-party companies.

He graduated with a degree in Electronic and Telecommunications Engineering


from the University of Aveiro in January 2006. During his career, he has worked
as a Software Engineer for companies such as PT Inovação (Portugal), Airtel ATN
(Dublin, Ireland) and Axway (Dublin, Ireland). You can find Hélder on LinkedIn
at (https://ie.linkedin.com/in/heldervasc/en) or on his website at
(http://hvasconcelos.github.io).

I would like to sincerely thanks all technical reviewers, but especially


Gavin. I really appreciate your invaluable feedback and commit that
shaped the quality of the book. A special thanks to my awesome wife
Tania for encourage me when the lack of motivation was killing my
productivity. It would not have been possible without your precious
support. Thanks also to my parents and family for their awesome
effort in my education. Additionally, I would like to thank my
friends, colleagues, clients, and teachers for helping me to shape and
improve my skills and perspectives during my career.
About the Reviewer

Gavin Matthews is a veteran software engineer specializing in enterprise scale


B2B, MFT and EFSS systems.
www.PacktPub.com

eBooks, discount offers, and more


Did you know that Packt offers eBook versions of every book published, with PDF
and ePub files available? You can upgrade to the eBook version at www.PacktPub.
com and as a print book customer, you are entitled to a discount on the eBook copy.
Get in touch with us at [email protected] for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign
up for a range of free newsletters and receive exclusive discounts and offers on Packt
books and eBooks.
TM

https://www2.packtpub.com/books/subscription/packtlib

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital
book library. Here, you can search, access, and read Packt's entire library of books.

Why subscribe?
• Fully searchable across every book published by Packt
• Copy and paste, print, and bookmark content
• On demand and accessible via a web browser
Table of Contents
Preface vii
Chapter 1: Asynchronous Programming in Android 1
Android software stack 2
Dalvik runtime 2
ART runtime 3
Memory sharing and Zygote 4
Android process model 5
Process ranks 5
Process sandboxing 6
Android thread model 6
The main thread 7
The Application Not Responding (ANR) dialog 9
Maintaining responsiveness 10
Concurrency in Android 12
Correctness issues in concurrent programs 14
Liveness issues in concurrent programs 16
Thread coordination 16
Concurrent package constructs 19
Executor framework 20
Android primary building blocks 21
Activity concurrent issues 21
Manipulating the user interface 23
Service concurrent issues 25
Started services issues 25
Bound services issues 26
Service in a separate process 27
Broadcast receiver concurrent issues 28
Android concurrency constructs 28
Summary 29
[i]
Table of Contents

Chapter 2: Performing Work with Looper, Handler,


and HandlerThread 31
Understanding Looper 32
Understanding Handler 34
Sending work to a Looper 37
Scheduling work with post 39
Using Handler to defer work 40
Leaking implicit references 41
Leaking explicit references 43
Updating the UI with Handler 45
Canceling a pending Runnable 46
Scheduling work with send 47
Cancelling pending messages 50
Composition versus inheritance 52
Multithreading with Handler and ThreadHandler 53
Looper message dispatching debugging 58
Sending messages versus posting runnables 59
Applications of Handler and HandlerThread 59
Summary 60
Chapter 3: Exploring the AsyncTask 61
Introducing AsyncTask 62
Declaring AsyncTask types 65
Executing AsyncTasks 67
Providing indeterministic progress feedback 69
Providing deterministic progress feedback 72
Canceling an AsyncTask 75
AsyncTask Execution State 78
Handling exceptions 79
Controlling the level of concurrency 81
Common AsyncTask issues 84
Fragmentation issues 84
Memory leaks 85
Activity lifecycle issues 85
Handling lifecycle issues with early cancellation 86
Handling lifecycle issues with retained headless fragments 87
Applications of AsyncTask 92
Summary 93
Chapter 4: Exploring the Loader 95
Introducing Loaders 96
Loader API 96
Loader 97

[ ii ]
Table of Contents

Loader Manager 98
LoaderManager.LoaderCallbacks 99
Loader lifecycle 100
Loading data with Loader 101
Building responsive apps with AsyncTaskLoader 107
Building responsive apps with CursorLoader 116
Combining Loaders 119
Applications of Loader 125
Summary 125
Chapter 5: Interacting with Services 127
Introducing Service 128
Started service 131
Building responsive apps with IntentService 136
Handling results 139
Posting results with PendingIntent 139
Posting results as system notifications 142
Applications of IntentService 143
HTTP uploads with IntentService 144
Reporting progress 146
Bound Service 149
Communicating with a Local Service 150
Broadcasting results with intents 158
Detecting unhandled broadcasts 160
Applications of Services 163
Summary 164
Chapter 6: Scheduling Work with AlarmManager 165
Introducing AlarmManager 166
Scheduling alarms with AlarmManager 167
Setting alarms in recent Android versions 169
Testing your alarms in Doze Mode 172
Setting a Window alarm 173
Debugging AlarmManager alarms 173
Canceling alarms 175
Scheduling repeating alarms 176
Scheduling an alarm clock 178
Handling alarms 179
Handling alarms with Activities 180
Handling alarms with BroadcastReceiver 181
Working with BroadcastReceiver 183
Asynchronous work with goAsync 186

[ iii ]
Table of Contents

Handling alarms with Services 187


Staying awake with WakeLocks 188
Resetting alarms after a system reboot 190
Applications of AlarmManager 192
Summary 192
Chapter 7: Exploring the JobScheduler API 195
Introduction to JobScheduler 196
Setting running criteria 197
Scheduling a job 200
Implementing the JobService 203
Listing pending jobs 208
Canceling a job 211
Scheduling a periodic job 211
Applications of the JobScheduler 212
Summary 213
Chapter 8: Interacting with the Network 215
Introducing Android HTTP clients 216
AndroidHttpClient 217
HttpURLConnection 218
Performing HTTP requests asynchronously 218
Retrieving a text response 225
Interacting with JSON web APIs 227
Converting Java objects to JSON 228
Interacting with XML web APIs 234
Converting Java objects to XML 235
Converting XML to Java objects 237
Customizing HTTP timeouts 241
Communicating securely over SSL sessions 243
Summary 251
Chapter 9: Asynchronous Work on the Native Layer 253
Introduction to JNI 254
Android NDK (Native Development Kit) 255
Calling C functions from Java code 256
Calling C++ functions from native code 260
Accessing Java objects from native code 262
Executing native background work on Java threads 265
Executing asynchronous work on a native thread 270
Attaching and detaching native threads from JVM 270
JNI references explained 276
Interacting with UI from native threads 277

[ iv ]
Table of Contents

Starting the native threads 279


Stopping the native threads 279
Handling Java exceptions in the native layer 280
Interacting with a Java monitor from native code 283
Wrapping native data objects 287
Summary 291
Chapter 10: Network Interactions with GCM 293
Introduction to GCM 294
Setting up and configuring GCM for your application 296
Registering the GCM Receiver 298
Setting up a registration service 298
InstanceID listener 300
Receiving downstream messages 302
Receiving messages from topic 306
Sending upstream messages 310
GcmListenerService delivery callbacks 314
Executing tasks with GCM Network Manager 315
Building a one shot task 316
Summary 320
Chapter 11: Exploring Bus-based Communications 321
Introduction to bus-based communication 322
EventBus library 323
Defining events 324
Submitting events 325
Registering sbscribers 326
Thread mode 327
Posting sticking events 334
Removing sticky events 338
Summary 339
Chapter 12: Asynchronous Programing with RxJava 341
Introduction to RxJava 342
Cold versus Hot Observable 344
RxJava setup 344
Creating Observables 344
Transforming Observables 347
Understanding Schedulers 349
Performing IO operations with Schedulers 351
Canceling subscriptions 354
Composing Observables 354
Monitoring the event stream 356

[v]
Table of Contents

Combining Observables 359


Observing UI Events with RxJava 362
Working with Subjects 366
Summary 369
Index 371

[ vi ]
Preface
Whether you are Android beginner developer or an Android seasoned programmer,
this book will explore how to achieve efficient and reliable multithreaded Android
applications.

We'll look at best asynchronous constructs and techniques, commonly used by


Android Developer community, to execute computation intensive or blocking tasks
off the main thread, keeping the UI responsive, telling the user how things are going,
making sure we finish what we started, using those powerful multicore processors,
and doing it all without wasting the battery.

By using the right asynchronous construct, much of the complexity is abstracted


from the developer, making the application source code more readable and
maintainable and less error prone.

Using step-by-step guidelines and code examples, you will learn how manage
interactions between several threads and avoid concurrency and synchronization
problems that might occur when two or more threads access a shared resource to
complete a background job, to update the UI or retrieve the latest application data.

At the end of this journey you will know how build well-behaved applications with
smooth, responsive user-interfaces that delight users with speedy results and data
that's always fresh.

What this book covers


Chapter 1, Asynchronous Programming in Android, gives an overview of the Android
process and thread model, and describes some of the challenges and benefits of
concurrency in general, before discussing issues specific to Android.

[ vii ]
Preface

Chapter 2, Performing Work with Looper, Handler and HandlerThread details the
fundamental and related topics of Handler, HandlerThread, and Looper, and
illustrates how they can be used to schedule tasks on the main thread, and to
coordinate and communicate work between cooperating background threads.

Chapter 3, Exploring the AsyncTask, covers the most common concurrent construct of
programming in Android. We learn how AsyncTask works, how to use it correctly,
and how to avoid the common pitfalls that catch out even experienced developers.

Chapter 4, Exploring the Loader, introduces the Loader framework and tackles the
important task of loading data asynchronously to keep the user interface responsive
and glitch free.

Chapter 5, Interacting with Services, we explored the very powerful Service Android
component, putting it to use to execute long-running background tasks with or
without a configurable level of concurrency. This component gives us the means to
perform background operations beyond the scope of a single Activity lifecycle and
to ensure that our work is completed even if the user leaves the application.

Chapter 6, Scheduling Work with AlarmManager, introduces to us a system API that


could be used to defer work or create periodic tasks. The scheduled task could wake
up the device to complete the work or alert users to new content.

Chapter 7, Exploring the JobScheduler API, covers a job scheduling system API
introduced with Android Lollipop that allows us to start background work
when a set of device conditions, such as energy or network, are fulfilled.

Chapter 8, Interacting with the Network, we cover in detail HttpUrlConnection


Android HTTP client. With the HttpUrlConnection HTTP client, we will create
an asynchronous toolkit that is able to fetch JSON documents, XML or text from a
remote server.

Chapter 9, Asynchronous Work on the Native layer, introduces the JNI interface, an
Java standard interface that will allow us to execute concurrent tasks on native
code (C/C++), interact with the Java code from the native layer or update the
UI from the native code.

Chapter 10, Network Interactions with GCM, we will learn how to use the Google GCM
to efficiently push and pull efficiently realtime messages from your server and how
to schedule work with Google Play Services framework.

Chapter 11, Exploring Bus-based Communications, we will introduce to the reader the
publish-subscribe messaging pattern and the Event Bus Library, a publish-subscribe
implementation that allow us to deliver asynchronous messages between Android
application components.

[ viii ]
Preface

Chapter 12, Asynchronous Programing with RxJava, we will introduce RxJava, a library
used to easily compose asynchronous and event-based tasks on Java by using
observable data streams.

What you need for this book


To follow along and experiment with the examples, you will need a development
computer with a Java 7 (or 8) SE Development Kit and the Android Software
Development Kit Version 9 or above (you will need at least Version 21 to try all of
the examples).

You will also need Android Studio IDE. The examples have been developed using
Google's new Android Studio IDE and use its integrated build system, Gradle.

While you can run the examples using the emulator provided by the Android SDK, it
is a poor substitute for the real thing. A physical Android device is a much faster and
more pleasurable way to develop and test Android applications!

Many of the examples will work on a device running any version of Android since
2.3, GingerBread. Some examples demonstrate newer APIs and as a result, require a
more recent Android version—up to Android 5, Lollipop.

Who this book is for


This book is for Android Developers who want to learn how to build multithreaded
and reliable Android applications using high level and advanced asynchronous
techniques and concepts.

They want to learn this technology because they want learn how to build efficient
applications that are able to interact orderly with internal/external services and
frameworks using Android standard constructs and APIs.

No prior knowledge of of concurrent and asynchronous programming is required.


This book is also targeted towards Java experts who are new to Android.

Conventions
In this book, you will find a number of text styles that distinguish between different
kinds of information. Here are some examples of these styles and an explanation of
their meaning.

[ ix ]
Preface

Code words in text, database table names, folder names, filenames, file extensions,
pathnames, dummy URLs, user input, and Twitter handles are shown as follows:
"We can include other contexts through the use of the include directive."

A block of code is set as follows:


[default]
exten => s,1,Dial(Zap/1|30)
exten => s,2,Voicemail(u100)
exten => s,102,Voicemail(b100)
exten => i,1,Voicemail(s0)

When we wish to draw your attention to a particular part of a code block, the
relevant lines or items are set in bold:
[default]
exten => s,1,Dial(Zap/1|30)
exten => s,2,Voicemail(u100)
exten => s,102,Voicemail(b100)
exten => i,1,Voicemail(s0)

Any command-line input or output is written as follows:


# cp /usr/src/asterisk-addons/configs/cdr_mysql.conf.sample
/etc/asterisk/cdr_mysql.conf

New terms and important words are shown in bold. Words that you see on the
screen, for example, in menus or dialog boxes, appear in the text like this: "Clicking
the Next button moves you to the next screen."

Warnings or important notes appear in a box like this.

Tips and tricks appear like this.

Reader feedback
Feedback from our readers is always welcome. Let us know what you think about
this book—what you liked or disliked. Reader feedback is important for us as it helps
us develop titles that you will really get the most out of.

[x]
Preface

To send us general feedback, simply e-mail [email protected], and mention


the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing
or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support
Now that you are the proud owner of a Packt book, we have a number of things to
help you to get the most from your purchase.

Downloading the example code


You can download the example code files for this book from your account at
http://www.packtpub.com. If you purchased this book elsewhere, you can visit
http://www.packtpub.com/support and register to have the files e-mailed directly
to you.

You can download the code files by following these steps:

1. Log in or register to our website using your e-mail address and password.
2. Hover the mouse pointer on the SUPPORT tab at the top.
3. Click on Code Downloads & Errata.
4. Enter the name of the book in the Search box.
5. Select the book for which you're looking to download the code files.
6. Choose from the drop-down menu where you purchased this book from.
7. Click on Code Download.

You can also download the code files by clicking on the Code Files button on the
book's webpage at the Packt Publishing website. This page can be accessed by
entering the book's name in the Search box. Please note that you need to be logged in
to your Packt account.

Once the file is downloaded, please make sure that you unzip or extract the folder
using the latest version of:

• WinRAR / 7-Zip for Windows


• Zipeg / iZip / UnRarX for Mac
• 7-Zip / PeaZip for Linux

[ xi ]
Preface

The code bundle for the book is also hosted on GitHub at https://github.com/
PacktPublishing/Asynchronous-Android-Programming. We also have other code
bundles from our rich catalog of books and videos available at https://github.
com/PacktPublishing/. Check them out!

Errata
Although we have taken every care to ensure the accuracy of our content, mistakes
do happen. If you find a mistake in one of our books—maybe a mistake in the text or
the code—we would be grateful if you could report this to us. By doing so, you can
save other readers from frustration and help us improve subsequent versions of this
book. If you find any errata, please report them by visiting http://www.packtpub.
com/submit-errata, selecting your book, clicking on the Errata Submission Form
link, and entering the details of your errata. Once your errata are verified, your
submission will be accepted and the errata will be uploaded to our website or added
to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/


content/support and enter the name of the book in the search field. The required
information will appear under the Errata section.

Piracy
Piracy of copyrighted material on the Internet is an ongoing problem across all
media. At Packt, we take the protection of our copyright and licenses very seriously.
If you come across any illegal copies of our works in any form on the Internet, please
provide us with the location address or website name immediately so that we can
pursue a remedy.

Please contact us at [email protected] with a link to the suspected


pirated material.

We appreciate your help in protecting our authors and our ability to bring you
valuable content.

Questions
If you have a problem with any aspect of this book, you can contact us at
[email protected], and we will do our best to address the problem.

[ xii ]
Asynchronous Programming
in Android
Asynchronous programming has become an important topic of discussion in the past
few years, especially when using the concurrent processing capabilities available on
the most recent mobile hardware.

In recent years, the number of independent processing units (cores) available on


the CPU have increased, so to benefit from this new processing power, a new
programming model called asynchronous programming has appeared to orchestrate
the work between the several independent hardware-processing units available on
the device. Asynchronous programming comes to the rescue to solve the problems
that could arise from this new processing paradigm.

Android applications, since they mostly run on devices with multiple units of
processing, should take advantage of asynchronous programming to scale and
improve the application performance when blocking operations, and when
CPU-intensive tasks are required.

Android is an open source operating system (OS) based on Linux kernel that was
devised in 2003 by Andy Rubin, Nick Sears, Chris White, and Rick Miner, and then
acquired by Google in July, 2005.

The Android OS, actually maintained by Google and the Open Handset Alliance,
was created to provide an open mobile-device platform for devices with limited
resources of computation, memory, and energy.

The platform has been incorporating advanced mobile devices standards, such as
NFC and Bluetooth LE, and its scope has grown from a pure smartphone platform to
a broader software platform for smart watches, TVs, tablets, and consoles.

[1]
Discovering Diverse Content Through
Random Scribd Documents
Aveling's town, King, 59.

Ballads, Lyrical, by Wordsworth, 125.


Barf, 169.
Bassenthwaite, 97, 102, 105, 107, 169.
Beltane fire, 147.
Birthright, The Christian, 162.
Black Hill, 197.
Blencathra, 113, 165, 192, 212, 214, 215.
Boon Beck, 30.
Bootle, 172.
Borderside, 131, 132, 140, 143, 144.
Borrodale, 52, 180, 183, 197, 213, 214.
Borrow Bridge, 143.
Bowness Church, 138.
Brandelhow, 197, 208, 210, 214,
215, 216.
Brankers, 49.
Brigham-cum-Mosser-cum-Lorton, 173.
Brougham Castle, Feast of, by
Wordsworth, 191.
Broughton-in-Furness, 220.
Browne, William George, 98.
Browning, Robert, note, 5.
Brownrigg of Brownrigg, 202.
Brundholme, 157.
Butcher lad's reminiscences of
Wordsworth, 8.
Burns, 141.
C

Caermote, 104, 106.


Calling, The Gentleman's, 162.
Carlisle, City arms of, 96.
Carlyle, 96, 141, 164.
Carnigill, 143.
Cartmell Fell, 121, 125, 147.
Castle Hill, 213, 214.
Castrigg Fell, 191.
Cat Bels, 212, 215.
Cat Ghyll, 181.
Causey Pike, 109.
Cavalier, Memoirs of a, 120.
Chartres Cathedral, 90.
Chestnut Hill, 110.
Christmas season in Grasmere, 71.
Clappersgate, 49.
"Clock, The Village," 30.
Cockermouth, 173, 218, 220, 221,
223, 224, 226.
Coleridge, Hartley, 12, 19, 23,
24, 25, 31, 36, 38, 43, 44, 50,
58, 138.
Colthouse, 141.
Coniston, 2; Fells, 125.
Contentment, The Art of, 162.
Cookson, Ann, 218.
Coronation peat-fires, 234.
Cornwall, 197.
Crackenthorpes, 218.
Cropper, James, of Ellergreen,
86.
Crosthwaite, 116, 131, 139, 147,
148, 233; valley, 110, 157;
school, 120; church, 197.
Crozier, John, 192, 196, 200, 202,
205.
Curling, 112.
Cuthbert, St., 112.

Dalesmen, Characteristics of, 3;


Truthfulness of, 5; Comeliness
of, 45; Mourning
etiquette of, 194; Love of
hunting of, 195.
Davy, Dr., 136, 141.
Day, A Winter, on Derwentwater, 207.
Day with Roman and Norse, 94.
Defoe, 120.
De Quincey, 76.
Derwent, 65, 103, 219, 222, 233.
Derwent Hill, 67.
Derwentwater, 97, 109, 181, 217.
Devon, 197.
Druid's Circle, 191, 199.
Dungeon Ghyll, 39.

Egremont, Lord of, 224.


Elizabeth, Spacious times of
Great, 155.
Elleray, 51.
Esk, 59.
Esthwaite Lake, 29.
Excursion, The, by Wordsworth,
127.
Exploits, Nelson's, 155.

Falcon Crag, 181, 182.


Fell Side, 147.
Fiddler's Farm, 17, 19.
Fire-worshippers, 147.
Fox, George, 172; his Journal,
166, 173.
Fox head, Price of, 193.
Foxhow, 17, 19.
Fox hunting, 193, 197.
Friar's Crag, 208.
Francis, St., 145, 216.
Frozen Fell, 152.

Gardener lad's reminiscences of


Wordsworth, 10.
Gaul, Amadis de, 120.
George the Waller, 17; his
wrestling match, 22.
Gimmer Crag, 102.
Glaramara, 109, 213, 228.
Glenderaterra, 157.
Goodwin, Harvey, Bishop of Carlisle, 88.
Gough, Benjamin, 121, 141.
Gough, Thomas, 145.
Gowder Crag, 178, 184.
Grasmere, 6, 35, 38, 70.
Grasmere actors, 70; stage
managers, 72.
Grasmere Common, 31, 32 f.
Grasmoor, 109, 169, 172, 178,
207.
Graves, Perceval, 141; quotations from, 140, 143.
Greenhead Ghyll, 30.
Greta, 157, 179, 228.
Grisedale, 28, 33, 109, 178, 207,
216; Pass, 31.
Guide to the Lakes, 20, 21.
Gulls, With the black-headed, 59.
Gummershow, 125.

Hawell, Joseph, a Skiddaw Shepherd, 150.


Hawkshead, 223.
Helvellyn, 109, 113, 134, 207.
Herdhouse, 172.
Heversham, 133; Grammar
School, 88.
High Crag, 140.
High Stile, 172.
Hindscarth, 109.
Hobcarton Crag, 169.
Hodge Hill, 147.
Honister, 213.
Hope Ghyll, 171.
Hounds, Training of, 197; Breed
of, 201.
Hunt, Master of the, 191.
Hunting song, 199.
Hutchinson, Mary, 221.
I

Ireby, 99.
Irt, 59.

Keats, 187.
Kendal, 51, 53, 87, 118, 121,
122, 132; Grammar School,
88.
Ketel's Well, 183.
Kettle, Roman, 100.
Keswick, 52, 73, 100, 108, 112,
151, 156, 157, 166, 176, 183,
208; 224; Sea-gulls in, 64.
Kiln Hill, 201.
Kirkstone Pass, 119.
Krall of a Norse Chieftain, 99.

Lamb, Charles, 187.


Lamb, The Pet, 30.
Lancaster, James, 172.
Landnama, Bok of Iceland, 86.
Langdale, 52.
Latrigg, 100, 111, 112, 228.
Lewthwaite, Barbara, 29.
Lingholme, 209.
Lodore, 182 to 188, 213; after
storm, 176.
Lonscale, 150, 152, 156, 164,
232.
Lonsdale, Lord, 225.
Lorton, 166; Yew, 173.
Loughrigg, 22, 27, 49, 74.
Loweswater, 170.
Lythe, 137.
Lythe Marsh, 145.

Macaulay, Zachary, 86.


Man, The whole duty of, 162.
Manchester, 123 to 131.
Mellbreak, 172.
Milton, 128, 141, 221.
Mite, 59.
Mona's Isle, 59.
Mons Angelorum, 215.
Mons Beata, 212, 214.
Mons Blencathrae, 214.
Mons Borgadalis, 214.
Morecambe Bay, 119.
Muncaster Fell, 59, 60.

Nab Cottage, 23 f., 39.


Naddle, 208.
Need fire, 147.
Nether Stowey, 224.
Nicholson, Cornelius, 133.
Nimrod, A North-Country, 189.

Orthwaite, 97.

Page-boy's reminiscences of
Wordsworth, 44.
Patterdale, 167.
Patrick, James, of Kendal, 122.
Paris Exhibition, 90.
Pearson, Mrs., 118.
Pearson, William, of Borderside,
116; his admiration for
Wordsworth, 125; his
character, 128; letter to
Wordsworth, 136; his tour on the
Continent, 138 f.
Peat-fuel, 234.
Peel's horn, 101; his Norse
ancestor, 107.
Peel, John, 196, 201.
Pelter Bridge, 41.
Penistone, 219.
Penrith, 52, 218, 220, 221, 223.
Play, At the Grasmere, 69;
analysis of, 74 f.
Poems, by W. Wordsworth, 125.
Poole, 224.
Portinscale, 197.
Prelude, The, by Wordsworth,
121, 122.
Protestant Alliance, 136.

Rake, 97.
Ravenglass, 60, 68, 183; sand-dunes, 59.
Red Pike, 172.
Redbank, 27, 35, 48.
Reed's English Literature, 141.
Richardson, John, 200.
Robinson, 216.
Robinson Crusoe, 120.
Roman Camp, 105.
Roncesvalles, 120.
Rossetti, Christina, 92.
Ruskin, 2, 211.
Rydal chimneys, 19 f., 31.
Rydal Falls, 46.
Rydal Valley, 17.

Saddleback, 152.
St. John-in-the Vale, 200, 208.
Scafell, 102, 109, 228.
Scott, Sir Walter, 2, 141.
Sea-gulls, 60 f.
Seascale, 63.
Sedbergh Grammar School, 88.
Shakespeare, 85, 128, 141, 221.
Sheep, Skiddaw, 231.
Shepherd's Crag, 178.
Shepherd's Cross, 232.
Shepherd Lord, Song of the, by
Wordsworth, 191.
Shoulthwaite, 193.
Silence, Mountain, 227.
Skiddaw, 94, 96, 98, 100, 101,
109, 113, 157, 168, 178, 188,
194, 227.
Smith, Thomas, 127, 134.
Solway, 101.
Somersby Wold, 1.
Southey, 50, 94, 107, 181; letter
to his brother, 187.
Spedding, James, 96.
Spenser, 221.
Squirrels, 210.
Stanley, A Shepherd's likeness
to Dean, 151.
Stockdale, 151.
Stott of Oldham, 61.
Strathclyde, 112.
Styhead Pass, 183, 197.
Superstitions of Westmoreland,
146.
Swallows, 229.
Swan, Inn, 36, 39.

Tarn-foot, 48.
Tebay, 143.
Tennyson, 96, 227.
Tewfit tarn, 208.
Theatre, Grasmere, 73.
Threlkeld, 190, 192, 203, 204.
Tilberthwaite's Yew-tree, 167.
Titmice, 213.
Tongue Ghyll beck, 31.
Town End, 20, 37.

Uldale, 99, 151, 152.


Ulf, the Norseman, 101.
Underbarrow, 120.

Viking chieftain's burial ground,


111.
Victoria Bay, 216.

Walla Crag, 188, 216.


Walla Lake, 215.
Walla Wood, 212.
Walls Castle, 60.
Walton, Isaac, 120.
Wanthwaite Crags, 201.
Wars, Wellington's, 155.
Watendlath, 179.
Waterton, 141.
Watson, James, of Kendal,
123.
Westmoreland, 16, 27, 69 f., 87,
93, 116, 146, 197.
Whinfell Hall, 171.
Whinlatter Pass, 113, 172.
Whitbeck, 232.
White Moss Tarn, 27.
White of Selborne, 141.
Whiteside, 172.
Wilson, of Elleray, Professor,
50 f.
Windermere, 119.
Winster, 121, 127, 145; Vale,
118, 119, 122; River, quotation
from Pearson, 130.
Wordsworth, Dora, 58, 131.
Wordsworth, Dorothy, 7, 14, 35,
49, 58, 134, 136, 223.
Wordsworth, John, 218 f.
Wordsworth, Rev. John, 12.
Wordsworth, Mrs., 10, 23, 25,
34, 41, 44, 46, 49, 51.
Wordsworth, William, Reminiscences
of peasantry about,
1 ff.
Wordsworth, William, junior,
37.
Wylie Ghyll, 152, 156.
Wythburn, 195.
Wythop, 102, 113, 169.

Y
Yews, The, 118, 122, 124, 131,
132.
Yew-tree, A famous, 166.
Yorkshire, 129.
*** END OF THE PROJECT GUTENBERG EBOOK LAKE
COUNTRY SKETCHES ***

Updated editions will replace the previous one—the old editions will
be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright in
these works, so the Foundation (and you!) can copy and distribute it
in the United States without permission and without paying copyright
royalties. Special rules, set forth in the General Terms of Use part of
this license, apply to copying and distributing Project Gutenberg™
electronic works to protect the PROJECT GUTENBERG™ concept
and trademark. Project Gutenberg is a registered trademark, and
may not be used if you charge for an eBook, except by following the
terms of the trademark license, including paying royalties for use of
the Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is very
easy. You may use this eBook for nearly any purpose such as
creation of derivative works, reports, performances and research.
Project Gutenberg eBooks may be modified and printed and given
away—you may do practically ANYTHING in the United States with
eBooks not protected by U.S. copyright law. Redistribution is subject
to the trademark license, especially commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the free


distribution of electronic works, by using or distributing this work (or
any other work associated in any way with the phrase “Project
Gutenberg”), you agree to comply with all the terms of the Full
Project Gutenberg™ License available with this file or online at
www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand, agree
to and accept all the terms of this license and intellectual property
(trademark/copyright) agreement. If you do not agree to abide by all
the terms of this agreement, you must cease using and return or
destroy all copies of Project Gutenberg™ electronic works in your
possession. If you paid a fee for obtaining a copy of or access to a
Project Gutenberg™ electronic work and you do not agree to be
bound by the terms of this agreement, you may obtain a refund from
the person or entity to whom you paid the fee as set forth in
paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only be


used on or associated in any way with an electronic work by people
who agree to be bound by the terms of this agreement. There are a
few things that you can do with most Project Gutenberg™ electronic
works even without complying with the full terms of this agreement.
See paragraph 1.C below. There are a lot of things you can do with
Project Gutenberg™ electronic works if you follow the terms of this
agreement and help preserve free future access to Project
Gutenberg™ electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright law in
the United States and you are located in the United States, we do
not claim a right to prevent you from copying, distributing,
performing, displaying or creating derivative works based on the
work as long as all references to Project Gutenberg are removed. Of
course, we hope that you will support the Project Gutenberg™
mission of promoting free access to electronic works by freely
sharing Project Gutenberg™ works in compliance with the terms of
this agreement for keeping the Project Gutenberg™ name
associated with the work. You can easily comply with the terms of
this agreement by keeping this work in the same format with its
attached full Project Gutenberg™ License when you share it without
charge with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the terms
of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.

1.E. Unless you have removed all references to Project Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project Gutenberg™
work (any work on which the phrase “Project Gutenberg” appears, or
with which the phrase “Project Gutenberg” is associated) is
accessed, displayed, performed, viewed, copied or distributed:
This eBook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this eBook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is derived


from texts not protected by U.S. copyright law (does not contain a
notice indicating that it is posted with permission of the copyright
holder), the work can be copied and distributed to anyone in the
United States without paying any fees or charges. If you are
redistributing or providing access to a work with the phrase “Project
Gutenberg” associated with or appearing on the work, you must
comply either with the requirements of paragraphs 1.E.1 through
1.E.7 or obtain permission for the use of the work and the Project
Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is posted


with the permission of the copyright holder, your use and distribution
must comply with both paragraphs 1.E.1 through 1.E.7 and any
additional terms imposed by the copyright holder. Additional terms
will be linked to the Project Gutenberg™ License for all works posted
with the permission of the copyright holder found at the beginning of
this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files containing a
part of this work or any other work associated with Project
Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute this


electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1 with
active links or immediate access to the full terms of the Project
Gutenberg™ License.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or expense
to the user, provide a copy, a means of exporting a copy, or a means
of obtaining a copy upon request, of the work in its original “Plain
Vanilla ASCII” or other form. Any alternate format must include the
full Project Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™ works
unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or providing


access to or distributing Project Gutenberg™ electronic works
provided that:

• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt that
s/he does not agree to the terms of the full Project Gutenberg™
License. You must require such a user to return or destroy all
copies of the works possessed in a physical medium and
discontinue all use of and all access to other copies of Project
Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project Gutenberg™


electronic work or group of works on different terms than are set
forth in this agreement, you must obtain permission in writing from
the Project Gutenberg Literary Archive Foundation, the manager of
the Project Gutenberg™ trademark. Contact the Foundation as set
forth in Section 3 below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on, transcribe
and proofread works not protected by U.S. copyright law in creating
the Project Gutenberg™ collection. Despite these efforts, Project
Gutenberg™ electronic works, and the medium on which they may
be stored, may contain “Defects,” such as, but not limited to,
incomplete, inaccurate or corrupt data, transcription errors, a
copyright or other intellectual property infringement, a defective or
damaged disk or other medium, a computer virus, or computer
codes that damage or cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in paragraph
1.F.3, the Project Gutenberg Literary Archive Foundation, the owner
of the Project Gutenberg™ trademark, and any other party
distributing a Project Gutenberg™ electronic work under this
agreement, disclaim all liability to you for damages, costs and
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookfinal.com

You might also like