GithubHelp home page GithubHelp logo

isabella232 / cordova-plugin-chrome-apps-system-storage Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mobilechromeapps/cordova-plugin-chrome-apps-system-storage

0.0 0.0 0.0 196 KB

License: BSD 3-Clause "New" or "Revised" License

Java 53.07% JavaScript 27.05% Objective-C 19.88%

cordova-plugin-chrome-apps-system-storage's Introduction

chrome.system.storage Plugin

This plugin provides the ability to query storage device information and be notified when a removable storage device is attached and detached.

In general, storage on mobile devices is handled differently than on desktop. The plugin is designed to provide consistent behaviour with desktop usage, but there are notable differences.

A summary of the similarities and differences:

  • Each mobile device has built-in storage (on both Android and iOS). This is reported as storage unit, similar to the physical hard drive in a desktop

  • Neither Android nor iOS officially support external storage attached via cable, like USB devices for desktops. Instead, both platforms expect only special-purpose accessories to be attached by cable (see Android and iOS)

  • Many Android devices will support an SD card for external storage. As of Android 4.4, the SDK has also added support for multiple SD cards. If found, the plugin will report any SD card(s) as storage units, similar to USB storage devices on desktop

Status

The implementation of various functionality, across platforms, is summarized in the table below.

Method / Event Android iOS
getInfo Yes Yes1
ejectDevice Yes2 Yes
getAvailableCapacity Yes Yes
onAttached Yes3 No-op4
onDetached Yes3 No-op4
  1. As iOS does not support generic storages devices, nor SD cards, this method will only ever return a single storage unit (representing built-in storage).

  2. On Android, this method will always return "in use" for any removable storage - it is not currently supported to eject/unmount an SD card programmatically.

  3. On Android, these events will start the app, even if it is not already running.

  4. As above, no iOS devices support removable storage. Thus, these events are implemented as a no-op (listeners can be attached, but will never be fired).

Reference

The API reference is here.

Release Notes

1.2.2 (April 30, 2015)

  • Renamed plugin to pubilsh to NPM

1.2.1 (Mar 17, 2015)

  • Remove version constraint on backgroundapp dependency due to plugman bug CB-8696

1.2.0 (Mar 17, 2015)

  • Use org.chromium.backgroundapp to handle background events

1.1.2 (Nov 26, 2014)

  • Make Java 1.6 compatible

1.1.1 (November 17, 2014)

  • Add Android support for ejectDevice, getAvailableCapacity, onAttached/onDetached
  • Add iOS support for all methods/events

1.0.1 (October 21, 2014)

  • Documentation updates.

1.0.0

  • Initial release

cordova-plugin-chrome-apps-system-storage's People

Contributors

agrieve avatar beaufortfrancois avatar clelland avatar jpchase avatar kamrik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.