Skip to Content
Android 9 Development Cookbook - Third Edition
book

Android 9 Development Cookbook - Third Edition

by Rick Boyer
October 2018
Intermediate to advanced
464 pages
15h 17m
English
Packt Publishing
Content preview from Android 9 Development Cookbook - Third Edition

There's more...

You probably noticed the checkStoragePermission() function from step 5 wasn't mentioned. This is because permissions aren't specific to storage but are required for the app to access various device features. Unlike the previous recipe, which used local app storage, "external" storage is considered risky for the user. (It wouldn't be good if just any app could go through a user's private files.) For that reason, the app must make additional effort to check if it has the required permission to access storage. If it does not, the user will be prompted. Note that this additional dialog is coming from the OS, not the app itself.

When you first run the app, if you are prompted for permission but still get an error writing, exit ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Android Application Development Cookbook - Second Edition

Android Application Development Cookbook - Second Edition

Rick Boyer, Kyle Mew
Android High Performance Programming

Android High Performance Programming

Enrique López Mañas, Diego Grancini
Android Things Projects

Android Things Projects

Francesco Azzola

Publisher Resources

ISBN: 9781788991216Supplemental Content