I am trying to connect and communicate between Windows application and andriod apllication. I have used .Net Socket but it is only appllicable for windows. how can i code in andriod application using Java programming language and make communication between two seperate devices (windows and andriod).
I want windows application act as a client and andriod apllication as a server. The server receives the data from client, processes the data and returns the result to the client.
Thank you all in advance
There are several ways to connect and communicate between a Windows application (developed in C#) and an Android application (developed in Java). Here are a few options:
1/ Use a web service: One option is to create a web service that both the Windows and Android applications can access. The web service can be hosted on a server and both the Windows and Android applications can send HTTP requests to the web service to retrieve or send data. This is a good option if the applications need to communicate with each other over the internet.
2/ Use a local network connection: If both the Windows and Android applications are on the same local network, you can use a local network connection to communicate between the two. For example, you can use sockets to create a connection between the two applications and send data back and forth.
3/ Use a shared database: Another option is to use a database that both the Windows and Android applications can access. You can set up a database server and have both applications connect to it to retrieve and store data. This is a good option if you need to store large amounts of data and need the data to be persistent.
4/ Use a cloud service: There are also several cloud services that allow you to easily connect and communicate between Windows and Android applications. For example, Google's Firebase provides a real-time database that can be accessed by both Windows and Android applications, as well as other features such as push notifications and authentication.
It's worth noting that each of these options has its own set of pros and cons, and you'll need to choose the one that best fits your needs.
Related
I am just a beginner in android app development and that's why I have many doubts. I am building one application where the user enters some data in editText. Now I want to save that data in my database. My database is running on my laptop. How would my app connect to the database? Do I need a web server in between? If yes then which web server is used for Android apps? Basically, i want to know the flow of data from app to the database.
Study more from Udacity.com, its free.
You may use a jdbc Connector to connect to database.
Connect your jdbc connector over local network ip\servername and database connection string
You can use REST Service when it comes to web Service on Android like this. You can either pass the values as parameters or an Object depending on your requirement. All the best
Wamp server is best option to play with server related utilities.You can use it even if you are offline. and it provides various option for data storage. It Mainly uses MySql and PHP scripts for fast performance.
For More details Click Here
I am trying to build a desktop application and an android application for a small business. A database will need to be accessed from both applications and the android app will not be using the same network as the desktop. Can someone point me in the right direction towards a solution? Also, there will be very little traffic to the database. Any suggestions? I would like for the desktop application to be able to host a remote database, whereas the android application will simply connect to the desktop computer through a web service.
Thanks!
You better host the database on a server. You can use a server side language like PHP or any language you prefer.
Android app will communicate with PHP/server side language. And server side language will process the data. Same goes for your desktop client.
You can follow this tutorial to setup Android:
How to connect Android with PHP, MySQL
It is not that much complex.
I am working on an android application which needs to fetch data from a cloud server . I know how to send a post request to a server and get data in return but i have never worked with cloud server before . https://developer.android.com/guide/topics/data/backup.html
i have visited this website but it's not that much of help to me i am confused as to how to send request to the server and retrieve data . I don't know anything about cloud servers .
A cloud server is just a normal server hosted in a some 'cloud providers' data centre. It is typically a virtual server - i.e. a single physical server running multiple virtual servers.
From your point of view you can think of it as just a regular server.
What may be causing confusion is that there are also 'Mobile Backed as a Service' providers - these allow you interact with servers, typically ones hosted in a cloud, but may allow you interact with them using a mobile SDK (or library) rather than using traditional client server communication. Your app usually needs to know nothing about the individual servers and you yourself don't need to create or manage any servers either.
Take a look here for a good overview of this latter approach:
https://parse.com/docs/android/guide
I want to raise an event from my Android application to my desktop application which is in Java. Can I do so? If yes, which API to use? Any examples or code snippets?
Both android and desktop applications are clients. Two clients can talk to each other via server or at least initialize their connection via server that is running on pre-defined location (IP address). So, you need some server that allows to do this.
You can probably use (or abuse) some 3rd party servers for this. For example if your desktop application "knows" the phone number it can send SMS via one of available web services. The android application will catch the SMS and take information from its text. You probably can use Skype installed on your machine or email to send messages among applications too. But better way is to develop your own server that exposes RESTful API and use it for the negotiation.
I'm designing a turn based game similar to Words With Friends. I don't need the data to be stored persistently on the phone in a local CouchDB.
I've attempted HTTP requests using HttpPut/HttpGet and HttpClient with no success.
What is the best way to communicate with CouchDB from an Android application? What alternative database backends are available?
I would recommend TouchDB-Android. We've been using TouchDB-iOS for our iOS apps and are planning on using TouchDB-Android when we start Android development. TouchDB has an active development community -- see this google group. You can use TouchDB to connect to a local or remote CouchdB database and to replicate between the two.