Connect android app to wamp - android

I want to insert the data in mysql from android. I use php webservice for transfer the data.
Which url is used to transfer the data? Which method is used for android webservice?

Not Possible as best as i know android. You need use PHP or J2EE running as your using already Wamp, and expose as apis.

Related

Accessing data from Local MySQL Server from Ubuntu in Android

I want to install MySQL on my Server and create a database and access my database through my Android Code. I know that this work can be done through webservice in Android, is there any way that I can use it without webservice. I don't find anything related to this. Please provide any links useful for this kind of work.
Yes you can write one restful web-service which will interact with your MySql database, and then you can integrate the service with your android code.
To connect your java code to MySql, you can simply use JDBC or hibernate.
To integrate and consume the restful web service, you can use spring-android-rest-template(to call web service) and jackson-databind(to get responce in JSON format)jars. You should read once this link. I have also used the same for my android app, and It is working.
Its really easy to learn and use.
It will take hardly 30 min. to understand it.
https://spring.io/guides/gs/consuming-rest-android/

Mysql data on remote server access on android device

I am developing an app which has database in Mysql in remote server .I Want to access the data from my android device . My access of data does not require to modify the data it just should be able to check the database .
1)Will I need the Web Services for this ?
2)If yes please help which web services , I really confused by looking at Soap,RESTful webservices.
Thanks in advance.
Yes obviously you must need to use web service to get the data from server. Better to use JSON data transfer format for that and we call it as Restful service as well. A very simple tutorial for that http://www.vogella.com/tutorials/AndroidJSON/article.html

How can i connect to MySql database to create a mobile application?

I have a script in java that works like a crawler and saves data in MySql DB. What i want to do is build a Mobile App(Andriod/ios) which will connect to mysql database retrieve results and just show it to the user.
What is the best approach to this ? I tried to use Flex UI with PHP as my server client but was hoping to know if there is a better solution ?
The fastest would be to make android fetch a page in XML, typically on the server and display its contents(If displaying contets is your desired result).
else
You need to implement a script on your server, your POST interacts with that script and inturn that script works with your database.
A typical scenario will be:
Java HTTP POST ~~~> PHP ~~~~> MySql.
PHP will as well help you encode the result in JSON and post it back to your client.
Try using jdbc or jtds library to connect android app with mysql
I used jdts library for connecting mssql db using android app.
http://jtds.sourceforge.net
For mysql jdbc might work

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.

should I use PHP to connect my android app to mySQL db

I want to connect my android application to an external mySQL database and I found that I have to use web service to achieve that using php code.
but I used to use java, Is there in java any equivalent to php code??
It depends on how the server side is implemented. Both php and java can implement the server side code and access MYSQL DB. Through your android client you dont' have to be concerned about the server side (If the server is not yours and just responds to your queries) , you have to make HTTP request POST or GET to achieve it.

Categories

Resources