Can I use IndexedDB in my Desktop Web application - javascript

I have being using typeahead.js in my web application. for those who don't know typeahead is a suggestion library which takes the data from you ajax call and shows its value in a drop down menu like google search engine do. it's quite impressive.
But now I am facing some issue data from ajax call is too heavy so that chrome cache unable to handle such a huge amount data. by going through google. I have found this IndexedDB API.
IndexedDB API which I came to know by googling. It store the data chrome browser offline instead of saving it in cache. please correct me if my understanding is wrong about IndexedDB.
So can I used it to store data client side browser. in my Desktop Web application.

Yes
You may use IndexedDB in your desktop web app, Its recommended especially for storing large JSON's
check out Progressive Web Apps Training Working with IndexedDB

Related

Save Session Spot In Cordova?

I'm making a story-driven app in Cordova. The problem is that whenever the app relaunches, it restarts the entire story. Is there a way I can set it so as long as the app isn't deleted it saves the exact progress? I haven't found anything online...
Because your Cordova app runs in the browser, you can use browser storage technologies like LocalStorage (basic kind of storage), WebSQL or even the newer IndexedDB. What I personally like to do is to use an abstraction layer like PouchDB (for offline syncing) or localForage.
If you choose to go the WebSQL way and want to store lots of data, consider Cordova plugins for WebSQL.

Take picture and save it programmatically in client-sided web application (HTML/JS)

Context: My client-sided web application should work offline and only depend on HTML and Javascript. The target device is a mobile phone with android, but nice would be a solution which works also in Chrome and Firefox. The pictures should be saved locally on the device and available to save them later on a server.
Approach: With getUserMedia i'm able to take a picture and draw it with canvas. Now i'm stucked where i have to save the picture manually. Last approach was to save it in localStorage to access it later.
Question: Is there another way to avoid saving the picture in the localStorage? At least i could accept solutions which exclusively targeting mobile browser for android (maybe jquery, phonegap,... ?)
I'd appreciate your input.
You can use IndexedDB or WebSQL with phonegap to store your image data.
However, first try using HTTP cache. Set long expiry headers, Cache-control: public. If you don't need long-term off-line capability, it will "just work".
These links will help you with IndexedDB and WebSQL:
http://docs.phonegap.com/en/3.3.0/cordova_storage_storage.md.html
http://plugreg.com/plugin/DickvdBrink/cordova-indexeddb

Phonegap IOS App with local storage

I need to develop an app for iOS with some basic functionality and since I'm not experienced with Objective C but with Web development, I need to know if it's possible to do it using Phonegap.
This app will be like a book with chapters that needs to be updated on a daily basis.
There'll be a CMS in a server where the content will be updated. Text and pictures.
The app will be running on iPhone and iPad that sometimes may not be connected to the network. When connected they need to check for updates and save in a local database to be available when off-line.
Is this possible using Phonegap?
Is there any local database in iOS like SQLite? Or do I need to store everything in files?
Can we save the text in a database and the pictures somewhere in a folder? Or everything needs to be saved in the local database?
What are the best plugins, features, methods that I'll need to look into?
You can use both LocalStorage and WebSQL in a PhoneGap app. LocalStorage is just... localStorage. Check the MDN docs for it. Ditto for WebSQL.

Monitoring the displacement of a mobile device using GPS

I am wanting to develop an application for mobile devices, which shows in real time where a user (with this software installed on your mobile device) is. The idea would be that one (or more) users could follow the map the displacement of another user via GPS. I want to use PhoneGap with HTML5 and CSS and Javascript.
My question is: Is it possible to do that with these technologies? If yes, where can I get information of how to handle the GPS that way? If you can not, which language would give me this possibility and where can I get information? At first, I intend to develop this Application for Android and IOS.
Yes it’s very much possible with PhoneGap technology. You have to write a web service to keep the GPS coordinates as user updates (or auto updates) in server. You can let other users to connect to Web service and get the info they wanted (i.e. the data they wanted to see the current location of the user). You developed using PhoneGap means, it’ll work for iPhone too.
You can easily develop a web service either using PHP, Java or C# though C# web services are easy to write and maintain but PHP web servers are cheap compare to windows hosting (which you will need to host C# web service).
The question you asked is very broad so can write a 1000 words article and beyond. If you ask specific question I can answer that.

Web mobile application with offline mode

To begin, I'm sorry for my awful english :)
I have a web application that will communicate frequently with a server running a
webservice offering JSON / XML. The application will send contact details / bills / products, and will have to manage an offline mode.
I thought to use this DOM cache (HTML5). However I must have constantly an updated customer list, bills etc. in offline mode because I can not make a request to the server.
It is therefore necessary to have an xml file on the mobile ... which will be read and modified. Is it possible and not too difficult to manage XML plaintext database with ExtJS (or another framework) on a mobile? (Android)
Thanks.
It's far easier to do with HTML5 storage, which you can use directly without the need for Sencha Touch API calls (providing you're on a supported device, iOS Safari supports web storage).
Have a read of this article from the Sencha blog.
Have a look at Lawnchair - this can be included in your app without a framework.
If you decide to use Sencha Touch you can use localStorage, which allows you to store key/value pairs in the HTML5 Web Storage on the device.
See this tutorial on the Sencha website. You could use localStorage to cache your json feed whilst making static assets available offline with a cache manifest file.

Categories