-
Content Count
6 -
Joined
-
Last visited
Community Reputation
5 NeutralTechnical Information
-
Delphi-Version
Delphi 11 Alexandria
Recent Profile Visitors
1514 profile views
-
Do you know the open-source library FB4D for connecting several Firebase services from a Delphi application by using the Firebase Rest API? See more here: https://getitnow.embarcadero.com/FB4D-1.1/ Maybe you don't have to write the connection yourself. There is also a documentation available: https://github.com/SchneiderInfosystems/FB4D/wiki
-
Android Firebase Push Notifications Patch Released
Christoph Schneider replied to Marco Cantu's topic in FMX
Thank you Dave for this valuable information. Unfortunately, my app is still not working. I still see that the Push-Service is nil because the app writes "Push Service failed" into the memo. unit Unit1; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, System.PushNotification, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Controls.Presentation, FMX.ScrollBox, FMX.Memo, FMX.StdCtrls; type TForm1 = class(TForm) Memo1: TMemo; btnStart: TButton; procedure btnStartClick(Sender: TObject); private procedure OnServiceConChange(Sender: TObject; AChange: TPushService.TChanges); procedure OnRecNot(Sender: TObject; const ANotification: TPushServiceNotification); end; var Form1: TForm1; implementation {$R *.fmx} procedure TForm1.btnStartClick(Sender: TObject); var PushService: TPushService; ServiceConnection: TPushServiceConnection; begin try PushService := TPushServiceManager.Instance.GetServiceByName(TPushService.TServiceNames.Gcm); if not assigned(PushService) then Memo1.Lines.Add('Push Service failed') else begin Memo1.Lines.Add('Push Service created'); ServiceConnection := TPushServiceConnection.Create(PushService); if not assigned(ServiceConnection) then Memo1.Lines.Add('Service Connection failed') else begin Memo1.Lines.Add('Service Connection created'); ServiceConnection.Active := true; Memo1.Lines.Add('Service Connection connected'); ServiceConnection.OnChange := OnServiceConChange; ServiceConnection.OnReceiveNotification := OnRecNot; Memo1.Lines.Add('Service Connection query'); Memo1.Lines.Add('DeviceID: ' + PushService.DeviceIDValue[TPushService.TDeviceIDNames.DeviceId]); end; end; except on e: exception do Memo1.Lines.Add('Failure: ' + e.Message); end; end; procedure TForm1.OnRecNot(Sender: TObject; const ANotification: TPushServiceNotification); var Msg: string; begin Msg := ANotification.DataObject.ToJSON; Memo1.Lines.Add('Message: ' + Msg); end; procedure TForm1.OnServiceConChange(Sender: TObject; AChange: TPushService.TChanges); var PushService: TPushService; begin if TPushService.TChange.DeviceToken in AChange then begin PushService := TPushServiceManager.Instance.GetServiceByName(TPushService.TServiceNames.Gcm); Memo1.Lines.Add('Firebase token: ' + PushService.DeviceTokenValue[TPushService.TDeviceTokenNames.DeviceToken]); end; end; end. I have enabled "Receive push notification" in the entitlement list: I have written the package name according the FB App setting: I imported my google-services.json in the Services section: What I still not understand is point 14: Why I still need to build this strings.xml and attach it to the deployments? In the new project options under Application>Services, I entered already both values (google application ID and the default sender id). Of course, I tried also the described way by using strings.xml in the deployments under remote path res\values. Thanks to your ACTED tool I was able to convert my google-services.json into the following strings.xml: <?xml version="1.0" encoding="utf-8"?> <resources> <string name="gcm_defaultSenderId" translatable="false">XXXXXXXXXX - MyNumber</string> <string name="google_app_id" translatable="false">XXXXXXXXXX - My App ID from Firebase Console</string> <string name="fcm_fallback_notification_channel_label" translatable="false">Notification channel for Firebase</string> </resources> Point 15: Changing the AndroidManifest.template.xml is no longer needed, right? Any changes in the section "Uses Permissions"? -
Android Firebase Push Notifications Patch Released
Christoph Schneider replied to Marco Cantu's topic in FMX
Is there an updated version of this good tutorial for De 10.3.2? E.g. Firebase FMX package is no longer in the GetIt Package available and probably a lot of point works now different, but I cannot find any description or tutorial. PushService := TPushServiceManager.Instance.GetServiceByName(TPushService.TServiceNames.Gcm); When I try to execute the code built with De 10.3.2 the only what I can see is that PushService is still nil after this line. Probably something is wrong with my project settings for Android. -
firebase FB4D – The OpenSource Library for Firebase
Christoph Schneider replied to Christoph Schneider's topic in Delphi Third-Party
I do not fully understand your question. As I know, there are no limits for the number of files in the Firebase storage but you need to pay when you store more than 5 GB. For more details see the official Firebase price plans at https://firebase.google.com/pricing/. -
firebase FB4D – The OpenSource Library for Firebase
Christoph Schneider replied to Christoph Schneider's topic in Delphi Third-Party
Thank you for any feedback to this library. FB4D uses generics and anonymous functions. Delphi 10 Seattle and older version does not support all language and library features which are used in FB4D. -
Christoph Schneider changed their profile photo
-
firebase FB4D – The OpenSource Library for Firebase
Christoph Schneider posted a topic in Delphi Third-Party
For the Google Cloud database Firebase, there was no complete library for Delphi. The new open source library FB4D closes this gap and supports the Firebase Realtime DB, the new Firestore DB, the Firebase Storage (for file storage) and Firebase Functions (for calling server functions). For authentication, FB4D currently supports email/password authentication and anonymous login. The library builds on the Firebase REST-API and provides all functionality with synchronous and asynchronous methods for the usage within GUI application, services and background threads. Both frameworks VCL and Firemonkey since Delphi 10 Seattle are supported. The library is a pure source code library and relies on class interfaces. https://github.com/SchneiderInfosystems/FB4D The library offers a wiki. Two example applications and a Getting-Started on the wiki will help you to start working with the library.