S
S
SergeyVladimirovich2016-02-02 08:52:01
phonegap
SergeyVladimirovich, 2016-02-02 08:52:01

Why do webviews multiply?

Good afternoon, colleagues! I tried to build applications for recording gps tracks on cordova. I wrote a simple code using the cordova-plugin-geolocation plugin, everything seems to be fine, but there was one problem.
I've noticed before in chrome://inspect that an application can run several webviews at the same time, but I didn't pay attention to it. But now when I turn on track recording, if the applications are put in the background (open another), then the recording goes on (data goes to my server), but sometimes if I try to return to the application, for some reason, a new webview opens that does not know anything about the current recording ( which is logical for me to write the flag in window. *). At the same time, in chrome://inspect, I see that my first webview lives on and works, sends data to the server, but I can’t make it active on the phone.
I tested on android, one of these days I will test it on iOS.
The next question is, what is the point of cordova to produce a webview at all? And is there any way to make it work with a single instance? If not, then maybe there are some mechanisms for communication between webviews of one application other than localStorage?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question