How to connect Arduino and Android to the same server? - android

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.

Related

How does a geolocator work?

I need to develop an Android app which is basically a geolocator, allowing people to reach each other via Google maps. All being said, I don't know how do I accomplish such thing since I don't know how it does work and if I need a server or database on the way. I'd be grateful if anyone could shed some light on this topic.
As you said you will need Android application and Server through which Android clients will communicate.
Android Application
will be getting data of other Android devices from server and then showing those data on the screen
will be periodically sending own location to the server
Server
is responsible for storing geolocation of Android clients, data can be stored in some database or memory of the server, depends on the use case, how long you need to have those data, how important they are, etc.
is responsible for sending stored geolocation data to Android clients
you have various options, you can write your own server in whatever technology you wish - it can be PHP server, NodeJS server, Java server... or you will use some serverless solution. Check for example
https://firebase.google.com
has to be hosted somewhere, you have many options:
there are "traditional" hosting providers, where you are usually limited by technologies you can use, for example you can just use PHP or you will use products from Heroku or Amazon AWS.. there is more, Microsoft has Microsoft Azure or Redhat has Openshift.. There are differences in prices, services, etc., it is up to you to look and decide what is the best for you.
I for sure missed lot of things. It is not in my power to describe every possible corner case because the question is too broad but rather provide you with higher overview of the problem and possibly point you where to go next. I suggest to you to read more about problematic and then get back with more specific issues to solve.

Creating a web server for communication with Android apps

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/

How to set up a server for android app?

I am trying to create an android application in which an user will pretty save some data in database-like user data, photos and also be able to retrieve.
But I am clueless how to set up a server, connect to some database etc.
Can somebody help me point to right resources for end-to-end installation of server, database, and its interaction with the android application
Just set up a basic server that works over HTTP, and use HTTP libraries for android to make requests and handle results in the device. There are plenty of technologies with which you could make the server, just google building REST API with PHP/.net/java (whichever language you are comfortable with).
If you are mobile app developer and want to create server-client app then better use any back-end service rather than implementing new by own. Some most advanced and simple to use services are Parse and Firebase , BaasBox also there are many more.
And the plus point is this services free of cost until you have very large users.

Android data collecting form

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.

Use Android device as a simple server

I need a very simple server that listens for connections, retrieves a question and simply answers yes or no. Then the connection is broken.
As my Android device is the only device that is powered on and connected to the internet 24/7, I'm thinking of using it as the server.
Is this possible, and how could I achieve this? The biggest problems that I'm facing is the ip-address, as it could be changing a lot. I'm thinking of storing it in a public dropbox file, so the client can retrieve the address from that
There's a whole slew of reasons why you shouldn't use your android device as a server, but I won't go into those. I'll just assume you have a good reason for doing what you want to do.
Since your question is very general, the best I can do is give you a very general answer. You'd implement a server on android like you would any other server using java using sockets. For a simple java implementation of a socket based server, checkout this tutorial. The tricky part is going to be getting your IP address to share with clients so that they can connect to your device. As nick suggested, dyndns might be an option here, but I'm not sure if they have a mobile client.

Categories

Resources