O'Reilly logo

PhoneGap 4 Mobile Application Development Cookbook by Zainul Setyo Pamungkas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Filesystems, Storage, and Local Databases

In this chapter, we will cover these recipes:

  • Saving a file in the device storage
  • Opening a local file from the device storage
  • Displaying the contents of a directory
  • Creating a local SQLite database
  • Uploading a file on a remote server via a POST request
  • Caching content using the local storage API

Introduction

With the ever-increasing storage capacities on offer with each mobile device, whether the storage is built-in or available as an expansion through a card, developers have the ability to interact with and manipulate files stored on the device as well as utilize the API functionality to cache content.

This chapter will explore how we can save and open individual files on the device's local filesystem, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required