Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BBEC0179A4 for ; Fri, 13 Feb 2015 16:06:23 +0000 (UTC) Received: (qmail 26081 invoked by uid 500); 13 Feb 2015 16:06:23 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 26041 invoked by uid 500); 13 Feb 2015 16:06:23 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 26029 invoked by uid 99); 13 Feb 2015 16:06:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Feb 2015 16:06:23 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of hanna.ryan@gmail.com designates 209.85.223.173 as permitted sender) Received: from [209.85.223.173] (HELO mail-ie0-f173.google.com) (209.85.223.173) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Feb 2015 16:05:58 +0000 Received: by iecat20 with SMTP id at20so20553865iec.12 for ; Fri, 13 Feb 2015 08:05:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=o+N6H7LQ36Tx7hVXOKSqoQh+LWS5wPI6E1Uo3Zu9f5I=; b=Yvs263cMa5MiD2RQ5d/pHEsGBFjoIUDbJAIIw+S3dIIrlPll5x4JqrNgMDtAFogSLg fWL3bD5PiqIJxL2J/Hu4K3IuRzgwARWMOBD0H7LEDVCH58nJ7MpA4S1zcktgl124mCe4 cyuOlbIK4wgE9ohVvEp21FVYDYXK5ohKnedlYk1AvG7iXUje2hoyhmCld1pdC9yg20g5 Xp165OM4Rcqls80HK0mwOV1uXOpGdGG68rf6yzTM9QdGLAuRR7Z1OvtiuT5yI+M+9Dq4 rfserbMLKpluIwRQeXC9abrir8a+y3NMlhFTxDYJxLBm/11/kMlCO2SwiHZSnmDNftji f/lQ== X-Received: by 10.43.52.197 with SMTP id vn5mr14821331icb.64.1423843511640; Fri, 13 Feb 2015 08:05:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.36.26.199 with HTTP; Fri, 13 Feb 2015 08:04:51 -0800 (PST) In-Reply-To: References: From: Ryan Hanna Date: Fri, 13 Feb 2015 08:04:51 -0800 Message-ID: Subject: Re: Maintaining App Data When Switching WebViews To: dev@cordova.apache.org Content-Type: multipart/alternative; boundary=bcaec51a74b4ba2a03050efa666e X-Virus-Checked: Checked by ClamAV on apache.org --bcaec51a74b4ba2a03050efa666e Content-Type: text/plain; charset=UTF-8 Would the google drive persistence be useful across webviews for apps already using storage that is not with google drive? Eddy V seems to have come up with a great solution for iOS in his WKWebview plugin as a reference. https://github.com/Telerik-Verified-Plugins/WKWebView/commits/master?page=2 -Ryan Hanna Sworkit Developer On Fri, Feb 13, 2015 at 6:28 AM, Jay Proulx wrote: > For iOS you can use the new shared keychain, and for android you can > persist data to google drive to share across applications. > > https://github.com/googledrive/appdatapreferences-android > > > Jay Proulx | computer scientist | aem engineering | office: 613.940.4052 | > mobile: 613 866 0732 | adobe systems > > > > > On 2015-02-12, 4:05 PM, "Josh Bavari" wrote: > > >Andrew, > > > >Here at Ionic, we've had a few users request something like this. My > >approach has been to create a Cordova plugin, that takes the following > >steps: > > > >Creates an instance of the original webview > >Executes some JS inside the webview that will grab all entries for > >localstorage > >If Android pre KIT_KAT or more, executed JS calls a JSInterface to pass > >the > >data back to native land > >If KIT_KAT or greater, calls evaluateJavascript > >Those values are read, and passed back to the original webview > >From there, it'd go through the keys, and add them into the new webview > > > >See this repo for my work in progress: > >https://github.com/driftyco/cordova-plugin-local-storage-retrieval > > > >On Thu, Feb 12, 2015 at 1:46 PM, Andrew Grieve > >wrote: > > > >> Worth a discussion about this, I think. > >> > >> If you have an app already launched that uses localstorage/websql, and > >>want > >> to switch to xwalk, how can you migrate your data? > >> > >> What if you want to use system webview for API >= 21 and xwalk only for > >>old > >> phones? Then you need to move data in the reverse direction. > >> > >> > >> Idea 1: > >> - See if sqlite / localstorage databases are the same format, and > >>provide > >> code that migrates db locations > >> > >> Idea 2: > >> - Use wizcorp's multi-window plugin to create a new an off-screen system > >> webview, then use post-message to read data out of the old one. > >> > >> WDYT? Is this a problem we need to solve? > >> > > > > > > > >-- > >"Clear thoughts produce clear results." > >Josh Bavari > >Application Developer > >Phone: 405-509-9448 > >Cell: 405-812-0496 > >Email: jbavari@gmail.com > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org > For additional commands, e-mail: dev-help@cordova.apache.org > > --bcaec51a74b4ba2a03050efa666e--