Reputation: 671
I'm working on a code that I can change information from server-side after a few seconds. for example:
I change the user points for being registered on the server, with the update method, but I want to change the points at the server at every time . I built a method to send information to the server and created a php file to update the information.I have no problem updating the data. But what's your suggestion to run update method after every changes. To be clearer: How to update data after points changed or TextView's text changed?
Upvotes: 1
Views: 127
Reputation: 45
you can use grpc and Rxjava
see below links:
https://grpc.io/docs/quickstart/android.html
https://github.com/ReactiveX/RxJava
Upvotes: 1
Reputation: 428
for this you need to use tcp socket and send a message to client and tell them text has changed. you can also use Firebase Cloud Messaging (FCM) for sending message from server and receiving in client.
this way you can receive the changes every time.
Upvotes: 0