Hi
Thats my first post
I make app to receve string from web by php and httpjop.get string
And i use timer to check get string every 5 minutes in background service
It work
Did these way can crash the app?
And another question, can i use something like listener to php without timers
Or fire when message arrived,when target php change the value?
Thanks for reply
My point is somthing like websocket but over host as a third party
Ex.
I have php to append string to txt file on my host
From device 1 a add string to this txt file on host like msg
,, in device 2 i want to get thes new string and do some events
My solution is use timer every 5 minutes to download string from this txt file by httpjop
And run events
Its work good
But i ask if there library or class to auto listener fire when string in txt file was changed?
You can use Firebase Messaging to do so (Push Messages). Browse the forum. You'll need a Google Developer Account. When App x changes a value, the php script sends a push message to the other device (like WhatsApp does). See the examples in the forum.