Notifications in Android app

Asked

Viewed 154 times

1

I am developing an application and would like to know how I do to generate notifications when there is a new record in the database, I am receiving the data via JSON.

I was watching Firebase, but I couldn’t do it.

  • Since you are developing the application in php, see about the echo Standard, I think it will be useful for you. https://laravel.com/docs/5.5/broadcasting

1 answer

-1

var
  MyNotification: TNotification;
begin
  suaSQL.close;
  suaSql.sql.clear;
  suaSql.sql.add('select * from tabelasua where status = 0');
  //status é o campo que vc quer verificar os dados 
  suaSql.open;
  if suaSQl.RecordCount > 0 then
  begin
  MyNotification := NotificationCenter1.CreateNotification;
  try
      MyNotification.Number      := 1;
      MyNotification.Name        := 'Notificaçao de Suporte';
      MyNotification.HasAction   := True;
      MyNotification.AlertBody := 'Existem algo no banco de dados';
      NotificationCenter1.PresentNotification(MyNotification);
  finally
    MyNotification.DisposeOf;
  end;
end;
  suaSql.close;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.