I am using visual studio 2015 in windows 8. i created simple app using Apache cordova in visual studio .so i want to create app ,i am really confused . In native app we take data through web-services and save it in local app database in the time when we start the app . then we use the data for by fetching from local database in app .but in hybrid app i do not have any idea. In apache cordova i seen a plugin sqlite storage plugin. but i do not know what is its use and also i heard about Ajax. In my hand i have stored database and its webservice with data.so what are the ways to show use dynamic data in a hybrid app.
but in hybrid app i do not have any idea. In apache cordova i seen a plugin sqlite storage plugin. but i do not know what is its use and also i heard about Ajax.
You can get data from your web-service through Ajax.You can write your own functions of Ajax using XmlHttpRequest. If you are using certain frameworks, please check if there is a wrapper for Ajax in that framework.(e.g. $http of AngularJS). You can use the wrapper to simplify your codes.
After retrieving the data, you can save the data to mobile SQLite database through cordova-plugin-SQLite. Currently, most of the mobiles use SQLite for data storage.
Related
Hello Everyone and thanks for taking the time to answer my question!
I want to create a simple app to display up to date information to our client. The App should check the latest "data" on the server every time the aplication start and download it to the client. That way the app will be able to use that "data" to show the information.
Does anyone know how I can do that with only JavaScript or maybe a JSON file and HTML5, or do you have any suggestion the best way to do something like that?
Thank you in advance!
You can generate JSON on yor server and parse that on the mobile device to display the data.
It's generally better to use native code instead of wrapping a HTML Application into your Android App. That way you can also use Google Material Design.
Assuming you don't want to write a separate native app for both Android and IOS, you could create a single mobile application using PhoneGap that is just a single HTML page with Javascript that does an XHR call to your server when it loads and stores the response JSON locally. PhoneGap allows you to compile versions for IOS and Android from a single codebase.
With PhoneGap there is a handler that gets called when the app loads that you can use:
function onDeviceReady() {
$.getJSON("http://yourserver/yourfile.json", function( data ) {
//do whatever you want with the data to store it
})
}
I am currently trying to get my head around database's and web programming.
I currently have 3 files index.html, script.js (empty at the minute) and test_db.sqlite.
I am trying to pull info from the sqlite database, create a javascript variable with the info and the print it to the html with the document.getElementById method.
What I'd having trouble with is reading the database using javascript. I am willing to use jquery or any other extra JS scripts, but I cannot use php as I intend to use this to create a cross platform app with a python web wrapper on windows & linux and phonegap for iOS and Android.
I also need to figure out to write to the database with javascript.
Thank you for any help in advance.
You have to dump the database (you can use .dump command in sqlite3)
Then you can send that dump to de front-end (the navigator)
You can use WebSql API to create the database and execute all commands of the dump to recreate
Warning, this does'nt work in Firefox. It works only in Chrome and Safari
I am developing an android app using phonegap in eclipse.
All the files for this app will be pushed by Sharepoint-2013 on a webservice.
The app should consume this web service and display the updated data(for example, display updated information like news and notices using .html file when an updated .xml file is pushed on the webservice)
So my Question 1 is How exactly to consume this web service using phonegap in eclipse?
Also the app will have a search feature where the user enters a search string in a textfield.
Using this input the app should search the database using the webservice and display results on the app.
So my Question 2 is How to do this? Do I need some backend programming to achieve this? If yes, please guide how to go about it.
Thank you.
PS- I am relatively new to programming and I only know HTML, CSS, JAVASCRIPT and jQuery.
Connect to sharepoint using Javascript and SPServices.
http://spservices.codeplex.com/
There is an active forum with information at that site too!
We've created a Rails app that allows users to upload PDFs or fill in our custom forms and submit. These users need to use the app without wifi and I'm wondering if there's a way to incorporate this into an iPad phonegap app?
To create a phonegap app, you can create a SPA single-page-application using html, css, and js. Think single index.html page without any backend code that shows your form. When offline, you can save the form data to local-storage. When online, you can send the form data with AJAX to your web service. RESTfull services on the server handle these very well.
I am fairly new to the development world. I need to built an app writing javascript on Titanium that should run on iOS as well as Android using a single codebase. I am currently targeting iPhones at the moment. The app is about a shop that is into selling traditional clothes and letting interested people know about the collection that they have. Any idea about the architecture that i should decide. Since it is quite logical that the user will update his collection of clothing frequently how should i go about it? Should i give him the client application that will run on his pc that he will make use of to update his changes? Will Appstore accept such apps? Any other points i need to know as i need to start the development asap.
I think the best solution will be an App with Web as backend. Means you can put the data in Web, and your app used particular URL's for fetching the required data in the form of XML and JSON.
Your app will parse the data and display it on the view.
If there is new images in the server, your app will download it to the iOS device.
Another option is an app which deals with HTML pages. Means you need to display the page on a web view. If you need to update the data, you can update it on the server. Also it can be of two type
Your app will load the page from remote server, using the url
Your app will download the page to iOS device and display it from there, until a new change occurs.
If you are interested in HTML and CSS, PhoneGap is another cross platform, that can also help you.
for rapid devlopment you can use python django... in your case you can use Django-tastypie for backend will be good choice.since using django you can develop it in quick time and the tastypie has api services which can used easily for retrieval and sending data
you can go through this
http://django-tastypie.readthedocs.org/en/latest/