Comments (31)
Ok, lets wait for @HbIXA to confirm. If he doesnt soon, I'll reopen the issue.
from cordova-plugin-nativestorage.
I think by 'good job' you meant, that the plugin works ;)
I'll close this issue now.
Added browser for testing purposes in commit 29b4bb6.
from cordova-plugin-nativestorage.
@alokrajiv thanks for the quick fix! It works now 👍
from cordova-plugin-nativestorage.
are you referring to the fact that you are not able to run in the browser during development.
from cordova-plugin-nativestorage.
Yes
from cordova-plugin-nativestorage.
In the browser there is no preference or 'native storage' available. This is the same reason why many plugins don't work in a browser and work only in the device or emulator. A possible soln would be to have a fallback to localstorage. As of now we don't have a javascript proxy to fall back.
from cordova-plugin-nativestorage.
I think it makes sense to implement at least a cookie, it is for the browser .
from cordova-plugin-nativestorage.
See this ngCordova doc link which specifies testing apps with plugins in general on a browser is not a good idea.
It is a common issue with cordova and not specifically this plugin. Same goes with plugins such as media, gyro, camera etc.
from cordova-plugin-nativestorage.
@alokrajiv I'll implement a localstorage approach if the application is running in the browser.
from cordova-plugin-nativestorage.
@GillesC Sounds good.
from cordova-plugin-nativestorage.
It'll be a simpel approach: test if in browser, if yes save via localstorage.
from cordova-plugin-nativestorage.
I suggest you could check for availability of cordova or phonegap. if not fallback to localstorage. because checking if running in browser will be difficult.
from cordova-plugin-nativestorage.
cordova provides a cordova.platformId parameter whichs results in 'browser' when running in a browser.
from cordova-plugin-nativestorage.
ok then. But, I thought that was for the 'browser' platform only. Anyways, try it. You can see this open issue link. Because usually in the browser cordova is undefined.
from cordova-plugin-nativestorage.
Thank you, I was just checking the platformID, now I will check for cordova and phonegap also ;)
from cordova-plugin-nativestorage.
Testing in browser is now possible. Would you check if your problem has been resolved?
Please remove the old version first:
cordova plugin remove cordova-plugin-nativestorage
And use the development version of the plugin:
cordova plugin add https://github.com/GillesC/cordova-plugin-nativestorage.git
Added browser for testing purposes in commit 29b4bb6.
from cordova-plugin-nativestorage.
@GillesC are you able to reproduce the results on browser?
from cordova-plugin-nativestorage.
Yup I've tested it through the browser platform.
from cordova-plugin-nativestorage.
Working perfectly. I am closing the issue.
from cordova-plugin-nativestorage.
commit 29b4bb6.
from cordova-plugin-nativestorage.
Yeah, I thought waiting for @HbIXA to respond. And if his issue had been resolved, than to close this issue.
from cordova-plugin-nativestorage.
Temporarily reopening the issue for 48hrs. @HbIXA pls confirm that your issue is resolved. If not in 48hrs we'll close the issue because we have tested and aren't facing the issue anymore.
from cordova-plugin-nativestorage.
- rm plugin
- add plugin
result : plugin ls
cordova-plugin-nativestorage 1.0.9 "NativeStorage"
version not updated
from cordova-plugin-nativestorage.
cordova plugin remove cordova-plugin-nativestorage && cordova plugin add https://github.com/GillesC/cordova-plugin-nativestorage.git && cordova plugin ls
I suspect you didn't install the development version. Bcoz the v1.0.10 isn't on release yet.
from cordova-plugin-nativestorage.
Like I said in a previous comment, you must install the development version. This because I'm waiting for your response to republish the plugin on npm.
The previous post:
Testing in browser is now possible. Would you check if your problem has been resolved?
Please remove the old version first:
cordova plugin remove cordova-plugin-nativestorage
And use the development version of the plugin:
cordova plugin add https://github.com/GillesC/cordova-plugin-nativestorage.git
from cordova-plugin-nativestorage.
good job
from cordova-plugin-nativestorage.
Thanks for this. I have an issue where the inBrowser
function returns true for me on Android because window.phonegap
is undefined.
from cordova-plugin-nativestorage.
@jayj I understood. But, let me recreate the issue. and I will respond back.
from cordova-plugin-nativestorage.
@jayj Thank you for pointing the error , the commit actually broke the functionality. I am re-opening the issue while I update the inBrowser function.
from cordova-plugin-nativestorage.
I have updated it. Please reinstall the development version and check.
cordova plugin remove cordova-plugin-nativestorage && cordova plugin add https://github.com/GillesC/cordova-plugin-nativestorage.git
And retry your use case. I beleive I have corrected the problem with commit 3714c9b.
@jayj Please confirm.
from cordova-plugin-nativestorage.
Glad thinks worked out! I'm re-closing the issue
Problem corrected with commit 3714c9b
Updating the plugin on npm as well and version control on Github
from cordova-plugin-nativestorage.
Related Issues (20)
- Ionic 3 - No provider for NativeStorage HOT 1
- Values not consistent HOT 1
- IOS doesn't work HOT 6
- getItem returns JSON_ERROR trying to get a value stored using objective c
- losing data on ios HOT 5
- retrieving data from another app HOT 1
- How can i get value from NativeStorage.getString() Without Using Callbacks? HOT 1
- Undefined data in iOS when trying to store data
- NativeStorage.keys func returns un known keys by default on IOS
- Angular Cordova app stucks at splash screen on iOS 13+ HOT 1
- Please, close this issue.
- Ionic Native Storage not working Android 9+ HOT 5
- Is this project being maintained? HOT 2
- MFP v8.o Push Rest Service Implementation sample java project or adapter HOT 1
- IOS build issue HOT 1
- Migrate data to React Native HOT 2
- Experience slow in ionic native storage in android version(sharedpreferences)
- iOS - setItem function always returns the wrong callback (Error storing item)
- Outdated values after installing new version of the app
- iOS - Privacy Manifest
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-nativestorage.