15. Accessing Files and Directories

Android applications can store raw files on a device by using a variety of methods. The Android SDK includes a number of helpful APIs for working with private application and cache files, as well as for accessing external files on removable storage such as SD cards. Developers who need to store information safely and persistently will find the available file management APIs familiar and easy to use. In this chapter, we show you how to use the Android file system to read, write, and delete application data.

Working with Application Data on a Device

As discussed in Chapter 14, “Using Android Preferences,” shared preferences provide a simple mechanism for storing simple application data persistently. However, ...

Get Introduction to Android™ Application Development: Android Essentials, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.