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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.