Jump to content

Hans♫

Members
  • Content Count

    89
  • Joined

  • Last visited

  • Days Won

    3

Hans♫ last won the day on November 20 2020

Hans♫ had the most liked content!

Community Reputation

59 Excellent

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 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: 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
  2. 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?
  3. 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!
  4. 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
  5. 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.
  6. 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?
  7. 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!
  8. 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.
  9. 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.
  10. 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
  11. Hans♫

    Low-level audio on Android?

    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 🙂
  12. 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.
  13. Hans♫

    Delphi and the new Apple M1 CPU

    I have not seen any yet. Where do you experience problems? 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.
  14. Hans♫

    Delphi and the new Apple M1 CPU

    No it still doesn't work, and I realize I forgot to create an issue about it. Now it is there: https://quality.embarcadero.com/browse/RSP-32362
  15. Hans♫

    Delphi and the new Apple M1 CPU

    I have no performance numbers, but it "feels" faster. Apps starts faster and feels more responsive, but maybe it is also related to being a new and fresh installation of MacOS, compared to a 3 years old Mac Mini with Intel.
×