R
R
Roman Alexandrovich2017-12-15 15:01:42
Web development
Roman Alexandrovich, 2017-12-15 15:01:42

The right notification for the phone?

Good afternoon. I am writing an application (chat) in react native. It is necessary to send an alert to the phone and count the number of unread messages. I'm going to remember the number of the last message when a person exits and use the firebase functions to hang a handler that will increase the number of unread messages. and every time when he will increase the number, I want to send messages to the phone. For this I want to use firebase functions.
The question is whether the logic is correct and is there an easier way to solve these problems?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Karimmin, 2019-10-04
@karimmin

Need to execute the user lookup code before the cookie is declared

M
Michael, 2019-10-04
@notiv-nt

Because cookies are http header
Code:

<?php
setcookie('test', 12);
echo $_COOKIE['test'];

Let's run it for the first time:
Let's run it a second time:
12

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question