Jump to content

Hans♫

Members
  • Content Count

    130
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by Hans♫


  1. We already use a new installation of Delphi 11.3 Patch 1, but it targets API level 32. It installs this:

    file:///C:/Users/Public/Documents/Embarcadero/Studio/22.0/CatalogRepository/AndroidSDK-2525-22.0.47991.2819/platforms/android-32

     

    What did you do to target API level 33?

     

    PS. It is installed on a VM that had Delphi 11.2, but upon installation of Delphi 11.3 it uninstalled 11.2 first.

    • Like 2

  2. Interesting what happens when the Vietnamese language is chosen. I created this issue 7 years ago, about another error that I had only seen on Vietnamese:

    https://quality.embarcadero.com/browse/RSP-16205

     

    It could be related to your problem because my reported error is that TPath.GetTempPath fails in Vietnamese.

     

    PS. I don't understand Vietnamese, but we have customers from Vietnam and had to make a workaround for the issue.

    • Like 1

  3. We use this function (I modified it here to avoid using external references, but I think it will be correct as written here):

     

    function OSGetUserDesktopPath: string;
    begin
    {$ifdef MSWINDOWS}
      winApiUtils.GetFolderPath(CSIDL_DESKTOPDIRECTORY,Result);
      result := result+TPath.PathSeparator;
    {$elseif defined(OSX)}
      Result := TPath.GetHomePath+TPath.PathSeparator+'Desktop'+TPath.PathSeparator;
    {$elseif defined(IOS)}
      Assert(false, 'OSGetUserDesktopPath not implemented on IOS');
      Result := '';
    {$elseif defined(ANDROID)}
      Assert(false, 'OSGetUserDesktopPath not implemented on ANDROID');
      Result := '';
    {$else}
      {$Message Error 'Missing Target'}
    {$endif}
    end;

     


  4. We just released a new update of our software yesterday, built with Delphi 11.2. Unfortunately our customers now complains that keyboard shortcuts no longer works.

    This has already been reported in quality portal, but unfortunately we did not discover this in time:

    https://quality.embarcadero.com/browse/RSP-39902

     

    The problem happens in Actions with all F1 - F12 shortcuts, numerical keyboard shortcuts and more. 

    Except from that, our Delphi 11.2 built app works well on all platforms (Windows, Mac, Android and iOS).

    • Like 1

  5. This is the first time I install a Delphi 11 version on my computer, having used Delphi 10.4 so far.

    The installation runs until the page where I should choose what platforms to install (see image). First time I actually did see the list, but as soon as I checked additional options (maybe at the time where I checked iOS target, not sure), it crashed.

    Having uninstalled and installed again several times, but always the same result: Both web installer and ISO installer. Both as Administrator or not. All Delphi 11 editions, 11.0, 11.1 and 11.2. 

     

    I am on Windows 10, latest update, and have Delphi 10.4 on the computer with all taget platforms installed and in use (Win, OSX, iOS and Android). Something may be interfering?

     

    Any ideas what to try?

    Screenshot_2.jpg


  6. We have made the "SetSystemText" function below, to replace the hardcoded dialog strings. It works on all platforms including iOS and Android (thought we have had problems with only a partial implementation in MacOS in previous Delphi versions - not sure if it has been fully implemented yet).

     

    It is a part of our own language handling class, but the idea is that fLines is a list of text lines loaded from a language file, where the ID is defined by a constant. Just replace this with your own source of translations.

    The "LoadLangFromStrings" procedure is in FMX.Types.


     

    procedure tProgStr.SetSystemText;
    var lStrList: TStringList;
    begin
    //Load list of translations for use everywhere the "Translate" function is used in Delphi.
      lStrList := TStringList.Create;
      lStrList.AddPair(SMsgDlgInformation, fLines[cStrInformation]);
      lStrList.AddPair(SMsgDlgError,       fLines[cStrError]);
      lStrList.AddPair(SMsgDlgConfirm,     fLines[cStrConfirmation]);
      lStrList.AddPair(SMsgDlgWarning,     fLines[cStrConfirmation]); //<- We don't have the "Warning" text translated
      lStrList.AddPair(SMsgDlgYes,         fLines[cStrYes]);
      lStrList.AddPair(SMsgDlgNo,          fLines[cStrNo]);
      lStrList.AddPair(SMsgDlgCancel,      fLines[cStrCancel]);
      lStrList.AddPair(SMsgDlgClose,       fLines[cStrClose]);
      lStrList.AddPair(SMsgDlgOK,          fLines[cStrOk]);
      lStrList.AddPair(SMsgDlgHelp,        fLines[cStrHelp]);
      lStrList.AddPair(SMsgDlgHelpHelp,    fLines[cStrHelp]);
    
      LoadLangFromStrings(lStrList);
      lStrList.Free;
    end;

     

    • Thanks 1

  7. We have a few users that experience freezing and very slow response in our Android App. In Google Play Console, we get these ANR messages:

    Quote

     

    Input dispatching timed out (b3a5d35 com.company.android/com.embarcadero.firemonkey.FMXNativeActivity (server) is not responding. Waited 10002ms for FocusEvent(hasFocus=false))
    Input dispatching timed out (1ee297b com.company.android/com.embarcadero.firemonkey.FMXNativeActivity (server) is not responding. Waited 10002ms for MotionEvent)
    Input dispatching timed out (34bd534 com.company.android/com.embarcadero.firemonkey.FMXNativeActivity (server) is not responding. Waited 10000ms for MotionEvent)

     

    The app works on 99% of the devices, so it is not a general problem, and we cannot reproduce it on our devices.

    What can be the reason for these problems?

     

    Another user has posted a StackOverflow question about this a year ago - but no answers:
    https://stackoverflow.com/questions/66657413/how-to-solve-anr-on-android-firemonkey

     

    PS. Could it be related to this warning ("Non-SDK API: Landroid/view/MotionEvent") that we also have?
    https://stackoverflow.com/questions/70350726/delphi-11-app-in-android-play-store-shows-warning-non-sdk-api

     


  8. Thanks Dave!

    To achieve the best user experience we would like to use the install-time assets. We need to extract a 150 MB binary file to be accessed using traditional file methods, and had hoped that your demo app also supported install-time assets. As you mention, the only part missing is to extract and save the file using AssetManager.

    Any chance that this could find it way into your demo project?


  9. Hi Dave,

     

    Thanks for your reply, it's greatly appreciated.

    Now Video1 and Video3 get downloaded when adding the call to FAssetDelivery.Fetch in the IdleMessageHandler. So the fast-follow & on-demand delivery modes both work correctly. And the videos are playing as well.

     

    However, the install-time asset Video2 still does not show up. But I wouldn't have expected that the above fix would have solved that either. You write in the code:

    //!!!! Install time packs are just "normal" assets

    Do you see Video2 showing up in your app?

     

    Maybe I'm wrong but as I read the android developer documentation the install-time asset pack will be available immediately at app launch, but that's only the apk and you need to access the assets in it thru the AssetManager API. See this diagram

     

    I assume the solution in our case could be to use AssetManager API stream interface to make a copy of the file in a temporary location.

    Do you agree?

     

    Thanks again for your help!


  10. Hi Dave

    I've managed to successfully build and install the AssetDeliveryDemo. Building/deploying the Android 64bit Release Application Store target with Asset Packs (Build.. and Install using the Codex 1.5.1 Tools) using our own keystore.

     

    However, when running the AssetDeliveryDemo App on the device, only an empty startup screen is displayed, e.g. I don't see any Assets (expecting 3 video files). I've investigated the system log and see 
      info "FMX: AssetDeliveryDemo: Asset pack: ondemand_assetpack required space: 2MB..."
      info "FMX: AssetDeliveryDemo: Asset pack: fastfollow_assetpack required space: 1MB..."

    Meaning the AssetDeliveryAssetPackStateUpdateHandler is called with TAssetPackAction:TAssetPackAction.Query for both the fastfollow and ondemand asset packs 
    However, no further calls are coming thru to the AssetDeliveryAssetPackStateUpdateHandler.

     

    Further I've investigated the app filesystem and in the base directory there's an "split_installtime_assetpack.apk" asset pack with the other split apks etc., but the content (video file) has not been extrated to /files as expected.
    I've tried calling the FAssetDelivery.GetAssetPackPath('installtime_assetpack'), however, it only returns an empty string since FAssetPackManager.getPackLocation is nil

     

    For our app we only interested in using the installtime asset, so I've incorporated this in our app and building that asset into our bundle and get the same results. Meaning the "split_installtime_assetpack.apk" is placed in to base directory and contains the asset, but it's not extracted.
    Note, I've tried both building the app bundle with the automatic (codex) tools and manual scripts 

     

    This version of the app bundle has also been uploaded and installed from Google Play Store to test if it was only a problem in local-testing mode, but the result is the same.

     

    My Configuration
    RAD Studio 11 Patch 1
    Android SDK \Embarcadero\Studio\22.0\CatalogRepository\AndroidSDK-2525-22.0.42600.6491\platforms\android-30
    NDK \Embarcadero\Studio\22.0\CatalogRepository\AndroidNDK-21-22.0.42600.6491\android-ndk-r21
    Java tools from Android Studio 2020.3.1 Patch 3


  11. 13 hours ago, Dave Nottage said:

    Yes

    Hi Dave,

    Thanks, and of course I should have checked your Kastri library of additional implementations. I guess I didn't find it because I was only searching for "Play Feature Delivery", and not for "Play Assets Delivery", which Google describe as being ONLY for games. However, having read more details about it, I think it matches our needs perfectly well.

    So I'll look further into your demo.


  12. Our Android App is rejected by Play Store because it exceeds the 150 MB limit. It is not an option to make it smaller as it includes a large 170 MB file with audio samples, which is required by our app. 
    The way to handle large app is to use the "Play Feature Delivery" option:  https://developer.android.com/guide/playcore/feature-delivery

     

    However, the instructions to use the "Feature Delivery" is highly tied up on having a project in Android Studio. We could probably do it by setting up a dummy app in Android Studio, but I guess it will take some time without any knowledge about Android Studio.

    Anyone having found a way to deploy a large Delphi app to Play Store?


  13. I found the reason for the problem: Delphi handles touch events by ownership and not by parentship. Scrolling only works for scrollboxes OWNED by the mainform. It is not enough that that the mainform is their parent.

     

    In my situation my ownership looks like this:

      MainForm>TLayout (the layout animates the showing of other "windows")

    In another unit I have:

      MyFrame>TRectangle>TRectangle>TListBox

     

    Now when I want to show the content of the Frame, I Create the frame with the Application as the owner, and set the parent of the root Rectangle to the TLayout of the mainform, to slide it in.

    With this structure, scrolling does NOT work.

     

    However, if I create MyFrame with the MainForm as the owner, then it works!


  14. 19 hours ago, vfbb said:

    This is strange because the scrollbox does not use mousedown, mouseup, it uses gestures, and with hittest or without hit test in the components above, it should work in the same way.

    Thank you for your reply. If thats true, then there must be something in my setup that causes the default behavior not to work. I wonder what that is?


    My parentship hierachy looks like this:
    MainForm>TLayout>TRectangle>TRectangle>TListBox>TListBoxItem>TRadioButton

     

    When I set HitTest=true for the RadioButton, then touch scrolling of the listbox only works if I touch outside the Radiobutton. If I touch the radiobutton then it selects the radiobutton, but scrolling does not work.
    I have no Gesture manager assigned and no InteractiveGestures selected.


  15. 32 minutes ago, vfbb said:

    You can try something like this:

    Thank you, but it seems to be a solution similar to the one I refer to? I prefer not to have a custom edition of each components placed on the Listbox.

     

    However, I also realize that both solutions relies on that scrolling actually does work when tapping a control, but it does not work for me. As soon as Hittest=true for the control on the listbox, then it does not scroll at all when I touch that control.

     

     

×