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.
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.
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;