CommonsWare — the publisher of this book — has also published a series of open source libraries, collectively named the CommonsWare Android Components (CWAC). If you have read through the book, you will have seen many of these libraries.
This appendix lists all of the CWAC libraries. If the library is covered elsewhere in the book, the appendix links you to that coverage. Those that are not covered elsewhere will be described in this appendix, to accompany the online documentation found at the library’s GitHub repository.
The cwac-document repository
holds a fork of DocumentFile
that:
Uri
valuesUri
values on older devicescopyTo()
,
copyFrom()
, openInputStream()
, openOutputStream()
)The cwac-layouts repository contains a series of custom containers and related views.
The current contents of this library — AspectLockedFrameLayout
,
MirroringFrameLayout
, and kin — are covered in
the chapter on custom views.
The cwac-netsecurity repository contains a backport of Android 7.0’s network security configuration subsystem, to make it easier for you to work with SSL-enabled Web sites. This is covered in greater detail in the chapter on SSL.
The cwac-presentation repository
contains code in support of the Presentation
system, for sending
alternative content to an external display, independent of the device’s
primary screen.
All of the classes in this repository are covered in
the chapter on the Presentation
system.
The cwac-provider repository
contains StreamProvider
, a riff on Google’s FileProvider
, offering a
“canned” implementation of a ContentProvider
that can serve files from
a variety of sources, such as assets and raw resources from your project.
This is discussed briefly in
the chapter on ContentProvider
implementations.
The cwac-saferoom repository contains code that bridges the gap between SQLCipher for Android and the Room database layer from the Architecture Components. This library is covered in depth in “Android’s Architecture Components”.
The cwac-security repository
contains code to help app developers help their users defend against attacks.
At the moment, this contains the PermissionUtils
class, used to help determine
if a custom permission was defined by another app before yours was installed.
This is discussed in the chapter on advanced permission techniques.