Jump to content

Hans♫

Members
  • Content Count

    135
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Hans♫

  1. 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
  2. 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.
  3. It works with Delphi 🙂 Just received the Mac Mini with the new Apple M1 CPU. After a quick attempt to deploy our FMX app, I can confirm that PAServer runs and I can deploy and run our FMX app without problems. "Rosetta 2" seems to do the job very well!
  4. 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
  5. 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!
  6. 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.
  7. 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.
  8. 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 🙂
  9. 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.
  10. 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.
  11. 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
  12. 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.
  13. I have a Mac Mini with M1 CPU. You can run PAServer on it and deploy Delphi MacOS apps on it, but you cannot debug. So as long as you choose "Run without debugging", then it works fine. See also this post:
  14. Hans♫

    Delphi and the new Apple M1 CPU

    The roadmap refers to ARM M1 as a target platform. What I am referring to is to be able to debug the Intel target on an ARM M1 CPU. I can deploy and run from Delphi on the M1 CPU, but I cannot debug. It might not be possible to use the CPU view in Delphi, as it would have to work through the Rosetta 2 converter, but limited debug facilities would suffer, e.g. Breakpoints and variable inspection.
  15. Hans♫

    Delphi and the new Apple M1 CPU

    Now I had time to investigate it a bit further. Looks like debug mode does NOT work on the new M1 CPU. I can run a MacOS application from Delphi on the M1 Mac, without debugging, but when I run in debug mode I get the error: "unable to create process 'debug kernel timeout'". The same application runs fine in Debug mode when using an Intel Mac having the same versions of MacOS (Big Sur) and XCode. Before I create an issue on on Quality Portal. Are there any suggestions for things I should try first? - or extra information I can retrieve and include in the issue?
  16. Hans♫

    AV with InApp purchase on MacOS

    The FMX.InAppPurchase component already implements in-app purchase for iOS, and since OSX uses the same StoreKit library, I simply added an OSX copy of the iOS implementation and adjusted it to "work" on OSX. It works as far as it compiles and runs, and I can call "QueryProducts", which also initiates a Delegate callback. Once in a while I can even successfully read the product details from App Store that I receive in the callback, but most of the time the callback fails with an AV. It seems to be random where it fails. If I restart paserver before each run I can increase the chance that it works, but except from that I did not find any correlation between changes I have made and a successful request. The testprogram works fine on iOS. On OSX I have tried to target both Mojave and Cataline, and both 32 bit and 64 bit editions. They all fail. As the OSX code is the same as the iOS code, I guess that the problems are related to differences between the iOS and the OSX target in the Objective-C handling and wrapping. Any ideas what could be wrong, or what I should try? (or maybesomeone with more knowledge about Objective-C wrapping and the inner workings of Delphi could help me with this?) Below are some extracts from the code in my new unit "FMX.InAppPurchase.Mac". My test program creates TiOSInAppPurchaseService and call QueryProducts. It works without errors, and a few seconds later the TiOSProductsRequestDelegate.productsRequest callback is called. From here random AV's happens. Usually it fails on the first line FIAPService.FProductList.Clear, and sometimes it fails earlier in "DispatchToDelphi" or later in one of the following lines. TIAPProductList = class(TList<TProduct>) end; procedure TiOSInAppPurchaseService.QueryProducts(const ProductIDs: TStrings); var ProductIDsArray: NSMutableArray; ProductIDsSet: NSSet; ProductID: string; begin ProductIDsArray := TNSMutableArray.Create; for ProductID in ProductIDs do ProductIDsArray.addObject(PStrToNSStr(ProductID)); ProductIDsSet := TNSSet.Wrap(TNSSet.OCClass.setWithArray(ProductIDsArray)); FProductsRequest := TSKProductsRequest.Wrap(TSKProductsRequest.Alloc.initWithProductIdentifiers(ProductIDsSet)); ... FProductsRequest.setDelegate((FProductsRequestDelegate as ILocalObject).GetObjectID); FProductsRequest.start; end; constructor TiOSInAppPurchaseService.Create; begin ... FProductsRequestDelegate := TiOSProductsRequestDelegate.Create(Self); FProductList := TIAPProductList.Create; end; constructor TiOSProductsRequestDelegate.Create(const IAPService: TiOSInAppPurchaseService); begin inherited Create; FIAPService := IAPService; end; procedure TiOSProductsRequestDelegate.productsRequest(request: SKProductsRequest; didReceiveResponse: SKProductsResponse); begin FIAPService.FProductList.Clear; ... end;
  17. Hans♫

    AV with InApp purchase on MacOS

    I have attached the FMX.InAppPurchase.Mac.pas that we use so it is easy to use for others. All you need is to add it to your project and also add a modified version of FMX.InAppPurchase.pas where you include the file (just search for FMX.InAppPurchase.IOS, and see how that file is added, and do the same with the FMX edition) FMX.InAppPurchase.zip
  18. Hans♫

    AV with InApp purchase on MacOS

    We use InApp purchase on MacOS and it works fine. Sorry for not updating this thread. I worked with David directly to solve the problem in our code, but I think David has implemented his own solution in his Kastri framework: https://github.com/DelphiWorlds/Kastri
  19. Hans♫

    FMX Audio Plug-in development with FMX

    You'll probably need to do a lot of tweaking and manual work to create an AU with Delphi. The recommendation from Apple is to inherit from the AU base classes: "The quickest way, the one endorsed by Apple, and the one described in this document, is to subclass the appropriate C++ superclasses of the freely-downloadable Core Audio SDK." https://developer.apple.com/library/archive/documentation/MusicAudio/Conceptual/AudioUnitProgrammingGuide/Introduction/Introduction.html When I have needed to access C++ objects in Delphi, I have flattened them, but I don't know if this can be done everywhere in this situation. Someone else can probably tell you more about how you can handle that.
  20. EarMaster is a unique and highly praised app made in Delphi for Windows, MacOS and iOS. We are looking for a unique profile, and therefore I also share the job internationally. For the right person, this will be a dream job that might make you consider to relocate to Denmark! This job is at our office in Aarhus, Denmark, and remote work is not an option - don't waste your time to ask if we are sure, or if we have other jobs for remote workers 😉 The job add is in Danish, but it is not an absolute requirement that you speak Danish if you have strong English skills. The Google translated job add can be accessed here: https://www.it-jobbank.dk/jobannonce/362739/musikalsk-lead-udvikler-til-verdenskendt-musikteori-app You can find more information about the app at our Website: https://www.earmaster.com Youtube channel: https://www.youtube.com/user/eartraining and for a more technical insight, here is the video we made 4 years ago when our iPad app became the Embarcadero "Cool App Winner":
  21. Hans♫

    Controlling Canon EOS cameras

    I made Delphi headers for the Canon SDK about 20 years ago. It allowed me to connect to the camera, show live preview, zoom, take pictures and download the pictures into my software. Don't know if the headers are of any use with the current SDK, but if you want to try, you can get it. No support included 😉
  22. Hans♫

    Record and process audio

    Sorry I didn't see that. I have sent a PM with those headers too. However, there are a lot of details to figure out before you can achieve what you want. Having the headers is just a small part of it. With a lot of Googling, reading and persistence - eventually you will get through 😉 Keep up the spirit!
  23. Hans♫

    Record and process audio

    If have sent a PM with the file, but you are far from done having this file. The best advice is to find code in Objective-C that does what you want, and then convert it to Delphi - which might include a few headaches.
  24. Hans♫

    Record and process audio

    All the AudioQueue... functions are in iOSapi.AudioToolbox. Do you know how to convert the SDK headers your self? - or else I can send you my version of the file.
×