Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.listaPerguntas();
- this.IntervalId = setInterval(() => {
- this.listaPerguntas();
- }, 300000); //A cada 5 minutos verifica se existe uma nova pergunta
- for (var i = 0; i < res.data.notificar.perguntas.length; i++) {
- this.localNotifications.schedule({
- id: i,
- priority: 2,
- text: 'Produto: ' + res.data.notificar.perguntas[i].produto.substring(0, 20) + '...',
- title: 'Nova pergunta, conta: ' + res.data.notificar.perguntas[i].conta,
- smallIcon: 'res://notification',
- foreground: true,
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement