Jump to content

Yaron

Members
  • Content Count

    286
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Yaron


  1. 17 minutes ago, Lars Fosdal said:

    You have to manually delete the overriding values that you put in earlier.

    For version info - you need to change the values to match "all config".
    After that, the debug/release version will follow the "all config" values.

    I tried that, it didn't work.

    Perhaps I didn't understand what you mean by "manually delete", I just used the project dialog to make sure all entries across debug/release/all configuration were the same and then changed the value on 'all configurations' to see if it affects the 'release configuration' (which it didn't).


  2. For some reason, any data I entered under the Project Options version info's "all configuration" entries is not actually applied to the release/debug sections.

     

    And later on, I couldn't upload to the play store, because it was seeing the old version number from the "release" section.

     

    Is it just me, or am I misunderstanding what the "all configuration" entries actually do (I was assuming it was applying whatever I entered into both release/debug profiles so I don't have to do everything twice).


  3. On 11/25/2019 at 1:04 PM, Dave Nottage said:

    I've managed to come up with something without having to patch FMX.WebBrowser.Android, but it still required Java code. I've put a demo here:

     

      https://github.com/DelphiWorlds/KastriFree/tree/master/Demos/WebBrowserFileChooser

     

    Note that it relies on other units in the Kastri Free project:

     

      https://github.com/DelphiWorlds/KastriFree

     

    ..including the compiled .jar, so you might want to just clone the repo and load the demo from it.

     

    The demo project seems to work, but when porting the snippet into my own code I'm catching an exception when calling "FWebManager := TWebChromeClientManager.Create(VoucherimWebBrowser);" :

    "Error creating FWebManager : java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.ClassLoader java.lang.Class.getClassLoader()' on a null object reference"

     

    Other than renaming the variables/components, I used the exact same OnCreate override as in the sample and just added an "FWebManager := nil" when closing the app.

    You mentioned including the jar file, but I haven't seen anything in particular in the demo itself, so I'm assuming it's included by one of the units (which I also included in my project).

     

    Any ideas?  If needed, I can post the entire source code for this app, it's just a wrapper around a web site.

     

    Unrelated, I get a hint while compiling:

    [DCC Hint] DW.WebChromeClient.Android.pas(98): H2443 Inline function 'TAndroidHelper.GetJActivity' has not been expanded because unit 'Androidapi.JNI.App' is not specified in USES list

     

    • Like 1

  4. Just for reference, my current logic is to resize the UI after an OnIdle event but not before an "TApplicationEvent.BecameActive" event triggers first.

    Seems to work, but I'm not perfectly confident that it works across every device.

     

    Oh, you may also notice something odd with the last resize event, the form's WindowState value was changed to "TWindowState.wsMinimized" even though the app is fullscreen.

    Perhaps this has something to do with the app being run on a phone with a notch.


  5. On 6/13/2019 at 8:59 AM, Mavarik said:

    Simple...
    After the Resize event - wait for application.onIdle - then check clientWight/Height.

     

    Frank

    That doesn't work, check out this log, a form resize event is triggered AFTER the first OnIdle event.
     

    Quote

     

    11-26 16:52:11.080    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: FormCreate (before)
    11-26 16:52:11.091    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: Screen Scale                    "3"
    11-26 16:52:11.091    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: clientScreenSize                "1080x2115"
    11-26 16:52:11.091    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: IFMXScreenService.GetScreenSize "360x705"
    11-26 16:52:11.091    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: Screen                          "360x705"
    11-26 16:52:11.091    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: Display Pixel                   "1080x2340"
    11-26 16:52:11.091    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: Display Scaled                  "360x780"
    11-26 16:52:11.108    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: FormCreate (after)

    11-26 16:52:11.108    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: FormResize (before)
    11-26 16:52:11.109    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: Client "Width x Height"         : 360x678
    11-26 16:52:11.110    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: Client With Scale               : 1080x2034
    11-26 16:52:11.110    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: Windows State                   : 0
    11-26 16:52:11.110    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: FormResize (after)

    11-26 16:52:11.112    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: FormResize (before)
    11-26 16:52:11.112    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: Client "Width x Height"         : 360x705
    11-26 16:52:11.112    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: Client With Scale               : 1080x2115
    11-26 16:52:11.112    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: Windows State                   : 0
    11-26 16:52:11.112    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: FormResize (after)

    11-26 16:52:11.119    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: FormResize (before)
    11-26 16:52:11.119    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: Client "Width x Height"         : 360x678
    11-26 16:52:11.120    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: Client With Scale               : 1080x2034
    11-26 16:52:11.120    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: Windows State                   : 0
    11-26 16:52:11.120    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: FormResize (after)

     

    11-26 16:52:11.175    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: OnIdle Event

     

    11-26 16:52:11.175    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: Resize UI (before)
    11-26 16:52:11.309    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: Resize UI (after)


    11-26 16:52:11.370    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: FormResize (before)
    11-26 16:52:11.370    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: Client "Width x Height"         : 360x753
    11-26 16:52:11.370    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: Client With Scale               : 1080x2259
    11-26 16:52:11.370    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: Windows State                   : 1
    11-26 16:52:11.370    18363    18363    com.inmatrix.ZP_Remote    I    info    FMX: ZP_Remote: ZPR_DBG: FormResize (after)


     

     


  6. 12 minutes ago, Stefan Glienke said:

    If there are no generics it's a different issue than RSP-27000.

    You are right, I was able to fix this de-sync issue by going line by line doing cut, paste, cut, paste (copy/paste entire blocks did not work).

    Strangely enough, I compared the file before/after the fix and the files are identical?!


  7. 13 minutes ago, Stefan Glienke said:

    I just tested it and reduced the code further to pinpoint the wrong behavior, added additional information and reported as RSP-27000

    I'm also experiencing this issue, at first I thought it was the issue where unicode characters entered the code by a copy & paste operation (which in the past lead to cases where the debug/code got desynched by a few lines).  However, I did my usual fix for that issue (Copy/paste/convert to ascii), but it didn't work this time.

     

    The strange thing for me is that this de-sync starts to happens BEFORE any actual functional code and the increases further down the code, check out the included screenshot.

    debugger_desync.png


  8. I'm getting a new issue with the debugger, it's reproducible for me every time (in a specific bit of code in a larger project) and freezes the IDE with the "Local Variables" pane flickering like crazy until I terminate the process.

     

    1. I Call this function "PrepareURL('mailto:bla@bla.org',URLTypeEMail)" (see below).

    2. Place a breakpoint before the case in the function below.

    3. Open the "Evaluate/Modify window" and type in "sURL".

    4. Change the value of sURL from "mailto:bla@bla.org" to "bla@bla.org".

    5. IDE freaks out.
     

    function  PrepareURL(sURL : String; sURLType : Integer) : String;
    begin
      Case sURLType of
        URLTypeWebSite : If Pos('://',sURL)                = 0 then Result := 'https://'+sURL else Result := sURL;
        URLTypeEMail   : If Pos('mailto:',Lowercase(sURL)) = 0 then Result := 'mailto:'+sURL  else Result := sURL;
        URLTypePhone   : If Pos('tel:',Lowercase(sURL))    = 0 then Result := 'tel:'+sURL     else Result := sURL;
        else Result := '';
      End;
    end;

    However, it doesn't happen in a clean project, something else is involved too and I'm not sure what.


  9. I use an FMX TWebBrowser component with Android to display a web form.

    The form is used to upload an image to a web server, however, after loading the web-page, clicking on the form's "Browse" button does absolutely nothing.

    Ideally, I would want Android to trigger the gallery app to select a picture for upload (like it does if I open the same URL with chrome/firefox), any ideas?


  10. After doing a clean install of Delphi 10.3.3, I had to re-install mars, so I did a zip download directly from GitHub and on a re-compile, it still shows 3 hints:

    [dcc32 Hint] MARS.Core.MessageBodyReaders.pas(302): H2443 Inline function 'TJSONArray.GetValue' has not been expanded because unit 'System.Generics.Collections' is not specified in USES list
    [dcc32 Hint] MARS.Core.MessageBodyReaders.pas(366): H2443 Inline function 'TJSONArray.GetValue' has not been expanded because unit 'System.Generics.Collections' is not specified in USES list
    [dcc32 Hint] MARS.Data.Utils.pas(213): H2443 Inline function 'TJSONArray.AddElement' has not been expanded because unit 'System.JSON' is not specified in USES list

    I of course fixed it myself in a few seconds, just an FYI.

    • Like 1

  11. FYI for people re-installing:

    After a complete uninstall, I did a search of *embarcadero*.* on my system drive and found over 30GB of left-overs (from v10.2 and 10.3), which included a copy of interbase, the entire rad studio and sample files I choose to install in a non-default folder.

    I actually did several install/uninstall cycles with just v10.3.3 and each time it left a large group of files behind (~2.5gb), so the uninstall process is far from clean.

    Just be careful when erasing some of these folders as they may contain your license information.


  12. I uninstalled everything (including java) and installed clean from the ISO, at the end it was written to click finish and the microsoft sdk installer will execute, but it didn't.

     

    I then tried to compile an Android application that compiled just fine with the 10.3.3 beta and I get this:

    Quote

    [Exec Error] The command "PATH C:\Program Files\Java\jdk1.8.0_60\bin;C:\Users\Public\Documents\Embarcadero\InterBase\redist\InterBase2017\IDE_spoof;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Embarcadero\Studio\20.0\bin;C:\Users\Yaron\Documents\Embarcadero\Studio\20.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\20.0\bin64;C:\Users\Yaron\Documents\Embarcadero\Studio\20.0\Bpl\Win64;C:\Program Files (x86)\Embarcadero\Studio\20.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\20.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\20.0\Bpl\Win64;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Yaron\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Yaron\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\19.0\Bpl\Win64;C:\Program Files (x86)\Borland\Delphi7\Bin;C:\Program Files (x86)\Borland\Delphi7\Projects\Bpl\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\archive;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\Subversion\bin;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Git\cmd;C:\Program Files\TortoiseGit\bin;C:\Android & "C:\Users\Public\Documents\Embarcadero\Studio\20.0\PlatformSDKs\android-sdk-windows\build-tools\28.0.2\dx.bat" --dex --output="Z:\VoucherimApp\Android\Release\classes.dex" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\android-support-v4.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\cloud-messaging.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-android-gms.play-services-ads-base.17.2.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-android-gms.play-services-ads.17.2.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-android-gms.play-services-analytics.16.0.8.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-android-gms.play-services-base.16.0.1.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-android-gms.play-services-basement.16.2.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-android-gms.play-services-gass.17.2.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-android-gms.play-services-identity.16.0.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-android-gms.play-services-maps.16.1.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-android-gms.play-services-stats.16.0.1.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-android-gms.play-services-tasks.16.0.1.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-android-gms.play-services-wallet.16.0.1.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-firebase.firebase-analytics.16.4.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-firebase.firebase-common.16.1.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-firebase.firebase-iid-interop.16.0.1.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-firebase.firebase-iid.17.1.1.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\com-google-firebase.firebase-messaging.17.5.0.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\fmx.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\google-play-billing.dex.jar" "c:\program files (x86)\embarcadero\studio\20.0\lib\android\Release\google-play-licensing.dex.jar" " exited with code 3.

     

    Do I need to install Java separately from the Delphi ISO?

    Under "c:\Program Files\Java\" I can see "jdk1.8.0_60" and "jre1.8.0_60" populated folders that were created by the Delphi installer.

×