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.
Related
I want to ask a question from my app users and get their answers but i don't know how to collect those data.
Please help me I need it.
You can use a form inside your application. And, ask users to fill that form. The forms needs to be connected to an database server. You may use 000webhost.com (free) to create your database. Just populate the table in database from the user response.
For this follow the following procedure:
1. Create a online database (000webhost.com)
2. Write php code to insert data into the database form and save that php on the file manager on server.
3. From android create a async task to execute that php.
4. Pass your parameter or user response as request attributes while executing the php.
5. php will save user's response on your server.
Now you can access that database from anywhere.
Note: This may require an internet connection in application.
Your question is much vague.
In general, app need to use HTTP POST with some standard data format as JSON/XML for communication between web server/client app.
This way client apps send/receive data in portable format across platforms &
implements UI/functionality as per platform standard e.g. Android or iOS
You could implement Google analytics in your app. Raise an event when you ask a question.
I'm making an application, I already have a website nodejs with expressjs framework and mysql database. how to process the input, update and delete data from android to mysql without using php server side? if anyone has ever made before? thank you
Basicly that's what the server side code is doing!
Handling all the data and requests between the two (android app & the relational database)
Any attempt to not use the PhP or any type of language for that matter would cause only to iconically change some data from the app!
But that's not the case since you want to alter also the database as you clearly mention!
As for the how: The only way to use the data transfer to the app is by the use of json packets!
A exchange should be made between the app and the database "through" the server side php code and they should exchange json files with data!
Then your problem is solved.
I have a web application on Android and iOS which uses html and javascript for the project. I now have local values and app works fine. now I want to use a mysql database for my inputs, are there any good tutorial or sample codes on how to do that.
I'll appreciate if you can help me with this.
Thanks
For web app and mysql communication need a scripting language like php and for database you need a database like mysql there is simple tutorial fo mysql connectivity
http://www.androidhive.info/2013/12/android-populating-spinner-data-from-mysql-database/
You need to choose a language that will operate server side to manage the database of your web app, e.g. you could use PHP as a language and MYSQL as a database software (it's free and awesome), for examples you could use http://php.net/ and search how to use specific mysql commands in PHP, or use a framework like CodeIgniter which has built in functions for database management and you can view some of them here https://ellislab.com/codeigniter/user-guide/database/active_record.html, but make sure you use the whole user guide on how to use it and how to set up your database configuration properly!
EDIT. If you don't want to use PHP for the actual app then you can use it server side, i.e. use it as part of a server file which connect to database, handle data, send it back, then send it back to your remote app where you can handle it with Javascript.
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. :)
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.