-
Content Count
1296 -
Joined
-
Last visited
-
Days Won
29
Everything posted by Dave Nottage
-
Delphi 11.1 is available
Dave Nottage replied to Uwe Raabe's topic in Tips / Blogs / Tutorials / Videos
Tracking of downloads has been set up for the "official" links would be my guess. -
Massive (!) reduction of supported Android devices in 10.4
Dave Nottage replied to stewag64's topic in Cross-platform
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. -
Delphi 10.4.2 with XCode13 SDK15.0 packaging ipa fail
Dave Nottage replied to Raymond Ng's topic in Cross-platform
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 -
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
-
Firebase Adertising Problem After IOS 14
Dave Nottage replied to Ömer Gözlek's topic in Cross-platform
What happens when you run the project via the debugger? -
Firebase Adertising Problem After IOS 14
Dave Nottage replied to Ömer Gözlek's topic in Cross-platform
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? -
Is Sharing PAServer Possible (Mac)
Dave Nottage replied to Michael Collier's topic in Cross-platform
..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/ -
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.
-
Massive (!) reduction of supported Android devices in 10.4
Dave Nottage replied to stewag64's topic in Cross-platform
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. -
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.
-
How to: Enable camera in TWebBrowser
Dave Nottage replied to Michael Collier's topic in Cross-platform
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 🙂 -
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.
-
Generate .apk for older Android smartphones
Dave Nottage replied to stewag64's topic in Cross-platform
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/ -
Is IPhone SE suitable for testing purposes?
Dave Nottage replied to Michael Collier's topic in Cross-platform
If it's a second generation, you should make sure they don't realise what a bargain you have. It retails for around £300 -
Is IPhone SE suitable for testing purposes?
Dave Nottage replied to Michael Collier's topic in Cross-platform
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 -
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 🙂
-
Programmers quote?: http://quotes4all.net/quote?id=1487
-
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
-
Obtaining client IP address from Windows Virtual Desktop app
Dave Nottage posted a topic in Windows API
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? -
Obtaining client IP address from Windows Virtual Desktop app
Dave Nottage replied to Dave Nottage's topic in Windows API
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 -
Obtaining client IP address from Windows Virtual Desktop app
Dave Nottage replied to Dave Nottage's topic in Windows API
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. -
Obtaining client IP address from Windows Virtual Desktop app
Dave Nottage replied to Dave Nottage's topic in Windows API
That was it; thanks -
Communication from local computer into "rdp session"?
Dave Nottage replied to microtronx's topic in Windows API
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 🙂 -
You may also need to delete any cache-xxxxxx folders under PAServer/scratch-dir on the Mac, then import
-
Android Manifiest com.google.firebase.messaging.FirebaseMessagingService is not Protected
Dave Nottage replied to AVG's topic in FMX
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.