Sample code for 30+ languages & platforms
Delphi ActiveX

Generate a Random Firebase Push ID

See more Firebase Examples

Generates a random Firebase Push ID. (According to the algorithm described at https://gist.github.com/mikelehen/3596a30bd69384624c11, and at https://www.firebase.com/blog/2015-02-11-firebase-unique-identifiers.html)

Chilkat Delphi ActiveX Downloads

Delphi ActiveX
uses
    Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
    Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Chilkat_TLB;

...

procedure TForm1.Button1Click(Sender: TObject);
var
prng: TChilkatPrng;
pushId: WideString;
i: Integer;

begin
// Demonstrates how to generate a random Firebase Push ID.

// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

prng := TChilkatPrng.Create(Self);

for i := 1 to 10 do
  begin
    pushId := prng.FirebasePushId();
    Memo1.Lines.Add(pushId);
  end;
end;