RICKCheckConnection is a Delphi library designed to check the state and type(Mobile only) of the connection. Using delphi's Fluent Interface.
*Pre-requisites Delphi FMX
$ boss install https://github.com/ricksolucoes/RICKCheckConnection
Add the following folders to your project, in Project > Options > Resource Compiler > Directories and Conditionals > Include file search path
../RICKCheckConnection/src
../RICKCheckConnection/src
uses RICK.Check.Connection, RICK.Check.Connection.Intefaces; implementation var LRICKCheckConnection: iRICKCheckConnection; begin LRICKCheckConnection:= TRICKCheckConnection.New; if LRICKCheckConnection.ConnectionState then Self.Fill.Color:= TAlphaColorRec.Blue else Self.Fill.Color:= TAlphaColorRec.Red; lblConn.Text:= LRICKCheckConnection.ConnectionType; end;
uses RICK.Check.Connection; implementation begin lblConn.Text:= TRICKCheckConnection.New.ConnectionType; end;
uses RICK.Check.Connection, RICK.Check.Connection.Intefaces; implementation var LRICKCheckConnection: iRICKCheckConnection; begin LRICKCheckConnection:= TRICKCheckConnection.New; LRICKCheckConnection.ClearURL.URL('https://google.com'); LRICKCheckConnection.ClearStausCode.StatusCode(200); //Status Code Defualt 400 if LRICKCheckConnection.URLState then Self.Fill.Color:= TAlphaColorRec.Blue else Self.Fill.Color:= TAlphaColorRec.Red; lblConn.Text:= LRICKCheckConnection.ConnectionType; end;