Jump to content

Hans♫

Members
  • Content Count

    123
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by Hans♫


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


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

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

     


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


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


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


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


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


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


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


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

     

     


  12. Having various components on a TListbox, scrolling does not work when i touch a component that has HitTest=True.
    What is the best way to solve this?

     

    I have comboboxes, radiobuttons, checkboxes, etc on Listboxitems to create a dynamic interface. So far I have only used native components on iOS (TMS iCL) where scrolling vs control interaction, is handled automatically by the OS in a very smooth way. Now we are preparing an Android version based on our FMX view, but on FMX it does not seem to work out of the box. If HitTest is true for a component, then scrolling does not work, and if HitTest is false for a component, then it does not respond, but scrolling works.

     

    I found this nice solution made by David Nottage, but it requires to create a descending class of each component used:
    https://stackoverflow.com/questions/57452568/prevent-firing-events-while-scrolling-tvertscrollbox


  13. It looks like the Oboe library is the way to go for low-level audio input/output on Android. But it's a C++ library, so it will require writing a wrapper to flatten it.

    Do you know anyone using Oboe in Delphi, that might have written a full or partial wrapper?

     

    PS. I am usually a little afraid to share my own wrappers on various platforms because they are usually only partially completed and I fear that I also have to provide support for it, and instruct how to use it 😉. However, anything you have would be a great help 🙂 

     


  14. I have used SDKtransform for years (executed through "SDK Transform Assistant") to implement the iOS and OSX frameworks that are not included with Delphi.

    However, an increasing number of classes fail to be converted and are not included in the output .pas header file. Right now I need to convert AVAudioEngine from AVFoundation in MacOS 11 (Big Sur), but SDKtransform fails with a lot of these lines added to the log:

    "WARN: cannot add ObjCInterface AVAudioEngine - base class unknown"
    

    Could this be due to the way it is defined (as an interface)?

    API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
    @interface AVAudioEngine : NSObject {
    @private
        void *_impl;
    }
    - (instancetype)init;
    - (void)attachNode:(AVAudioNode *)node;
    - (void)detachNode:(AVAudioNode *)node;
    ...
    @property (readonly, nonatomic) BOOL isInManualRenderingMode API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
    ...
    @end // AVAudioEngine
    

    How do I autoconvert this type of header definitions?

     

    PS. This is a copy of my post on StackOverflow


  15. 10 hours ago, Nasreddine said:

    I'm also facing issues where the app works great on an intel machine but fails on an M1 one.

    I have not seen any yet. Where do you experience problems?

     

    10 hours ago, Nasreddine said:

    we have to wait at least 8 months for 10.5 to be able to target arm.  

    Maybe. There is a chance that you could implement debugging without offering arm as a target, but I suppose it would rely on the Rosetta 2 emulator, if that implements mapping of instructions and memory for debugging purpose. With the limited development ressources that Embarcadero can put into it, we are probably not seeing debugging support for the M1 until they make a full support of the M1 ARM target.

×