output of web service to convert SQL to SQLite - android

i'm trying to build an android app which sends login details to SOAP 1.1 web service(C#) and gets employee details. i'm using ksoap2 v2.3 lib and developing for gingerbread version v2.3 of android. presently web service is returning plain data table. suggest me with the form of data the web service should return and which form i should choose to retrieve the data and save it to my local SQLite db?

its better to use ArrayList. i have tried it. :)

Related

how to make an android app that downloads dynamic forms from mysql database and uploading them the record after filling them?

im making an android-based data collection app similar to ODKcollect as a college project and im not that good so..
1-how to make a web service and connect my app to mysql database and which language is better for a web-service (PS:my data maycontain images)
2-how to make dynamic form templates then retrieving them from database and making them in the android app.
You can use php for that, You can write a php script that retrieve values from Mysql Database and then decode them to JSON and parse them to the android app. and another script to make the vice-versa Take a JSON response from your app and insert it into the Database.
There was a course in udemy that achieves such pattern you might want to check it

Update the web database using Android app?

I want to update the database of my website basically android app is getting data from pc it than process it and send it to the web database which store it and when ever android required that data it can get it from that database.
Now my question is how can I send it to the database at a specific place?
Assuming you host the web server hosting the database. You could then package your data (in android) using JSON format, and send the data over using Httppost. Found a good example of code shown in https://fahmirahman.wordpress.com/2011/04/26/the-simplest-way-to-post-parameters-between-android-and-php/ (although the web is just a PHP, you could then expand how to update PHP with MySQL etc). Hope this helps.

Web Services with SQLite

I am developing an android dashboard app to display various charts.
I am having a local SQLLitedatabase in my application which contains all the values to be displayed.
But I want that whenever my app loads my db should get refreshed by hitting a web server if data connection is ON or else it should display the charts with the local db in offline mode.
Can I update my db using the JSON parser provided by the Android API?
Please suggest the best protocol for this
Yes you can do that. For network related queries you can use the Volley library. That will be good try that one.
clicke here for Tutorial how to use the Volley.

Android SQLite to My MySQL Web Server?

I have been learning SQLite on Android and have done some tutorials on how to use it.
There is a question that I want to ask.
Is there a way to make my app connect to my MySQL database in a remote web server of mine so that it can read data and also write data to the database?
From what I've researched, SQLite cannot be used remotely and I would need some kind of Web service in between?
It's not easy to create a connection to MySQL from Android, if it's not impossible. With that, it's also not safe if for example someone decompiles your app they have access to your whole MySQL database if you don't limit it enough.
For those reasons, you can better use a (for example) PHP webservice to which the Android application sends all their requests. An example is available at http://www.helloandroid.com/tutorials/connecting-mysql-database.
I also suggest you use Android Asynchronous Http Client so you don't have to deal with connectivity issues and AsyncTasks yourself.
You can refer to this tutorial but you do need a web-server for it.
Request mechanism
Android App ----> webserver ------> database (mysql)
Respond mechanism
Android App <---- webserver <------ database (mysql)
Android App will use JSON or other to get the data and display it
You have to use Sqlite database and web Services both. First you have to save the data in local database i.e. SQLite database and then send this data to your server using web services and vice versa.
this link for web services
and this link for SQlite will help you understand.
Thanks.

How to know the webservice gets updated in android

I am missing some logic in my app. I am having json webservice which can be modiy by administrator.For the first launch of my app I am storing the data from the webservice and stores in sqlite and displays the data from sqlite using background threads.If it is second time launch then the app directly displays the sqlite data. Now the problem is if it is for the second time launch of the app how can I recognize the webservice got modified and where it is modified and how can I store the particular record?
For that I am comparing with the id's of the book in sqlite and webservice if new book enters I am able to get the new item and store it in the sqlite and display them from sqlite.But if there is any modifications in item details how can I recognize the particular tag?
Write a REST API on your web server that will send you a list of modified records. Query this API every time you start your app.
If there are modified records, This API should return you a list of the modified records which you can use to update your local sqlite database.
If not, then this API will return nothing and you can carry on happily :-)
You can create REST API's by writing server side code using a language like PHP, Ruby, Python etc
There are other options that avoid REST API's as well. See:
How to get from a MySql server to an Android app?
See here for a beginners tutorial on REST:
http://net.tutsplus.com/tutorials/other/a-beginners-introduction-to-http-and-rest/

Categories

Resources