I have created database in one application and that application is installed in multiple devices.My requirement is that if i change the value in database of one device then,that changes in database should reflect in another device of same application.I need it without server/third api. Thanks in advance...
-
1This is precisely when one does need a sever. – Chris K Nov 08 '14 at 10:18
-
1How do I fly across the Atlantic? I need it without a plane... – Boris the Spider Nov 08 '14 at 10:20
-
1@BoristheSpider then u can use a helicopter – while true Nov 08 '14 at 10:21
-
@whiletrue find me a helicopter with a long enough range and a top speed that means I won't die of old age before getting to my destination... – Boris the Spider Nov 08 '14 at 10:21
-
2@BoristheSpider we could strap a rocket to one; that never ends badly ;) – Chris K Nov 08 '14 at 10:26
2 Answers
This is precisely when one does need a sever.
Stop and consider what it is that you are asking for. You need a way for a phone to notify all other phones that hold the same application about a change. Phones are not directly addressable to each other via the web, which makes any kind of peer to peer algorithm tricky. SMS texts is the closest form of direct addressing that phones do support, thus it could be used to build a peer to peer protocol, but that would be tricky, unreliable and is unlikely to be beneficial.
A server on the other hand is the standard approach to solving this problem, the server acts as a shared agent that all phones that connect to the web can address easily. Even if the server is just an FTP server on a freebie hosting site.

- 11,622
- 1
- 36
- 49
-
-
@user2101858 I got that you do not want to use a server. You have two realistic choices, 1) relax your requirements so that state is not propagated across clients, or 2) use a server to coordinate communication between clients. – Chris K Nov 08 '14 at 11:01
You need to implement a server functionality in your android application.
What is a server : A server is a running instance of an application (software) capable of accepting requests from the client and giving responses accordingly. Servers can run on any computer including dedicated computers, which individually are also often referred to as "the server".
For further information,I would like to provide this link which will clarify you about communication between two devices Android - communicating between two devices (Use of bluetooth etc.)
-
You don't want to use a server is your perception like I don't want to run the car with the help of wheels....(However,this is your actual requirement,you will find this later when you will end up using this)...Good luck.. :) – nobalG Nov 10 '14 at 05:53