Jump to content

Yaron

Members
  • Content Count

    275
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Yaron


  1. 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)


     

     


  2. 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?!


  3. 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


  4. 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.


  5. 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?


  6. 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

  7. 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.


  8. 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.


  9. Recently upgrading to Android 10, I notice a few weird inconsistencies with the various App icons.

     

    It seems that the icon embedded in the App's APK is either ignored (replaced by an icon from an icon pack depending on whichever launcher is in use), shrunk down and fitting into some shape (circle, round-rect, etc) and even when shrunk into a shape, some icons are circle-cropped while other are just squares (with the embedded icon being either a square or a round-rect).

     

    Is there a manifest entry that lets the launchers know I just want my app's icon to display as-designed?

    Untitled-1.jpg

    • Like 1

  10. 5 minutes ago, Rollo62 said:

    I just tried that out, with same app, compiled to 32-Bit and 64-Bit.
    1. I uploaded 64-Bit version to internal test: All OK
    2. I uploaded 32-Bit version to internal test: Failure: "You have already uploade app with same version code"

     

    This is what I expected, so if you says its possible to upload separate 64- and 32-Bit apps, can please explain how ?
    Of coarse I could upload 32-Bit with new version code, but isn't this new version then overriding the 64-version as well ?

    I doubt it will override the 64bit version, they request the version be the same to prevent people from releasing mismatched versions by accident.

     


  11. On 11/6/2019 at 1:24 PM, Marco Cantu said:

    We see a lot of recent Android devices with 64-bit CPUs but 32-bit OS. Odd, I know, I wasn't aware is this was so widespread.

     

    As for emulators, the issue is they are mostly Intel-based, so Java apps run fine, but native ones require a ARM emulator like libHoudini (this was an Intel library, but I think they stopped all development since they exit the Android world)

    Then using Android Tools, how should we configure an emulator?

    I assume none of the x86 images would work (e.g. "Google APIs Intel x86 Atom_64 System Image").

    This leaves the latest ARM system image, which only supports Android 7.1.1.


  12. This is probably not high priority, but I thought I'd make a note of it,

     

    If the drive running the application version of a mars project is removed, trying to close the app crashes, even if the drive is re-attached before closing.

    I suspect it's due to the file handles being invalidated.

     

    It happens to me because I debug mars from an encrypted drive that is automatically detached after several hours.


  13. Regardless of the upcoming version, you must include both 32bit and 64bit APK files otherwise your app will not work on some devices.

     

    I'm not sure if the play store allows you to upload separate APK files or you must upload an AppBundle.


  14. So far I tried the following emulators:

    1. Nox 6 (Android 7.1.x)

    2. BlueStacks 4 (Android 7.1.x)

    3. VirtualBox with Android v8.1 64bit image (https://www.osboxes.org/android-x86/)

     

    For some strange reason, none of them will even run the 32bit versions of a blank Delphi cross-platform app.

    This is on a clean install of Delphi with a clean install of a fully patched Win10 running in a VM.

     

    I guess my only course of action right now would be to buy a somewhat high-end device to be able to test 64bit development, but I would welcome any suggestions of a cheaper course.


  15. On 3/13/2019 at 12:46 PM, ByteJuggler said:

    I have recently (last couple of days) been (re)-introduced to the wonderful world of (trying to) get set up with an emulator to do Android development with Delphi.   🙂😞😫

     

    (Had lots of fun and games trying to make the default Android SDK emulators work  ... eventually started looking into alternatives including Nox... hence my response to this post)

     

    Suffice it to say that:

    • I can successfully run .apk's produced with my newly recently installed 10.3.1 Rio installation by dragging and dropping the .apk onto Nox version 6.2.7.1. 

     

    Are you running Nox with the Android 7 image?  By default Nox will run with older versions of Android.


  16. Just now, Cristian Peța said:

    Running in 32 bit mode and accessing more than 4GB....

    I thought this is a relic of an ancient era.

    I wouldn't be surprised if the tablet has 6GB but only 4GB is addressable.

    Chinese tablets can be funny that way, like them marketing the resolution as 1900x1200, while in reality it's 1280x800 but with a scale factor that makes it appear to be 1900x1200.


  17. 59 minutes ago, Dave Nottage said:

    Yaron didn't mention a requirement of > 4GB memory; he was talking about devices with 64-bit processors.

     

    Most devices manufactured since late 2014 are 64-bit, so choose one that was made since then, but always check by Googling the device info. It would be very unusual for a 64-bit device with Android 5 or greater to have a 32-bit version of Android.

     

    Last year, I bought a cheap Chinese (CARBAYTA S119) tablet, 6GB RAM, Android 9 to verify that my apps work on the latest Android version and to play with tablet layouts.

    It has a 64bit octa-core chip, but still runs Android 32bit.

     

    Also, My Galaxy Note 4 runs Android 6.0.1 32bit, so the version of Android doesn't seem to matter either.


  18. Now that 64bit is just around the corner, I recently found out that I'm lacking the 64bit hardware to test it (even on hardware with 64bit processor, it was running 32bit android).

    What's more frustrating is that it's hard to even know in advance if a device supports 64bit.

    Sure, it may have a 64bit processor, but is that processor running a 64bit version of Android?  I couldn't find out for a few models I looked into.

     

    I also tried the Nox emulator, but sadly, I can't get any Delphi APK to run on it (when emulating Android 7, the most recent version supported by Nox), the app just closes unexpectedly right after the splash screen on an empty app (new blank project -> compile).

     

    Any cheap & recommended device for testing 64bit?  Any other 64bit android emulation framework that works reliably?


  19. I just looked at FGX, it doesn't look like it supports an alternative to TWebBrowser.

     

    And I would like to stick with Delphi, I have developed a lot for it and have a lot of pre-built support code that allows me to quickly prototype.

    Otherwise I would have already moved to ReactJS, Kotlin or Flutter as you mentioned.

     

    • Like 1
×