Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device Storage, Catching Full Storage and Current Usage #68

Open
mykelaballe opened this issue Jan 18, 2017 · 1 comment
Open

Device Storage, Catching Full Storage and Current Usage #68

mykelaballe opened this issue Jan 18, 2017 · 1 comment

Comments

@mykelaballe
Copy link

Device Storage:
is there a way to access the available storage of the device?

Catching Full Storage:
while saving, can we catch an error if the device's storage is already full?

Current Usage:
is there a way to know how much this library already consumed? like how much data are already saved in the device using this library? maybe in units like bytes, kb or mb

@sunnylqm
Copy link
Owner

  1. There is not much options as far as I know (only AsyncStorage and localStorage for now)
  2. You can try "try...catch", though I think it is unnecessary. (You can hardly hit the quota by only strings). But if there is a possibility, you should use some other storage tech. KV storage is not suitable for large scaled data.
  3. Not yet supported. I'll consider to sum the usage everytime save() invoked. Any solid idea on this is welcomed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants