grantful
Members-
Content Count
80 -
Joined
-
Last visited
Community Reputation
3 NeutralRecent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
I been testing my app on newer android phones. I have a galaxy s7 android 8.0.0 . When I try to use the camara the app crashes. procedure TForm1.Image1Click(Sender: TObject); var Service: IFMXCameraService; Params: TParamsPhotoQuery; begin ClearUIInputs; if TPlatformServices.Current.SupportsPlatformService(IFMXCameraService, Service) then begin Params.Editable := True; Params.NeedSaveToAlbum := False; // Specifies whether to save a picture to device Photo Library Params.RequiredResolution := TSize.Create(320, 320); Params.OnDidFinishTaking := DoDidFinish; Service.TakePhoto(Image1, Params); end else ShowMessage('This device does not support the camera service'); end; MobilePermissions1.Dangerous.ReadExternalStorage := True; MobilePermissions1.Dangerous.WriteExternalStorage := True; MobilePermissions1.Dangerous.CAMERA := True; MobilePermissions1.Standard.AccessNetworkState := True; MobilePermissions1.Apply; This works fine on the newer android versions. Anyone have any thoughts. Thanks for any comments and help.
-
well on android in debug i got constructor TIdSSLContext.Create; begin inherited Create; //an exception here probably means that you are using the wrong version //of the openssl libraries. refer to comments at the top of this file. if not LoadOpenSSLLibrary then begin raise EIdOSSLCouldNotLoadSSLLibrary.Create(RSOSSLCouldNotLoadSSLLibrary); end; fVerifyMode := []; fMode := sslmUnassigned; fSessionId := 1; end; I will have to check this out
-
Thanks remy i will look into it some more tomarry after work.
-
Thanks for all comments and corrected code . Remy I was using (nil) and trying to take care of freeing the objects. I noticed you used (smpt) what advantage is there to doing it that way. Thanks i am trying to learn I am trying to use this code but on ios and android
-
i am using Delphi 11CE I am trying to send a basic email with indy; procedure SendTestEmail2; var SMTP: TIdSMTP; Message: TIdMessage; SSLHandler: TIdSSLIOHandlerSocketOpenSSL; begin SMTP := TIdSMTP.Create(nil); Message := TIdMessage.Create(nil); //SSLHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil); SSLHandler.SSLOptions.Method := sslvTLSv1_2; // or sslvTLSv1, sslvTLSv1_1, etc. try SSLHandler.SSLOptions.Method := sslvTLSv1_2; SSLHandler.SSLOptions.Mode := sslmUnassigned; SSLHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil); SMTP.IOHandler := SSLHandler; SMTP.Host := 'smtp.gmail.com'; SMTP.Port := 465; // or 465, depending on your server SMTP.UseTLS := utUseExplicitTLS; // or utUseImplicitTLS SMTP.Username := 'UserName'; SMTP.Password := 'Pass'; Message.From.Address := 'men@gmail.com'; Message.Recipients.EMailAddresses := 'grantful@yahoo.com'; Message.Subject := 'Test Subject'; Message.Body.Add('Test message.'); try SMTP.Connect; SMTP.Send(Message); except on E: Exception do begin ShowMessage('Error: ' + E.Message); end; end; finally SMTP.Free; Message.Free; SSLHandler.Free; end; end; Never worked with indy before . on the android phone i get Error Sending Email External exception 4e on my iphone i get error Sending Email: acces violation at address0000000000104b-d0788 Thanks for any help and or point me to a working example.
-
Send sqlite database file with share sheet on IOS and Android
grantful replied to grantful's topic in Cross-platform
Well Dave sorry to ask that question . I reboot my computer and start over again and it compiles. -
Send sqlite database file with share sheet on IOS and Android
grantful replied to grantful's topic in Cross-platform
Hey Dave I compiled the demo and it works great . I am trying to implement the share into my project and i am getting [DCC Error] Macapi.ObjectiveC.pas(3145): E2003 Undeclared identifier: 'SObjCClassRegistrationFailed' I have looked at the uses clause in the demo and I have the same thing in mine. I am sure i am not including something. Thanks for your help. -
Send sqlite database file with share sheet on IOS and Android
grantful replied to grantful's topic in Cross-platform
Ok thank you for your hard work with that. -
Send sqlite database file with share sheet on IOS and Android
grantful replied to grantful's topic in Cross-platform
Dave that works great. I am wondering about using a 3rd party method(component, pas, class, etc) in the app. I worried about in the future if the Kastri project will be updated to work with newer versions of Delphi . Thanks for your help -
Send sqlite database file with share sheet on IOS and Android
grantful replied to grantful's topic in Cross-platform
Thanks Dave. I thought i could send a file with the share sheet . I am trying to learn 😉 -
Send sqlite database file with share sheet on IOS and Android
grantful posted a topic in Cross-platform
I have a sqlite database file( app.s3db) in my app i wold like to send with share sheet to back up to email ,etc . I am working on a class to do this but have an error. unit ShareDatabaseFile; interface uses System.SysUtils, System.Classes, FMX.Types, FMX.Controls, FMX.MediaLibrary.Actions, FMX.Dialogs, FMX.ActnList; type TDatabaseFileSharer = class(TComponent) private FShareSheet: TShowShareSheetAction; FActionList: TActionList; procedure DoBeforeExecute(Sender: TObject); // Declaration public constructor Create(AOwner: TComponent); override; destructor Destroy; override; procedure ShareDatabaseFile; end; implementation uses System.IOUtils; { TDatabaseFileSharer } constructor TDatabaseFileSharer.Create(AOwner: TComponent); begin inherited; FActionList := TActionList.Create(Self); FShareSheet := TShowShareSheetAction.Create(Self); FShareSheet.ActionList := FActionList; FShareSheet.OnBeforeExecute := DoBeforeExecute; // Assignment end; destructor TDatabaseFileSharer.Destroy; begin FShareSheet.Free; FActionList.Free; inherited; end; procedure TDatabaseFileSharer.DoBeforeExecute(Sender: TObject); // Implementation var DatabaseFilePath: string; begin DatabaseFilePath := TPath.Combine(TPath.GetDocumentsPath, 'mydatabase.db'); if TFile.Exists(DatabaseFilePath) then begin FShareSheet.SharedFileName := DatabaseFilePath; end else begin ShowMessage('Database file not found.'); Abort; end; end; procedure TDatabaseFileSharer.ShareDatabaseFile; begin FShareSheet.ExecuteTarget(nil); end; end. I am getting undeclared identifier procedure TDatabaseFileSharer.DoBeforeExecute(Sender: TObject); // Implementation var DatabaseFilePath: string; begin DatabaseFilePath := TPath.Combine(TPath.GetDocumentsPath, 'mydatabase.db'); if TFile.Exists(DatabaseFilePath) then begin FShareSheet.SharedFileName := DatabaseFilePath; end else begin ShowMessage('Database file not found.'); Abort; end; end; here is the error FShareSheet.SharedFileName is the undeclared identifier. so the .sharedFileName is the issue. i am looking in the FMX.MediaLibrary.Actions and can not see anything about the shared file name. Thanks for any help. -
Is there a way to longclick an item in a listbox ? I need it for IOS and Android. Thanks
-
Thank you Dave
-
I need to use the iOS scan text feature on my iPhone . https://support.apple.com/guide/iphone/scan-text-and-documents-iph653f28965/ios I am just wondering is there a way to access this and use it in my iOS app thanks
-
Thanks for that info Patrick . I figured there was a good way to do that.