dZZx
dZZx

Reputation: 47

Android app - communication to PC app

I'm having the following scenario:

On the PC i will have a program running: java or .net, haven't decided yet. When a certain event happens on PC i want to notify the android device.

I want a solution as independent and reliable as possible.

Opening a server on the PC/Android i think is out of the question because the user might be behind a router or on GSM internet (as far as i know it can't open ports as server)

The solution i have at this moment is to have a web server on the internet and have it handle the job, but i'd like not to use this because the delay between checks should be around 5 seconds, and i expect to have about 2-3k users simultaneously, and that will probably know down a regular web server.

So, any ideas how this communication can be made?

Upvotes: 2

Views: 4591

Answers (2)

appsroxcom
appsroxcom

Reputation: 2821

You may consider the option of Bluetooth client server application since PC and Android device usually have Bluetooth. You will have a Java server running on the PC and an Android client on the device. Check out this post: Send text through Bluetooth from Java Server to Android Client

You can handle the situation where Bluetooth is not available by creating a failover mechanism using REST API & JSON.

Upvotes: 2

Brian
Brian

Reputation: 7146

If you're already a web developer, I think creating a light HTTP based REST or JSON service would be a great solution. You've already said you don't want to do that which leaves the option of rolling your own client/server set up.

On the Android side of things, one way to do it would be to use TCP sockets. You can learn more about them here: http://developer.android.com/reference/java/net/Socket.html

Upvotes: 1

Related Questions