Android Question Two device sincronisation

hookshy

Well-Known Member
Licensed User
Longtime User
How shared shopping list works ? Husband and wife adds records to a database and both sees the results ...but how do you pair these two devices ?

Thanks
 

DonManfred

Expert
Licensed User
Longtime User
Create a jrdc2 server.

Connect both devices to this server.
Each of the device can insert items to the db.
Each device can get a full list of items.

The jrdc2 is the man in the middle.

You also could use CKVS.
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Oooh, it's simple: you just delete entries from the husband and keep those from the wife...life soon becoming easier..eheeh
Sorry, I had a long and busy day so some jocking was due.

Back to your question. You could have a server receiving data from both devices and pushing updates toward them. Or an MQTT service where each time one of the partners clear a point on the list, it pushes a message to alert the other one. Even Firebase messaging could be used this way.
 
Upvote 0

hookshy

Well-Known Member
Licensed User
Longtime User
I do not want a social app to send invitations by searching users , I think how I could pair two devices to share same sql database content
 
Upvote 0

udg

Expert
Licensed User
Longtime User
I'm not sure to understand.
If you have a centralized server then two or more devices can sync to the same data by connecting to the server.
If what you need is to sync two devices that face each other (like husband and wife before they go out for their working day) this could be accomplished in a different way if you don't want to consider a server
 
Upvote 0

hookshy

Well-Known Member
Licensed User
Longtime User
If what you need is to sync two devices that face each other (like husband and wife before they go out for their working day) this could be accomplished in a different way if you don't want to consider a server
I have to save data to server ...each device should have data refreshed and same on both devices.
My question is how should I pair husbund phone with wife 's phone ? Husband sends a unique id over what up ?
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Ok, so Manfred first suggestion applies. You set a server which receives data from each device which can identify itself by a set ID code (you can specify/generate it by code or access one of those set in the device) if you need to distinguish data by its source (husband or wife).
The server is then programmed to store new or updated data AND push an alert to those devices in order to keep them synced at any time.

I find that MQTT and FB messaging are both good candidates to send "update messages" to devices in the field, with the latter having the advantage to be able to receive messages even when running another app or when the device is turned off (for some time period, probabily set in the FB service).
 
Upvote 0
Top