We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unit Unit1; interface uses System.SysUtils, System.Classes, System.Android.Service, AndroidApi.JNI.GraphicsContentViewText, Androidapi.JNI.Os, AndroidServiceMethod; type TDM = class(TAndroidService) procedure AndroidServiceCreate(Sender: TObject); function AndroidServiceStartCommand(const Sender: TObject; const Intent: JIntent; Flags, StartId: Integer): Integer; private { Private declarations } public { Public declarations } end; var DM: TDM; implementation {%CLASSGROUP 'FMX.Controls.TControl'} {$R *.dfm} procedure TDM.Notification_Push; begin ///---> Code.... end; procedure TDM.AndroidServiceCreate(Sender: TObject); begin AndroidServiceMethod.ServiceLoop(Notification_Push) end; function TDM.AndroidServiceStartCommand(const Sender: TObject; const Intent: JIntent; Flags, StartId: Integer): Integer; begin Result := TJService.JavaClass.START_STICKY; end; end.
unit Unit1;
interface
uses System.SysUtils, System.Classes, System.Android.Service, AndroidApi.JNI.GraphicsContentViewText, Androidapi.JNI.Os, AndroidServiceMethod;
type TDM = class(TAndroidService) procedure AndroidServiceCreate(Sender: TObject); function AndroidServiceStartCommand(const Sender: TObject; const Intent: JIntent; Flags, StartId: Integer): Integer; private { Private declarations } public { Public declarations } end;
var DM: TDM;
implementation
{%CLASSGROUP 'FMX.Controls.TControl'}
{$R *.dfm}
procedure TDM.Notification_Push; begin ///---> Code.... end;
procedure TDM.AndroidServiceCreate(Sender: TObject); begin AndroidServiceMethod.ServiceLoop(Notification_Push) end;
function TDM.AndroidServiceStartCommand(const Sender: TObject; const Intent: JIntent; Flags, StartId: Integer): Integer; begin Result := TJService.JavaClass.START_STICKY; end;
end.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: