I finally did it. Do not know if this is the best practice. I created a function to check any database change. I used setinterval
to repeat the function with an interval of 5 seconds. And it did work :)
Get notification on video chat invitation
Question
I have developed an application and i have APIs to create video calls. currently my problem is if some one invites other persons to chat, how can i generate a notification for invitees? I am using PHP and MySQL for developing the application. currently i am thinking i should work this way: While inviting, a DB insertion will happen, i should check for this insertion with small interval (may be of seconds). If the person is invited, then he will get notification. Is this the usual practice? Please advice
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow