If I have multiple browsers, can PWA share states or data? For example if I’m offline and I interact with the app on Firefox, save some data, etc. Can I access that same data when I open the app in Chrome? I tried it with https://voice-memos.appspot.com/ but it doesn’t work. Perhaps an unimplemented feature?
No, you can't. The browsers implement the cache in different ways, they store the data in different directories, etc..
Browsers have their own private storage for web apps, and there's no API designed specifically for direct, seamless cross-browser data sharing, so only workarounds are available.
When online you can share the data by synchronizing it via a server. This may even be near-realtime with the help of SSE/WebSockets or push notifications.
When offline I don't think you can in any sensible way. You could instruct the user download a file in one app and select it in a file picker in another app (or use drag'n'drop or copy'n'paste). Maybe (I haven't tested) you could establish WebRTC data connection between browsers while online and it'd survive going offline if the direct p2p connection was made over loopback/LAN.
Related
We have written an Vaadin7/GWT application where the user can select multiple images and upload them. The application works offline, so we want to store the images clientside and only upload them when the user is pressing the sync button. The clue is that we want to keep the selected images, even when the user is closing the Tab/Browser. The clientside storage should also work with mobile browsers (Android and iOS)
We have found the following possibilities to store data on the client
Session Storage is killed when the tab/browser is closed. Not suited for our case.
Local Storage is limited to 5MB which is not enough. Is there a way to extend that limit?
IndexedDB does not work on IOS devices (http://caniuse.com/indexeddb)
WebSQL does work on IOS and Android devices (http://caniuse.com/sql-storage) but is deprecated
So the question are. Does anyone know a good Frameworks in conjunction with gwt? Which storage type/DB would you prefer and why? Or even more general, how would you solve the Problem?
Thanks for any advice, suggestion or experiences you had.
Unfortunately, there is no magic solution for all operating systems/browsers. I believe that you your only option for large objects is to build native apps for each platform that use a web browser for their client.
I have been searching around for a bit and cant find any solution to this question.
I need to run a browser on an iPAD that allows cross-origin policy to be bypassed. This is easily achieved with a windows machine by launching lets say chrome with --disable-web-security I have read that Phonegap allows this but the app is already in place.
Ill take any solution including jailbreak's
I'm not aware of any official ways to do this.
If you rely on cookies, the alternative would be to read every header to every response and manually assign received cookies to different domains (the downside to this is that you must know the other domains to be used beforehand). For handling cookies, check out [NSHTTPCookieStorage sharedHTTPCookieStorage], the default storage for native apps.
Is there any way to have localstorage persist across browsers? I have a system that uses localstorage to track which iphone is accessing my system (it's a controlled environment), but I would like it to work regardless of the browser - if they register their phone using Safari, I want to know the registration key that gets stored (currently using localstorage) even if they use a different browser.
Is this possible? Is there another way to do it?
No, localStorage is local storage for the current domain and only accessible on the particular browser implementation. It will not and can not ever be used across browsers or devices or different domains.
You need to store the key on a server somewhere, so that the different browsers can both access it. Or perhaps there is some native feature for iOS that both browsers can access, but i wouldn't know about that kind of thing.
I want to show some really simple graphics in a http-page in the local network using an iOS App as local server.
Now I heard showing some http-page over the local network is quite easy, using for example CocoaHTTPServer.
Would it also be possible to adjust the content of the page dynamically, from the iPhone side?
Meaning
user types in URL at the desktop-pc-browser of his choice
user goes to his sofa, flicking through text/images with his iPhone, looking at the remote screen
(no need to go to the browser to refresh page?)
Would this be feasible?
Of course I could also try to set up some Bluetooth-Connection, connecting between iOS/MacOS Apps, but I figured the browser version would be much more flexible :)
Stable connection? No need to support each and every browser? Then open up a websocket connection between your app and your browser. You’d then advise your browser to reload or show another picture through the websocket.
If you need to support more browsers, you might need comet / long-polling support. I’m not sure, though, whether CocoaHTTPServer supports it.
If none of these work, you could have your webapp do an Ajax request every now and then, in order to check whether something has changed.
We have a web application and we've built phone applications (iPhone, Android, BlackBerry) to be companions to the site. The usual workflow is that an existing user of the site gets a phone app and then plugs their existing credentials into the phone app and they are off and running, but more often now we are seeing folks who are downloading the app and then (and this should not surprise anyone) don't read the help screen that explains they need to go and get credentials at the web site and therefore cannot connect to the application which does require registration to manage their content. This is a giant usability fail condition.
So we know that we need to put user registration workflows on the phone app.
Other than the obvious solution of duplicating our registration page on the mobile, does anyone know of a better identity solution for the phone? For example, on the desktop we also use Facebook Connect as an identity server and the users love it. I'm looking for something that simple that we can implement across the major smartphone platforms.
Clarifying note:
I should add here that this registration mechanism is likely to; and it would be desirable if it did, go hand in hand with a general identity/authorization mechanism such as the Facebook mechanism mentioned below.
One other place I'm poking around is to see whether there's an openId solution that does not require a browser to pop up.
Restful service might be the e asiest way for you to achieve this, you can use it on any device that can make http requests, so you can make your own login screens and talk to the s ervice that way...
Facebook has a Connect API for the iPhone. Integrating it into your iPhone app is very smooth.
http://developers.facebook.com/connect_iphone.php
On the BlackBerry we were able to build a fairly robust REST pipeline between the client apps in the field and our servers. We primary use the framework for updates, but the device API is generic enough to be able to build almost anything you need via standard HTTP/HTTPS GET/POST calls.
On the RIM platform, look into the HttpConnection API as a starting point. There is also an example on the BlackBerry Developer's site which will help. Finally, I believe there are several examples inside the sample package that comes with every BlackBerry JDE (IDE + API download).