Jump to content

Dave Nottage

Members
  • Content Count

    1490
  • Joined

  • Last visited

  • Days Won

    36

Everything posted by Dave Nottage

  1. 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/
  2. 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.
  3. 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.
  4. 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.
  5. 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 πŸ™‚
  6. 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.
  7. 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/
  8. 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
  9. 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
  10. 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 πŸ™‚
  11. Dave Nottage

    Thought for the Day stopped working..

    Programmers quote?: http://quotes4all.net/quote?id=1487
  12. 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
  13. 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?
  14. 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
  15. 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.
  16. Dave Nottage

    Obtaining client IP address from Windows Virtual Desktop app

    That was it; thanks
  17. 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 πŸ™‚
  18. 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
  19. 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.
  20. Dave Nottage

    iOS app can’t start on iPhone

    If you imported the iOS SDK before you installed the patches, you will need to re-import the SDK
  21. Dave Nottage

    iOS 15.1

    If you haven't installed either the November or January patch, install that, then re-import the iOS SDK.
  22. Dave Nottage

    Detecting start of drag operations

    This answer has served me well for some time now: https://stackoverflow.com/a/13835244/3164070 however it does not work for when a user drags an attachment from Outlook (it works when dragging the entire email). Does anyone know if an object of a different name is created, or perhaps some other "event" occurs? I'm otherwise looking at installing a global mouse hook as @Remy Lebeau suggests in one of the other answers in the same SO post.
  23. Dave Nottage

    Detecting start of drag operations

    I'd like to know how it is the likely solution. Please refer to the original question. The problem I am trying to solve is in the original question. The "why" is that a WVD app is on the receiving end of the drag operation, and the virtual channel needs to register the WVD app window for drag/drop. The best time to do this is at the start of the operation. As I say, this has been working famously for standard drag/drop, but it does not work for dragging attachments out of Outlook
  24. Dave Nottage

    Detecting start of drag operations

    As promising as that looked, it didn't help πŸ™‚
  25. If you're using the original project, follow the steps here to ensure that it has references to the correct Android libraries: https://github.com/DelphiWorlds/HowTo/tree/main/Solutions/AndroidLibraries Delete the original AndroidManifest.template.xml, making sure you note any customizations you added yourself. Recompiling the project should recreate the AndroidManifest.template.xml file and you can add any customizations back in. I suspect the error messages you were seeing when you tried compiling with Delphi 10.4 may have been related to having an older AndroidManifest.template.xml. Assuming that you had not changed the %targetSdkVersion% part of AndroidManifest.template.xml, you will find that your app will now need to request permissions for "dangerous" permissions at runtime, so you will need to modify your code to suit. There's examples of how to do this in demos like in the camera component demo: https://github.com/Embarcadero/RADStudio11Demos/tree/main/Object Pascal/Mobile Snippets/CameraComponent and the location demo: https://github.com/Embarcadero/RADStudio11Demos/tree/main/Object Pascal/Mobile Snippets/Location If you opted to install the Android SDK/NDK files when you installed Delphi 11, when you add an SDK, it should default to the compatible values anyway.
Γ—