You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to load a webpage for login in webview. That webpage uses localstoage to save password in case of 'Remeber Me'
That is working fine on web and ios but on android I am getting the below error
Uncaught TypeError: Cannot read property 'getItem' of null
That seems localstorage is null in case of android webview.
Which platform(s) does your issue occur on?
Android
Please provide the following version numbers that your issue occurs with:
I have checked on stackoverflow in found the pointer that I might need to enable setDomStorageEnabled(true)
For that I have tried
this.webview.android.getSettings().setDomStorageEnabled(true); but that is not able to access getSetiing as this.webview.android comes as undefined.
I have also tried
android.webkit.WebView.getSettings() but getSettings is not a function.
The text was updated successfully, but these errors were encountered:
We can close the issue, as I found the workaround. I was looking for .webview.android.getSettings().setDomStorageEnabled(true) in ngAfterViewInit but it seems it takes time to load so I am doing that in webview loaded function.
Ref: NativeScript/nativescript-angular#848
I am trying to load a webpage for login in webview. That webpage uses localstoage to save password in case of 'Remeber Me'
That is working fine on web and ios but on android I am getting the below error
Uncaught TypeError: Cannot read property 'getItem' of null
That seems localstorage is null in case of android webview.
Which platform(s) does your issue occur on?
Android
Please provide the following version numbers that your issue occurs with:
"nativescript": {
"id": "org.fcs.FreshTracker",
"tns-ios": {
"version": "3.4.1"
},
"tns-android": {
"version": "3.4.1"
}
},
nativescript-pro-ui": "^3.3.0",
tns-core-modules": "~3.4.0",
I have checked on stackoverflow in found the pointer that I might need to enable setDomStorageEnabled(true)
For that I have tried
this.webview.android.getSettings().setDomStorageEnabled(true); but that is not able to access getSetiing as this.webview.android comes as undefined.
I have also tried
android.webkit.WebView.getSettings() but getSettings is not a function.
The text was updated successfully, but these errors were encountered: