Notifications in Android application

1

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

I was seeing Firebase, but I could not do it.

    
asked by anonymous 23.11.2017 / 21:20

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;
    
08.02.2018 / 23:08