Jump to content

Dave Nottage

Members
  • Content Count

    1296
  • Joined

  • Last visited

  • Days Won

    29

Everything posted by Dave Nottage

  1. Dave Nottage

    Delphi 11.1 is available

    Tracking of downloads has been set up for the "official" links would be my guess.
  2. I've extracted the steps from the article into this: https://github.com/DelphiWorlds/HowTo/tree/main/Solutions/AndroidLowerVersions Can you confirm you've followed the steps exactly? Check that the generated AndroidManifest.xml has the correct value for minSdkVersion, and perhaps post a screenshot here of your NDK settings.
  3. Dave Nottage

    Delphi 10.4.2 with XCode13 SDK15.0 packaging ipa fail

    On April 1st, when deploying to App Store, Xcode 13 will be required, so in this case reverting to Xcode 12 is not a solution. See the earlier replies regarding using Mosco (and Codex) as a potential workaround for this Delphi 10.4.2 issue
  4. Dave Nottage

    MakeDWordIntoIPv4Address backwards result on Android

    You're welcome to use the code from here: https://github.com/DelphiWorlds/Multicaster/blob/master/MC.LocalAddresses.Android.pas Code repeated here in case that repo ever "disappears": unit MC.LocalAddresses.Android; interface uses IdStack; procedure GetLocalAddressList(const AAddresses: TIdStackLocalAddressList); implementation uses // RTL System.SysUtils, // Android Androidapi.JNI.Java.Net, Androidapi.JNI.JavaTypes, Androidapi.Helpers, Androidapi.JNIBridge, // Indy IdGlobal; procedure GetLocalAddressList(const AAddresses: TIdStackLocalAddressList); var LInterfaces, LAddresses: JEnumeration; LInterface: JNetworkInterface; LAddress: JInetAddress; LName, LHostAddress: string; begin AAddresses.Clear; LInterfaces := TJNetworkInterface.JavaClass.getNetworkInterfaces; while LInterfaces.hasMoreElements do begin LInterface := TJNetworkInterface.Wrap(JObjectToID(LInterfaces.nextElement)); LAddresses := LInterface.getInetAddresses; while LAddresses.hasMoreElements do begin LAddress := TJInetAddress.Wrap(JObjectToID(LAddresses.nextElement)); if LAddress.isLoopbackAddress then Continue; // Hack until I can find out how to check properly LName := JStringToString(LAddress.getClass.getName); LHostAddress := JStringToString(LAddress.getHostAddress); // Trim excess stuff if LHostAddress.IndexOf('%') > -1 then LHostAddress := LHostAddress.Substring(0, LHostAddress.IndexOf('%')); if LName.Contains('Inet4Address') then TIdStackLocalAddressIPv4.Create(AAddresses, LHostAddress, '') else if LName.Contains('Inet6Address') then TIdStackLocalAddressIPv6.Create(AAddresses, LHostAddress); end; end; end; end. Note: this code hasn't been changed in some time. The "hack" can probably be done another way, and I'm pretty sure Yaroslav has told me JObjectToID isn't necessary
  5. Dave Nottage

    Firebase Adertising Problem After IOS 14

    What happens when you run the project via the debugger?
  6. Dave Nottage

    Firebase Adertising Problem After IOS 14

    Those articles relate to Firebase Cloud Messaging, but your question seems to be about Firebase AdMob? Can you provide a minimal test project that reproduces the problem?
  7. Dave Nottage

    Is Sharing PAServer Possible (Mac)

    ..or use USB over IP, such as with Virtual Here: https://virtualhere.com/osx_server_software Or Net-USB: https://www.net-usb.com/usb-over-ip/
  8. Dave Nottage

    PAServer iOS

    Correct Define "remotely". On the same local network, it is straightforward. Across the internet you'd either need to expose the PAServer publicly via the router using port forwarding, or use a VPN.
  9. Change the %minSdkVersion% value in AndroidManifest.template.xml to something lower than 23 but not lower than 19 (Android 4.4). You'll also need to ensure that the NDK settings are also changed, as per the "Important information about the NDK settings" section in this article: https://delphiworlds.com/2020/09/manual-android-sdk-ndk-install-delphi/. Note that if you target API level 19, projects containing any datasnap components (eg TClientDataset) will not compile.
  10. Dave Nottage

    mismatch? SDK 15.2, iOS device 15.3

    Yes, it opens fine, but it has a bunch of references to icon files (for example) that are missing, and I had problems with provisioning (sorry, I did not note down the error messages). Rather than attempt to resolve the issues, I recreated the project.
  11. Dave Nottage

    How to: Enable camera in TWebBrowser

    Although this demo is related to being able to upload files: https://github.com/DelphiWorlds/Kastri/tree/master/Demos/WebBrowserFileChooser It also has code that should help you, based on this answer on SO: https://stackoverflow.com/a/47525818/3164070 Please be aware that it requires a Java library (https://github.com/DelphiWorlds/Kastri/blob/master/Lib/dw-webchromeclient.jar, which has been added to the demo) Looking at it now, I figure there should be comments in the code explaining exactly what it is doing 🙂
  12. Dave Nottage

    mismatch? SDK 15.2, iOS device 15.3

    You might have to file a report in QP. I suggest fixing the test project, though - I had to scrap the dpr/dproj and start a new one.
  13. Dave Nottage

    Generate .apk for older Android smartphones

    That's one of the important factors determining the lowest version of Android that will run the app. In the case of native Android apps (such as built with Delphi), the other factor is the NDK settings, as mentioned in the "Important information about the NDK settings" section of this article: https://delphiworlds.com/2020/09/manual-android-sdk-ndk-install-delphi/
  14. Dave Nottage

    Is IPhone SE suitable for testing purposes?

    If it's a second generation, you should make sure they don't realise what a bargain you have. It retails for around £300
  15. Dave Nottage

    Is IPhone SE suitable for testing purposes?

    Assuming it's a first generation (which it probably is, given the price), then it should be suitable, since it can run iOS 15.3.1: https://en.wikipedia.org/wiki/IPhone_SE_(1st_generation) Given when support has "run out" on other devices, it looks like it should be good for around another year: https://en.wikipedia.org/wiki/List_of_iOS_and_iPadOS_devices#iPhone
  16. Dave Nottage

    mismatch? SDK 15.2, iOS device 15.3

    Which version of iOS? Do you have a test project that reproduces the problem? In this case, it's unlikely. I'm working with iOS SDK 15.0 on 15.3 devices, including playing audio. I know this sounds a bit bone-headed, but also check that your mute button is not switched. I've actually done that myself 🙂
  17. Dave Nottage

    Thought for the Day stopped working..

    Programmers quote?: http://quotes4all.net/quote?id=1487
  18. Dave Nottage

    AdMob in Delphi11

    Sorry, I renamed it. It's now: https://github.com/DelphiWorlds/Playground/tree/main/Demos/AdMob Please also see: https://github.com/DelphiWorlds/Playground#project-configuration
  19. I've found some code from an older repo (namely https://github.com/ccy/jedi-apilib) for what I want to achieve however I'm having trouble making it work. This is the code in question: const WTS_CURRENT_SERVER_HANDLE = 0; WTS_CURRENT_SESSION = DWORD(-1); type _WINSTATION_REMOTE_ADDRESS = record AddressFamily: DWORD; Port: WORD; Address: array [0..19] of Byte; Reserved: array[0..5] of Byte; end; PWINSTATION_REMOTE_ADDRESS = ^_WINSTATION_REMOTE_ADDRESS; TWinStationRemoteAddress = _WINSTATION_REMOTE_ADDRESS; PWinStationRemoteAddress = PWINSTATION_REMOTE_ADDRESS; function WinStationQueryInformation(hServer: THandle; SessionId: DWORD; WinStationInformationClass: Cardinal; pWinStationInformation: PVOID; WinStationInformationLength: DWORD; var pReturnLength: DWORD): Boolean; stdcall; external 'winsta.dll' name 'WinStationQueryInformationW'; function GetWVDClientAddress: string; var LBytesReturned: DWORD; LRemoteAddress: _WINSTATION_REMOTE_ADDRESS; begin LBytesReturned := 0; ZeroMemory(@LClientAddress, SizeOf(LClientAddress)); if WinStationQueryInformation(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, WinStationRemoteAddress, @LClientAddress, SizeOf(LClientAddress), LBytesReturned) then begin // Do something with LClientAddress here end else Result := SysErrorMessage(GetLastError); end; The call to WinStationQueryInformation is failing, and the message being returned by SysErrorMessage is: "The tag is invalid". Is there something obvious that I'm missing?
  20. Dave Nottage

    Obtaining client IP address from Windows Virtual Desktop app

    I'm aware of that one, but thanks 🙂 We've ended up going with a combination of: WTSUserName WTSDomainName WTSClientName WTSClientAddress https://docs.microsoft.com/en-us/windows/win32/api/wtsapi32/ne-wtsapi32-wts_info_class using WTSQuerySessionInformation
  21. Dave Nottage

    Obtaining client IP address from Windows Virtual Desktop app

    Unfortunately, this gives the public facing IP address, which makes sense, however in my case isn't suitable. What I am after is a way of obtaining a unique identifier for the "local" machine, by way of either one of the WTS functions or the Winstation functions.
  22. Dave Nottage

    Obtaining client IP address from Windows Virtual Desktop app

    That was it; thanks
  23. Dave Nottage

    Communication from local computer into "rdp session"?

    You could use this as a starting point, or to learn from: https://github.com/DelphiWorlds/MiscStuff/blob/master/Test/RDSTwainTestCase.zip Though the code is pretty messy. I had a plan to re-organise it - maybe some day 🙂
  24. Dave Nottage

    iOS app can’t start on iPhone

    You may also need to delete any cache-xxxxxx folders under PAServer/scratch-dir on the Mac, then import
  25. As you discovered, it is being added during the build process. The value for exported is not in any configuration files so presumably it is hard-coded. The "easiest" way to fix this is to edit the generated AndroidManifest.xml, add it to the deployment and disable the one that Delphi would normally deploy. Of course this means having to repeat the process if you make any changes that affect the manifest. ..or you could use Delphi 11, where the problem has been fixed.
×