Jump to content

bzwirs

Members
  • Content Count

    53
  • Joined

  • Last visited

Everything posted by bzwirs

  1. Have recompiled an app for Android with Delphi 11.3 and now get the following error when entering numbers into a dbdatagrid (Firepower) and tmsfnc edit control (in both cases have keyboard set to numberpad): Eval Error in: java.lang.indexoutofboundsexception setspan(3...3) ends beyond length 1. The error only occurs on Android tablet - not on Windows version. Have never seen this error before under previous versions of Delphi. Can someone please shed some light on this problem and point me in the right direction to fix it. Bill
  2. I am having a problem using the PDFControl on Android device. Have followed the example code for using the PDFControl in demo provided by Kastri but all I get is the PDF displayed in a narrow vertical area (small, about 10mm wide) up the middle of the screen. In the onCreate event I have placed if TOSVersion.Platform = TOSVersion.TPlatform.pfAndroid then begin FPDFControl := TPDFControl.Create(Self); FPDFControl.Align := TAlignLayout.Client; FPDFControl.Parent := TabItem17; end; The PDF needs to be displayed in TabItem17 of a TabControl. TabItem17 has nothing on it except for a TLayout at bottom of screen with a button to enable return to another TabItem. Following is the code used to load and display the PDF procedure TMainForm.Display_PDF(const sFile : string); begin {$IF DEFINED(ANDROID)} if FPDFControl <> nil then FPDFControl.LoadPDF(sFile); TabControl1.SetActiveTabWithTransition(TabItem17,TTabTransition.Slide, TTabTransitionDirection.Normal); {$ENDIF} {$ifdef win32} PDFBrowser.Navigate('file://' + sFile); TabControl1.SetActiveTabWithTransition(TabItem13,TTabTransition.Slide, TTabTransitionDirection.Normal); {$ENDIF} end; Can anybody please help with what I need to do to display the PDF properly. Thanks in advance. Bill Zwirs
  3. bzwirs

    Problem using Kastri PDFControl

    Thank you Rollo and Dave. Added a delay value of 50 to the forcequeue (as suggested by Rollo in earlier post) and all seems to be working correctly now. Bill Zwirs
  4. bzwirs

    Problem using Kastri PDFControl

    I think I didn't explain very clearly. Where I state 'creating the PDF', I am talking about creating a PDF document and then directly calling the PDFControl LoadPDF method to display the document. Bill Zwirs
  5. bzwirs

    Problem using Kastri PDFControl

    That works but still getting the narrow vertical print randomly. If pdf already exists then shows ok but if LoadPDF is called directly after creating the PDF then still getting the narrow view occasionally (exit out and view again and all ok). Any way around this behavior? Bill Zwirs
  6. bzwirs

    Problem using Kastri PDFControl

    Since upgrade to Delphi 12.2 I am getting the PDF displayed in a narrow vertical area in middle of screen again. Have downloaded latest Kastri but that didn't fix the issue. Any ideas?? Bill Zwirs
  7. bzwirs

    Unsupported Pixal Format

    Delphi 11.2 I use Winsoft Pdfium for FireMonkey to create a PDF that includes a graphic (png saved to a SQLite table field). The graphic is inserted into the pdf document (as the document is being created) with the following code: Sig := tMemoryStream.Create; try MarafillerDM.EMUInvQrySIGNATURE.SaveToStream(Sig); var aBitMap := FMX.Graphics.TBitmap.Create; try aBitMap.LoadFromStream(Sig); MarafillerDM.FPdf1.AddPicture(aBitMap,18,135,230,80); finally aBitMap.Free; end; finally Sig.Free; end; Up until a couple of weeks ago this worked for both Windows and Android without any problems but now I get an 'Unsupported Pixal Format' error from the Winsoft AddPicture procedure - but only on Android devices (Samsung Tab 6 Lite). On Windows it still works fine. Haven't changed anything in my Delphi environment (updates etc) between it working and not working. Has anyone else experienced this. Would appreciate any help with this issue. Bill Zwirs
  8. Installed 12.2 4 days ago and after install I used Getit to install a component and all worked Ok. Next day (and every day since) I have started Getit and keep getting 'No Results Found', even though it shows results in the 'New In Getit' and 'Promoted In Getit' sections of the welcome page. Is anybody else having this problem or is Getit simply not working at the moment? Bill Zwirs
  9. bzwirs

    Getit Package Manager working?

    Yes. I was getting that message for all filter options. Have just re-installed Delphi 12.2 and all seems to be working correctly now. Bill Zwirs
  10. bzwirs

    Problem using Kastri PDFControl

    Fixed the background colour problem by placing a TMSFNCPanel component on the TabItem and changing the FPDFControl.Parent to the panel name. The PDF now displays with a proper white background. Bill Zwirs
  11. bzwirs

    Problem using Kastri PDFControl

    Thanks. Reversed the calls as suggested and that now works for me also. But has now raised another issue. The displayed PDF now adopts the background colour of the style set for the application instead of a white background. I've tried to play with the Opacity property of the FPDFControl which doesn't solve the problem and not sure what else to try. Any suggestions? Bill Zwirs
  12. Delphi 12 with latest updates. I want to use a firebird database on android device. Firebird supply a 'Firebird-5.0.0.1306-0-android-arm64.tar.gz' file for working with android but no information on how to use the files contained therein. Can anybody please point me in the right direction on examples on how to achieve this, Thanks in advance Bill Zwirs
  13. bzwirs

    Firebird database on Android

    Thank you all for your responses. Think I'll use sqlite this time and wait a bit longer for Firebird. thanks Bill
  14. I am trying to parse a json response to retrieve a nested record without any success. Example of the json response is: { "status": "1", "info": "success", "page_info": { "total_page": "1", "record_per_page": "1", "current_page": "1", "total_record": "1" }, "records": [ { "machine_id": "25884", "imei": "", "install_date": "", "last_report": "", ....... ....... "coin_mech": { "coin_mech_id": "12345", "cm_model": "", "serial_no": "", "revision": "", "coin_in_tube": "", "tubes": [ { "tube_id": "3469107", "tube_no": "4", "coin_unit": "100", "coin_count": "93", "coin_inserted": "0", "coin_dispensed": "0", "tube_full": "0" }, { "tube_id": "3469105", "tube_no": "5", "coin_unit": "200", "coin_count": "9", "coin_inserted": "0", "coin_dispensed": "0", "tube_full": "0" } ] } }] } The info I am after is the records for "tubes" which can contain up to 5 records (2 in the above example) . Have tried several of the coding examples that I found in stackoverflow without success although I have not found an example with a similar record structure. Can someone please advise me on how to retrieve those records (would be great if in a dataset). Thanks in advance. Bill Zwirs
  15. bzwirs

    SMTP on Android

    Is it possible to use smtp on android to send multiple emails with attachments and are there any examples of this available. I don't want the email client popping up for each email .... just all done in the background. Thanks in advance. Bill Zwirs
  16. bzwirs

    SMTP on Android

    Remy and DelphiUdIT Have changed loading .so files to "library\lib\arm64-v8a\" and all appears to be working now. OpenSSLVersion now reports as "OpenSSL 1.0.2s-fips 28 May 2019". Previously I was just getting an empty string so maybe assume I was doing something wrong. Thanks for all your help. Bill Zwirs
  17. bzwirs

    SMTP on Android

    Several years ago I googled on the same issue and all I could find at the time was advise that it could not be done and needed to use Android Intents which called the mail client. This solution was Ok at the time as it would only be occasionally used in the app. But now I need to be able to send multiple emails so don't want the mail client popping up for each so asked the question in case things had changed. By the way, I am using Delphi 12 with latest updates. Since your reply I have been trying to use the Indy approach and found a post on Stackoverflow and followed the following advice: Add the 2 .so files to your project deployment and set them to deploy to the .\assets\internal\ folder add the System.StartupCopy unit as the first unit in your DPR's uses clause. call IdOpenSSLSetLibPath(TPath.GetDocumentsPath) at app startup. I am using the 64bit files included in openssl-1.0.2s_Android and keep getting the 'could not load SSL library' error. I have used FileExists to check if file (just for one of the files) is there. Here is the code I use in the OnFormCreate event. Compiled for Android64. Is there anything else I can try to make this work. Bill Zwirs
  18. bzwirs

    TAlphaColorRec in Android

    Delphi 11.2 Winsoft PDFium In app for Windows and Android I am using PDFium to create an invoice as a PDF. Included In the PDF are 2 lines of text that are colored red and one rectangle filled with color blue. Using PDFium I need to use TAlphaColorRec.Red and TAlphaColorRec.Blue to display the color on the PDF. This works fine on Windows but when compiled for Android the text colour shows as blue and the rectangle fill color is red (ie. opposite of the selected colors). Reversing the colors fixes the problem for Android but would appreciate if someone can please explain why this would happen. Thanks Bill Zwirs
  19. bzwirs

    java.lang.indexoutofboundsexception

    At the time I had this problem I ended up going to the component creators of the components where I was having this issue (Woll2Woll for the datagrid and TMS for the TMS Edit component). Both provided updates that fixed the problem.
  20. Using Delphi 12, Woll2Woll Firepower Data Grid, Firedac Query, SQLite DB Have an app that has been used for couple of years without any significant issues until recent compile with Delphi 12. The issue is with editing an integer field in a Firepower data grid. For the field keyboard type I have selected the numberpad type. Previously users have always been able to select the minus sign to input a negative number but this no longer works since the last compile for Android. Can anybody please help with advice on how to fix this issue. Bill Zwirs
  21. Today I added a TEdit component to the grid for the column with the integer field but again, still cannot enter a negative number from the numberpad on Android.
  22. Yes they do plus you can add other edit components. So this may be a Woll2Woll issue as the app compile now uses the latest Firepower components update for Delphi 12 and there were no problems with the earlier versions. I will add a post to their forum. Thanks.
  23. Simply Datasource linked to Woll2Woll Firepower grid. No additional edit components.
  24. Hi, Ended up using example from aehimself. That was the easiest to implement in my app and worked straight away. regards Bill
  25. Thank you to all. This gives me a lot to try so will let you know at a later date whatever has ended up working for me. Thanks again to everyone. regards Bill Zwirs
×