I have made same Gmail like functionality in my app, so I have one question related to give intimation to login user,
Register users are logged in into same app.
e.g. User "A" want to send mail to user "B".
User "A" sent mail on cloud first and at the same time one message sent to user "B" (who is already logged ) you have mail, as user "B" got this message app will hit to cloud and fetch that mail.
1. How user "A" will find out user "B" is loggeg in?
2. If user "B" is logged in, then how user "A" will send intimation message to user "B"?
3. Alos how we can identify mail reciever name (i.e. User "B") if it is correct or not as per that we can show user name is correct or not.
Please send me the code also related to this.