I want to create a web server at home and upgrade it to communicate with my Android app. Eventually I would like to store SQL data on it and collect data from it in my Android app. I have no idea where to start, and I am worried that I might start with one tutorial which will eventually not be able to give me the end result I want.(I am looking for tutorials at the moment since I have no knowledge on server side coding or anything similar)
So I was wondering if XAMPP is the thing I am looking for? I found many tutorials on that but I can't find anywhere if it is possible to eventually store my SQL data and communicate with android app. Also I read that XAMPP is for testing purposes and I would like to start learning something I might actually use as a web server later on for commercial apps.
If not, what else can I use? Many websites suggest JSON server communication but I am still not sure if that is the thing I am looking for.
Install xamp on your pc
Create the php file to communicate with the android data
Use http://10.0.2.2:80/ as a server ip in your android project
Consider Following link for more information
http://www.androidhive.info/2012/05/how-to-connect-android-with-php-mysql/
Related
I am making a project and I need to get data from the Arduino to a server (I don't have a server), and the read this data from an Android. And the same on the other way (from Android -> to the server -> to the Arduino).
I newbie to dealing with servers. I am trying to figure out which server to use (I need to save a database on it also...). I know this one:
www.parse.com
and I have read about Microsoft azure.
How can I choose with which one should I work? where can I start from to read about this?
and if you have suggestions for a free server, I would be glad if you tell about it.
There are many variables that go into the decision of what services you will need. Microsoft has a suite of IoT products that can get you going.
Here are some great resources to get you started on the Azure IoT suite. Take the time to read through and figure out which services you need.
http://azure.microsoft.com/en-us/documentation/scenarios/internet-of-things/
https://channel9.msdn.com/Events/Build/2015/2-67
https://dev.windows.com/en-us/iot
The biggest thing you need to consider with the server is the kind of data you will be collecting and how you want to store it. As far as being able to connect to the server with both Arduino and Android, any service you choose will be able to be accessed by both platforms.
Azure is a good option because there are a lot of pre-built solutions that you can modify. You can find a high level description of different solutions here.
I want to build a website, where the data will be saved in a data base, logical in a sql database. Also, I want to build an android app, which will take the data from the above (sql) data base. How can I achieve it? I mean how can I manage the communication between the website and the android app. In past, I have create website with php and sql and also I have build android apps, but now I want to achieve the communication between them. Can I use parse platform?
FYI, without any server communication you can't use the website database in android application.
If you want to manage the communication between the website and the android app means you need a centralized server which having the data of your web/mobile applications. So, after that by using the web service methods (REST/SOAP) you can achieve the communication between them.
yeah unfortunately chrome won't let webapps use local storage on android. what you can do is create a local server (using org.apache.http package for example), let it run as a background android service, then have the website make requests to that url. Its considered hacky, but it would work. You can post whatever data you wanted the website to know about , and then get it from the website.
I would like to create a local multiplayer server.
My idea would be like this.
Server phone starts a server and any other device calls the server over wifi and see a html5 app. So the client devices doesn't need to download the app.
Are there any good frameworks which supports such a behavior?
I found already i-jetty (https://code.google.com/p/i-jetty/wiki/ConsoleWebApplication), but according to the wiki i need to download the app before. Another thing is I dont know how to access a database over calls to the webserver.
This is a big topic you are asking. A good starting point would be to investigate web services to get your database via a web server.
I'd recommend looking at Web Services..this is a very basic link:
http://www.w3schools.com/webservices/ws_use.asp
Basically my android project is around making a form to be filled up by the user of the app. And send this data to the php server. The data may be collected offline so the app should also save the datas unless its in the reach of wifi or gprs network. I'm early beginner to android and got stuck in between. Can any one suggest me a similar project sample so tat I could make a study and learn the stuff.
Sounds to me like a good use case for a hybrid client-server app. Use the mobile device to collect forms and store their results in a SQLite database. Whenever an appropriate wireless network is available, connect up with the server-based app and upload all the data. There are many good ways to do this, but for starters, consider making the server app implement a RESTful API and have the mobile device use this API to send in the data. If messing around with a server sounds like fun, I've had good luck with MySQL + CakePHP. One of the cool aspects of CakePHP is it gives you RESTful access to your database almost for free. Or, you can use something like Google App Engine and let someone else worry about administering the server.
I would like to connect to a MySQL Database hosted on the same server with a Tomcat Server from my Android App without using PHP. Is there any way to do this? I found some solutions but all use PHP.
Can I connect directly or do I have to do it through a Web server?
Because you're running on Tomcat I imagine the best way to access the database would be to write a webservice that handles the communication between the app and the server.
The webservice will be written in Java to run on TomCat using JSP.
I'm guessing you're trying to communicate directly with the MySQL database (i.e. run SQL commands on the database directly) but I don't think you can do this (although never tried or looked into it), I have always been under the impression that you need some code on the server to sit inbetween.
It should be common sense, that directly communicating with databases over the web is a "no go" security wise and with mobile devices a pain regarding the connectivity.
Setup a webservice with JSP or Grails (which I find comes with less workload) and deploy it to your tomcat server.
Hence the thought, you already have a Tomcat running, one assumes you have a java web app running. Try adding a webservice to that app or look in the documentation, if there already is one.
You actually cannot do this with Android the main reason is performance it is really expensive to keep a remote connection alive than rather just call Web Services on demand, and it is more portable.
So i recommend you to play around with your favorite language creating services that access to your database and digest the output (XML or JSON) with android.
BTW i also think this have been asked Android MySQL Connectoin and here is a nice tuto about it (but with PHP) it should be fairly easy to do it in Java.