Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are some of the ways to store data using Cordova/PhoneGap/Ionic?

So as the title suggests. Just wanted to know some ways to store various data on cordova apps. Not sure how this works since local storage is a browser thing, but does this work when applied to native apps on phones? can you use something like SQLite for large amounts of information and models?

like image 890
DevVex Avatar asked Mar 18 '23 06:03

DevVex


2 Answers

Edit: After some more research, the best solution to use in a PhoneGap environment would be angular-localforage

https://github.com/ocombe/angular-localForage

This angular service takes advantage of Mozilla LocalForage which will attempt to use the most robust solution to save your data, but then will fall back on simpler, more compatible options.

like image 82
Mackenzie Browne Avatar answered Mar 30 '23 00:03

Mackenzie Browne


localForage, more simplified offline storage from Mozilla

http://mozilla.github.io/localForage/

Use this with any js library and store things like

  • Array
  • ArrayBuffer
  • Blob
  • Float32Array
  • Float64Array
  • Int8Array
  • Int16Array
  • Int32Array
  • Number
  • Object
  • Uint8Array
  • Uint8ClampedArray
  • Uint16Array
  • Uint32Array
  • String
like image 45
cforcloud Avatar answered Mar 30 '23 00:03

cforcloud