Elements of Android Q Version 0.5 (Mark L. Murphy [Murphy, Mark L.])(Z-Library)
java
No Description
183
Views
0
Downloads
0.00
Total Donations
AI Guide
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
AI guide
# Elements of Android Q — Reading Guide
## 【One-Line Pitch】
A practical field manual for Android developers navigating the disruptive changes introduced in Android Q (2019), with special focus on scoped storage, privacy restrictions, and UI modernization. Essential reading for anyone maintaining or building Android apps who wants to avoid breaking their apps when Q reaches users.
## 【Book Arc】
- **Opening (~0%–9%)**: Introduces the book's purpose, the Warescription model, licensing, and the author's approach to documenting Android Q's beta cycle. Sets expectations for a fast-moving, version-specific guide.
- **Early (~9%–25%)**: Explains the developer preview/beta history, how to set up the Q Beta SDK, Android Studio quirks (like the "missing symbols" problem), and where to get help. Establishes the practical setup needed before tackling Q's changes.
- **Early–Middle (~25%–38%)**: Dives into the book's centerpiece—scoped storage. Covers what changes for apps, users, and the filesystem, the legacy opt-out mechanism (`requestLegacyExternalStorage`), and speculation about Android R's stricter enforcement.
- **Middle (~38%–53%)**: Provides concrete adaptation strategies for scoped storage: using the Storage Access Framework (`ACTION_OPEN_DOCUMENT`), MediaStore, handling apps that insist on real file paths, and dealing with `file:` Uri compatibility issues.
- **Late (~53%–end)**: Covers remaining Q changes—location access restrictions, EXIF metadata redaction, share targets, dark mode, gesture navigation, and miscellaneous breaking changes. Wraps up with a checklist of things that might break or interest developers.
## 【Key Takeaways】
- **Scoped storage is the defining change of Android Q** (Early): Apps lose broad access to external storage, even with legacy permissions. The `Environment.getExternalStorageDirectory()` API becomes deprecated and effectively useless. Plan migration early.
- **You can opt out of scoped storage on Q—temporarily** (Early): Setting `android:requestLegacyExternalStorage="true"` in the manifest preserves old behavior, but only if your `targetSdkVersion` is below 29. This is a stopgap, not a solution.
- **The Storage Access Framework is your primary tool for reading/writing shared content** (Middle): `ACTION_OPEN_DOCUMENT` lets users pick content via a system dialog, returning a `Uri` you can use with `ContentResolver` streams. This replaces direct filesystem access for most use cases.
- **Some libraries and APIs simply cannot work with `Uri` values** (Middle): SQLite, NDK code, and random-access file libraries need real files. Workarounds include using `InputStream`/`FileDescriptor` where supported, asking users to place files in app-specific directories, or copying content to internal storage.
- **Copying content to local files has real costs** (Middle): It consumes time and storage, and modifications don't propagate back to the original content unless you explicitly copy data out again. Consider when and how to clean up copies.
- **`file:` Uri intents become unreliable under scoped storage** (Middle): Other apps may send you `file:` Uris you can't access. Consider using an `activity-alias` with version-dependent resources to disable such intent filters on Android Q+.
- **Location access and EXIF metadata face new restrictions** (Late): Background location access is more tightly controlled, and photo metadata like GPS coordinates may be redacted when sharing. Review your app's location and media handling flows.
- **Dark mode and gesture navigation require UI adaptation** (Late): Android Q introduces system-wide dark theme and gesture-based navigation. Apps need to handle configuration changes and test their layouts against the new navigation patterns.
## 【Reading Tips】
- **Skim the preface and licensing sections (~0%–9%)** unless you're a Warescription subscriber—the practical content starts with the beta setup guide.
- **Deep-read the scoped storage chapters (~25%–53%)**—this is the book's core value. Pay special attention to the "But I Need a File!!!" section, which addresses the hardest migration pain points.
- **Treat the Android R speculation as context, not gospel** (Early): The author explicitly admits he's "not a time traveler." Use the predictions to inform planning, but verify against current documentation.
- **Use the "Other Changes of Note" sections as a checklist** (Late): The "Stuff That Might Break You" and "Stuff That Might Interest You" lists are ideal for triaging which changes affect your specific app.
- **Keep the book open while testing on a Q Beta device**: Many sections reference specific beta versions (e.g., Beta 4/5 behavior), so verify against your actual SDK version.
## 【Coverage Limits】
This guide covers the book's major themes—scoped storage, privacy changes, and UI updates—but the excerpts do not cover the full details of share targets, dark mode implementation specifics, or gesture navigation APIs. For those, consult the corresponding chapters directly.
##
Passage locations
Excerpt 1
s in response to Android Q customer complaints… sorry!) And thanks for your interest in this book and CommonsWare’s overall line of Android books...
View in text
Excerpt 2
pre-release editions were “developer previews”. Android Q refers to them as “betas”, and so this book will use “beta” for...
View in text
Excerpt 3
xternal storage access or has “filtered” access. Opting Out… For Now To stick with legacy external storage, even on Android Q devices, add...
View in text
Excerpt 4
u control (e.g., on internal storage), then using that file. On the plus side, you control your copy of the content and can manipulate it however you wish. H...
View in text
Recommended for You
{{#thumbnailUrl}}
{{/thumbnailUrl}}
{{^thumbnailUrl}}
{{/thumbnailUrl}}
Loading recommended books...
Failed to load, please try again later
Tip the Site
Scan the WeChat Pay or Alipay code to tip. No login required.
WeChat Pay
Alipay