Instant download Real World Android by Tutorials Second Edition Professional App Development With Kotlin Raywenderlich Tutorial Team pdf all chapter
Instant download Real World Android by Tutorials Second Edition Professional App Development With Kotlin Raywenderlich Tutorial Team pdf all chapter
com
https://ebookmeta.com/product/real-world-android-by-
tutorials-second-edition-professional-app-development-with-
kotlin-raywenderlich-tutorial-team/
OR CLICK HERE
DOWLOAD NOW
https://ebookmeta.com/product/ios-animations-by-tutorials-seventh-
edition-setting-swift-in-motion-raywenderlich-tutorial-team/
ebookmeta.com
https://ebookmeta.com/product/advanced-ios-app-architecture-fourth-
edition-raywenderlich-tutorial-team/
ebookmeta.com
https://ebookmeta.com/product/bulldog-mike-faricy/
ebookmeta.com
https://ebookmeta.com/product/link-keepers-of-the-lake-5-1st-edition-
emilia-hartley/
ebookmeta.com
https://ebookmeta.com/product/transforming-airlines-a-flight-plan-for-
navigating-structural-changes-1st-edition-nawal-k-taneja/
ebookmeta.com
Design of Innovation Processes Flow From Idea to Market
Launch With Higher Speed and Value Time After Time 1st
Edition Darrell Velegol
https://ebookmeta.com/product/design-of-innovation-processes-flow-
from-idea-to-market-launch-with-higher-speed-and-value-time-after-
time-1st-edition-darrell-velegol/
ebookmeta.com
Real-World Android by Tutorials Real-World Android by Tutorials
Notice of Rights
All rights reserved. No part of this book or corresponding materials (such as text,
images, or source code) may be reproduced or distributed by any means without
prior written permission of the copyright owner.
Notice of Liability
This book and all corresponding materials (such as source code) are provided on an
“as is” basis, without warranty of any kind, express of implied, including but not
limited to the warranties of merchantability, fitness for a particular purpose, and
noninfringement. In no event shall the authors or copyright holders be liable for any
claim, damages or other liability, whether in action of contract, tort or otherwise,
arising from, out of or in connection with the software or the use of other dealing in
the software.
Trademarks
All trademarks and registered trademarks appearing in this book are the property of
their own respective owners.
raywenderlich.com 2
Real-World Android by Tutorials
raywenderlich.com 3
Real-World Android by Tutorials
raywenderlich.com 4
Real-World Android by Tutorials
raywenderlich.com 5
Real-World Android by Tutorials
Key Points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Chapter 4: Data Layer — Network . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
What Is a Data Layer? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Network Data Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Connecting to the API With Retrofit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Interceptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Testing the Network Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Key Points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Chapter 5: Data Layer — Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Cache Data Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Caching Data With Room . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Managing Cache Dependencies With Hilt . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Putting It All Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Testing Your Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Key Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Chapter 6: Building Features — Animals Near You . . . . . . . . . 121
What Is a Presentation Layer?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Making Your Life Easier With Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 123
Building Animals Near You . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Creating the UI Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Creating the View State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Creating the Data Flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Your First Use Case. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Connecting the Layers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Hilt on Android Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Displaying Cute Animals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Allowing an Infinite Scroll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Key Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Chapter 7: Building Features — Search. . . . . . . . . . . . . . . . . . . . . 155
Building a Search Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
raywenderlich.com 6
Real-World Android by Tutorials
raywenderlich.com 7
Real-World Android by Tutorials
raywenderlich.com 8
Real-World Android by Tutorials
raywenderlich.com 9
Real-World Android by Tutorials
raywenderlich.com 10
Real-World Android by Tutorials
raywenderlich.com 11
L Book License
• You are allowed to use and/or modify the source code in Real-World Android by
Tutorials in as many apps as you want, with no attribution required.
• You are allowed to use and/or modify all art, images and designs that are included
in Real-World Android by Tutorials in as many apps as you want, but must include
this attribution line somewhere inside your app: “Artwork/images/designs: from
Real-World Android by Tutorials, available at www.raywenderlich.com”.
• The source code included in Real-World Android by Tutorials is for your personal
use only. You are NOT allowed to distribute or sell the source code in Real-World
Android by Tutorials without prior authorization.
• This book is for your personal use only. You are NOT allowed to reproduce or
transmit any part of this book by any means, electronic or mechanical, including
photocopying, recording, etc. without previous authorization. You may not sell
digital versions of this book or distribute them to friends, coworkers or students
without prior authorization. They need to purchase their own copies.
All materials provided with this book are provided on an “as is” basis, without
warranty of any kind, express or implied, including but not limited to the warranties
of merchantability, fitness for a particular purpose and noninfringement. In no event
shall the authors or copyright holders be liable for any claim, damages or other
liability, whether in an action of contract, tort or otherwise, arising from, out of or in
connection with the software or the use or other dealings in the software.
All trademarks and registered trademarks appearing in this guide are the properties
of their respective owners.
raywenderlich.com 12
Before You Begin
This section tells you a few things you need to know before you get started, such as
what hardware and software you’ll need, where to find the project files for this book
and more.
raywenderlich.com 13
i What You Need
raywenderlich.com 14
ii Book Source Code &
Forums
• https://github.com/raywenderlich/adva-materials/tree/editions/2.0
Forums
We’ve also set up an official forum for the book at https://
forums.raywenderlich.com/c/books/real-world-android-by-tutorials. This is a great
place to ask questions about the book or to submit any errors you may find.
raywenderlich.com 15
Dedications
To my parents, Céu and Manuel, and sister, Joana, who always
gave everything they could and more to ensure my education,
happiness and well-being. To my partner, Joana, for all the
love, support and unbelievable patience while I was writing
the book. To my friend, Carlos, for all the support and
understanding every time I told him I didn’t have the time to
help him with GDG and Kotlin Knights events. And finally, to
the amazing Android devs from my team at Mindera - Maja,
Rita, Garcês, Belchi and Gui - for all the incredible discussions,
for teaching me so much and for making me love what I do
even more.
— Ricardo Costeira
— Kolin Stürt
— Subhrajyoti Sen
—Antonio Roa-Valverde
raywenderlich.com 16
Real-World Android by Tutorials About the Team
raywenderlich.com 17
Real-World Android by Tutorials About the Team
Massimo Carli is the final pass editor of this book. Massimo has
been working with Java since 1995, when he co-founded the first
Italian magazine about this technology http://www.mokabyte.it.
After many years creating Java desktop and enterprise
applications, Massimo started to work in the mobile world. In 2001,
he wrote his first book about J2ME. After many J2ME and
Blackberry apps, he then started to work with Android in 2008. The
same year, Massimo wrote the first Italian book about Android, and
it became a best seller on Amazon.it; that was the first of a series
of 12 books. Massimo is a musical theater lover and a supporter of
the soccer team, S.P.A.L.
raywenderlich.com 18
v Acknowledgments
Content Development
We would like to thank Kolin Stürt for his work as an author on the previous edition
of this book.
raywenderlich.com 19
Section I: Developing Real
World Apps
In this section, you’ll learn how to design and implement PetSave as an example of a
professional, real world app. You’ll learn how to choose the right architectural
pattern and how to structure the code to make the app testable and maintainable.
To make your app easier to change, it’s a good practice to define different layers with
specific responsibilities. In particular, you’ll learn how to design and implement the
domain layer for the PerSave app. You’ll also see how to access the network
efficiently, by implementing the repository pattern in the data layer.
At the end of this section, you’ll have a clear idea about how to structure the code of
your app.
raywenderlich.com 20
1 Chapter 1: Introduction
By Ricardo Costeira
Ever since its inception, Android development has been known for being as
frustrating as it is fun. Ironically, both the frustration and the fun come from the
same place. Developing an Android app involves not only juggling an ever-changing
framework, but also handling interesting and challenging design decisions.
The Android framework keeps growing, and it’s not likely to stop anytime soon.
Think of the sheer amount of documentation online at the Android Developers site,
or even on Kotlin’s own documentation pages. On top of this, time and experience
have taught us that new architectures and best practices will keep appearing, giving
us new and better ways to do the same things.
This isn’t necessarily bad, though. Android developers have come a long way since
the times when having a god Activity was the standard. Over the years, through the
effort of an amazing and supporting community, multiple architectures and
techniques have surfaced, aiming to improve both app stability and developer
quality of life. Even Google has pitched in on this project with their own
recommended app architecture.
With such a large, continuously mutating ecosystem, developing even the simplest
of features can feel overwhelming for beginners — and, sometimes, even for
advanced developers.
raywenderlich.com 21
Real-World Android by Tutorials Chapter 1: Introduction
For instance, say that you want to get data from a data source and display it. Even if
you’ve implemented this in the past, you know Android. Can you be 100% sure that
the way you did it back then is still the best way to do it now?
You can’t. And that’s OK! With an ecosystem that changes so frequently, it’s
impossible for even the most experienced engineer to be aware of all its quirks and
nuances.
Android developers need to know about a wide array of subjects to build apps
effectively. That’s where this book comes in.
• Modularize your app, if you ever need to, while touching on dynamic features.
It does all of this by showing you practical solutions that lead to the desired results.
Yet, the idea here is much more than that. Of course, you can study the
implementation details if you want, but that’s not the main point. Instead of
reasoning about how to write code, you should instead focus on why you write it that
way.
The goal is for you to go beyond the code and understand why you’re writing it in
the first place. This book doesn’t simply cover the basics at the problem’s surface or
give high-level descriptions of the simplest use cases. Rather, it aims to share with
you some of the knowledge that developers acquire over time, while developing real-
world apps.
You’ll see how to solve real-world problems following real-world best practices and
techniques. Sometimes, these best practices and techniques are general rules of
thumb regarding software development and design principles. In other cases, they’re
tightly coupled to the tools used to fix the problem. You can only acquire them by
either getting your hands dirty with those tools or by having someone point them
out for you.
raywenderlich.com 22
Real-World Android by Tutorials Chapter 1: Introduction
The book focuses not only on why should you do things a specific way, but also on
the corresponding advantages, trade-offs and drawbacks of that solution. It makes it
clear when a certain decision is not ideal, explaining the reasoning behind discarding
a choice or going through with it anyway.
As you go through the content, you might notice that some of it is opinionated; you
might even disagree with some of the statements. That’s good! As a developer, it’s
only natural for you to question other developers’ decisions. You might even see
some problems that others completely missed.
On the other hand, if you agree with everything and don’t see any problems, that’s
fine too! What’s important here is for you to go through the roller coaster ride that is
Android, with all its ups and downs, just like developers do in the real world.
raywenderlich.com 23
Real-World Android by Tutorials Chapter 1: Introduction
As mentioned already, a large part of the book’s focus is around the reasons why
developers prefer specific solutions. This usually boils down to software design
principles, architectural considerations or tidbits of wisdom acquired through
experience. In these cases, everyone can benefit from sharing information.
The app connects to an external service, which it uses to fetch the animals. This
service, Petfinder, is an online, searchable database of animals who need homes.
They also have information on shelters and adoption organizations across the United
States. Check out their site at https://www.petfinder.com/. Who knows, you might
find your new pet. :]
raywenderlich.com 24
Real-World Android by Tutorials Chapter 1: Introduction
After acquiring an API key and its corresponding secret, you’ll need to set them for
each chapter’s starter project. You’ll set them in ApiConstants.kt, which is in the
common.data.api package.
Figure 1.2 — Replace Those Two Strings With Your API Key and Secret
If you’re curious about Petfinder’s API, check out its documentation at https://
www.petfinder.com/developers/v2/docs/.
Thinking about a problem, getting familiar with it and planning ahead just enough
that you have a solid starting point is always a better option than starting to write
code right away and hoping for the best. So in the next chapter, you’ll lay the
groundwork to develop a robust and scalable app.
raywenderlich.com 25
2 Chapter 2: Starting From
the Beginning
By Ricardo Costeira
Android development can be both straightforward and extremely complex. Not only
does the framework keep growing at a ridiculously fast pace, but it also repeatedly
reinvents itself — think asynchronous programming, lifecycle and state management
and even animations. It’s common to feel overwhelmed by or even lost amidst all the
continuous library releases, shiny new features and multiple ways of achieving the
same goals.
One section of this book (or, truth be told, the whole book!) wouldn’t be enough to
cover everything the Android framework has to offer. However, as you develop real-
world apps, you start to notice that apps gravitate around a few common ways to use
the framework. Additionally, many design decisions and best practices can be
universally applied to produce better software.
In this chapter, you’ll read about some of these design decisions and practices that
you can follow in the early development stages. They’ll allow you to build a solid
foundation for your app while avoiding over-engineering.
• How to structure and organize your app so you can tell what it does just by looking
at the package names.
Buckle up!
raywenderlich.com 26
Real-World Android by Tutorials Chapter 2: Starting From the Beginning
1. Just by looking at the package structure, you easily get a feeling for what the app
does. Some people also like to call this a screaming architecture — hence the
awful “screaming” joke attempt earlier.
2. You end up with packages that not only have high cohesion, they’re also either
loosely coupled or completely decoupled from one another. Cohesion and
coupling are two very important metrics in software development that you
should always consider.
raywenderlich.com 27
Real-World Android by Tutorials Chapter 2: Starting From the Beginning
High Cohesion
Cohesion refers to the relationship between different programming elements. The
stronger the connection between code inside a component, the more cohesive that
component is.
For instance, imagine you have a class that’s responsible for applying a cute filter to
a cat’s picture, called CatFilter.
// Other methods.
}
The methods and properties of this class are all closely related to each other, which
means that the class is highly cohesive.
Now, imagine the case where you start adding more responsibilities to the class. Not
only does CatFilter apply a filter, but now it also saves and loads the result with
the help of the file system. You’ll start having elements in the class that have
nothing to do with each other — parsePixels() and save(picture: Picture)
have completely different purposes.
In other words, your class will now have a lower degree of cohesion.
raywenderlich.com 28
Real-World Android by Tutorials Chapter 2: Starting From the Beginning
Low Coupling
Coupling has to do with dependencies between programming elements. Continuing
from the previous example, say you move the I/O logic to another class called
CatPictureFileSaver.
class CatPictureFileSaver {
// Other methods.
}
This new class also has methods to compress/decompress and encode/decode the
image, which are strongly related to its purpose. Nice, now CatFilter and
CatPictureFileSaver are two highly cohesive classes!
After some time, requirements change. You now have to cache the intermediate
results of the filtering. To implement this, you call the persistence methods of
CatPictureFileSaver directly in a few different places in CatFilter.
This may seem like the logical way to accomplish your goals but, by doing so, you’re
forcing CatFilter to be tightly coupled with CatPictureFileSaver. Consider a
scenario where a requirement change dictates that you drastically change or even
remove CatPictureFileSaver. Due to the coupled nature of the classes, you’d have
to make significant changes to CatFilter as well.
raywenderlich.com 29
Real-World Android by Tutorials Chapter 2: Starting From the Beginning
On the other hand, if you have something like a CatPictureSaver interface that
CatPictureFileSaver extends, and have CatFilter depend on it, then the classes
would be loosely coupled. Changes to CatPictureFileSaver that don’t affect this
interface would likely not affect CatFilter at all.
interface CatPictureSaver {
fun save(picture: Picture)
fun load(picturePath: String): Picture
}
class CatFilter(
private val picture: Picture,
private val pictureSaver: CatPictureSaver
) {
// Code...
// More code...
}
The interface would ideally use generic naming to keep your implementation options
open. For example, a CatPictureSaver interface with a method named
savePictureToFile() would be a bad choice. You’d have to change the method
name if you stop using the file system to save pictures!
raywenderlich.com 30
Another Random Document on
Scribd Without Any Related Topics
“I find that the odor from a good cigar is rather attractive. At any
rate, Joe has done so much for me that I can afford to give in to one
little vice of his. To think of the poor dear fellow hiding himself away
like that. It makes me almost cry to think how miserably cruel I
have been to him. But I mean to make it up to Joe in the future, Mr.
Darrell.”
Eric swallowed a lump that seemed to be sticking in his throat.
This, the woman whom he suspected of being false to her husband
—he did not know how it was, but whenever he came into her
presence he seemed to be in some way charmed.
She was a siren.
The same power, exercised by the nymphs of the sea in olden days,
causing the sailors to jump over to their death, is given to certain of
the gentler sex to-day.
Adam sunk all his manhood and forgot his duty to his Maker when
tempted by Eve, and from that day to this few men there are strong
enough to do the right when a beautiful woman smiles upon them
and teaches them the lesson of love.
It would be impossible to describe the influence Lillian had upon
nearly all who came in contact with her—her manner was soothing
and pleasant, so that general admiration followed her acquaintance.
Darrell was a man of strong purposes and he put down with a firm
hand any feeling that interfered with his stern sense of duty.
In a business way he was here to see whether Lillian was what she
appeared to be, or deceptive by nature.
Hence he was not to be charmed from his purpose in any way.
The human feeling of admiration must give way to the professional
energy.
“You spoke of several reasons for calling to see me, Mr. Darrell—will
you kindly state what the others are?” she asked.
“With pleasure, and I trust you will not feel offended, my dear Mrs.
Leslie. It is a custom on my part in a case like this, to take from the
party with whom I have been engaged, a little note, stating that
they have been well satisfied with my services. I hope you may not
think it out of the way and give me this.”
She appeared troubled.
“I do not know that I ought to—such an affair is essentially private.”
“I only desire the paper for my own satisfaction, and not to show.
You can merely state that you are entirely satisfied with the services
of Eric Darrell, and if you prefer, simply sign your initials.”
Crafty man—the initial was what he wanted above all else.
Her face brightened.
“I do not know that I would object to that, Mr. Darrell, since my
identity is concealed. Do you want it now?”
“If you please,” humbly, but secretly exulting over his success.
She went to the desk, opened it and sat down—after a minute’s
thought she wrote something upon a sheet of paper.
“Will that do, Mr. Darrell?” handing it to him.
He glanced at it and read:
“This is to certify that Mr. Eric Darrell has accomplished the work
for which I have employed him, in a thoroughly satisfactory
manner, and that I am well satisfied with his services.
L. L.
“New York, October 7, 188–”
Darrell smiled.
“A thousand thanks, madam.”
“It answers your purpose?” quietly.
“Yes, yes.”
Although he smiled Eric Darrell felt as though he could have wept
just then.
The one glance he had taken had revealed the fact that the capital L
made by Mrs. Leslie was very similar to the one which he had seen
signed to the note Paul Prescott had let fall.
It was a shock to the detective, even though he had in a measure
expected it.
That point gained he put the matter aside for the present and
continued to appear pleasant, though it was only with an effort he
could do so.
For a little he chatted with the lady, and endeavored to study her.
Darrell thought that if his suspicions were proven true, Lillian Leslie
must be the perfection of an actress—he had never seen two such
extremes meet in an individual—she was the incarnation of good
and evil.
“By the way, are you acquainted with a Mrs. Collingwood of your
street here?” he asked after a while, in a careless tone.
“Yes, I know her.”
She looked surprised, as though wondering where he could have
met her.
“Last night I made her acquaintance. She is accounted a rather
handsome woman, I believe.”
This was put out as a sort of feeler, for he had not even seen her
face.
Lillian answered in a manner that declared what little interest she
had in the lady:
“I believe so, but we were never friends, and I do not know much
about the lady.”
That ended it.
Darrell soon took his leave, having gained the point for which he had
come.
When he entered a car on the elevated road he found a corner to
himself, and then, unable to wait longer, proceeded to compare the
two notes.
Just as he thought, the writing was of the same order, and there was
much resemblance in the capital letters.
Still, Eric had seen enough to know that only an expert could decide
this question beyond all cavil.
Before now he had seen the chirography of two persons resemble
each other, and this was not to be accepted as conclusive evidence.
At the same time it was a point that would bear upon the final
result.
He kept it in mind.
Other threads must now be taken up in turn, until the main current
was reached which would sweep him on to the sea.
He put away the document just received from Mrs. Leslie.
While still looking at the other, some one sat down beside him.
Darrell’s thoughts were fixed upon the subject which occupied his
attention, and he did not even know there was some one in the next
seat until a hand clutched his arm.
“Where did you get that paper?” said a hoarse voice close by his ear.
Turning his head at this he was surprised to see Paul Prescott beside
him.
Fortune plays some queer tricks at times, and this was one of them.
What an odd chance that this man, of all in the great city, should sit
down in the same car, at the very moment Darrell had that fatal
paper in his hand.
The circumstances were indeed so singular that Eric could not but
start; but his excellent control over his nerves stood him in good
stead again.
He looked in the artist’s face—it was flushed and eager and angry—
evidently he had not missed the letter up to now.
“My dear sir, does it belong to you?” asked the detective, quietly.
“It does, sir.”
“Then take your property.”
“Very good, sir; but I have a right to ask, yes, demand of you, to
explain under what peculiar circumstances this document chanced to
come into your possession.”
“I do not question your right to ask that, and I shall readily tell
where and when I picked the letter up.”
So he gave the time and place to a dot, but did not say anything
about having seen it drop from the pocket of the owner. Prescott
remembered that this was when and where he had received the
message, and he had no doubt of the truth of the story.
At the same time he looked at the man by his side with a frown.
“You read this?” he asked.
“Naturally so—you could not blame me.”
“And had your curiosity aroused?”
“Well, yes, but that has nothing to do with it. Let us forget the
circumstance.”
“Willingly, since it concerns the private affairs of a very dear friend.”
No more was said.
Eric read his paper and the artist seemed occupied with his, but
every now and then he turned his eyes toward the detective as
though his curiosity was aroused.
When the artist arose at Fourteenth Street, to leave the car, Eric
handed him a card he had prepared for such occasions.
It gave his name and the address of his apartments—nothing more.
“If you should ever desire to see me, sir, you will find me there by
letter or person,” he said quietly.
At this Prescott smiled broadly.
“I hope you don’t think I dream of sending you a challenge for
finding my letter,” he said.
“Well, you looked as black as a thunder cloud, and I didn’t know but
what you might be meditating something of the sort.”
“It was rude in me to act that way, and I beg your pardon for it.”
Frankly said.
The detective liked him better for it, and there was something about
the other’s face quite attractive after all.
Somehow Eric did not seem to hate and despise him as he had done
before.
When the artist had gone he fell into a fit of musing again.
Various theories were built up, only to be discarded again as unequal
to the occasion.
He remembered that the letter had been given to Prescott by a
woman, who was evidently in the pay of the party signed L.
Whom could Lillian send?
He did not know the internal arrangements of the lovely little house
up town, and this was what was now on his mind.
The office of Joe Leslie was his destination, and he made his way
thither after leaving the elevated road.
Leslie was in John Street, and carried on a business in precious
stones, of which he was one of the best judges in the city.
He was a man of considerable wealth, but being of an
unostentatious nature he did not put on much style, preferring to
live quietly and well.
When Eric Darrell ascended the stairs of the large building in which
his friend had his offices, he was forcibly reminded of times gone by
when Joe was a bachelor, and the two had been warm friends,
passing through numerous scenes of pleasure in company.
CHAPTER XV
COMPARING NOTES