-
Content Count
1608 -
Joined
-
Last visited
-
Days Won
36
Everything posted by Dave Nottage
-
Custom TrueType font in FMX Android app?
Dave Nottage replied to Lars Fosdal's topic in Cross-platform
The same method works OK on mine with Font Awesome. Which font(s) are you using? -
Yes; I would not have mentioned them otherwise. Depending on the version of macOS (especially later versions), the OpenSSL libs will not work with Indy. Perhaps something in Indy changed.
-
Which dylibs are you using? These worked for me on whatever version of 10.15.x was current 6 months ago: https://github.com/DelphiWorlds/KastriFree/tree/master/Lib/OpenSSL/1.0.2s/macOS I have not tested them on 10.15.3 as yet.
-
Boolean evaluation
Dave Nottage replied to Ole Ekerhovd's topic in Algorithms, Data Structures and Class Design
That was exactly my thought when you made this comment: What was the error, and why was it hard to catch? -
There appears to be an ANDROID64 define (it's all over the Delphi source). Probably just not documented?
-
In what circumstances would the code do something different?
-
So is CodeGear
-
Controls that support ControlType of Platform appear above the MapView. Not sure if that helps you...
-
On iOS, the first location change has values of 0 for OldLocation.Latitude and OldLocation.Longitude. On Android, they're both NaN, so your code will fail in that case. You should do this check (at least): if not IsNan(Latitude1) and not IsNan(Longitude1) then
-
Squint and read: CreateFormFromStings
Dave Nottage replied to Darian Miller's topic in RTL and Delphi Object Pascal
More a case of: a major release is the best time to do it, since it can be interface breaking. If, after the change, a users code does not compile, I doubt they're going to say: "I want it back with the incorrect spelling". They're more likely to say: "I'm upset that you spelled it wrong in the first place, but fixing it is way better". -
You're misrepresenting my reply. It is exactly why I said to examine that file. It certainly does have an effect when creating new projects.
-
Java version used for bundle tool (Android 64 aab) and error
Dave Nottage replied to Chris Pim's topic in FMX
Pretty sure it uses the JDKPath entry at HKEY_CURRENT_USER\Software\Embarcadero\BDS\20.0\PlatformSDKs\AndroidSDK25.2.5_64bit.sdk Which is reflected in the "Java" tab of the Android SDK settings in SDK manager. -
That's because you cannot retrieve existing SMS messages on iOS - this is a privacy restriction from Apple. You cannot even intercept new messages.
-
Check this link: https://forums.embarcadero.com/thread.jspa?threadID=256233 This is a link to the demo I created: https://forums.embarcadero.com/thread.jspa?messageID=899142 Edit: Just realised you want it for 10.3.3. That old demo might still work, though. If not, I'll help modify it Edit 2: Also now realised you want existing messages. Probably better to use the conversations class: https://developer.android.com/reference/android/provider/Telephony.Sms.Conversations. If the code on FMX Express does not work, please indicate what errors you're having. It may be that you just need to request the READ_SMS permission.
-
Which delphi version creates 17.3 project files?
Dave Nottage replied to dummzeuch's topic in Delphi IDE and APIs
Doesn't look like there was any released version (including betas?) according to the table here: https://wiert.me/2016/09/06/delphi-version-info-table-need-help-with-these-projectversion-for-c-builder-delphi-2005-and-2006-dllsuffix-for-c-builder-appbuilder-1-13-codename/ -
JNI.rar did not include the compiled .jar file, nor did the project have .jar file added to libraries. I updated the project to Delphi 10.3.3, compiled the UseAsJar.java file into UseAsJar.jar, added it to the project, zipped it and attached it to this reply. The project now works OK here. You can "downgrade" the project to whatever version of Delphi you're using by right-clicking the "Libraries" node and click "Revert System Files to Default" prjJNITest.zip
-
At the very top of the Java file: package com.mydomain.mypackage (for example) There's a plethora of examples on the internet, e.g in the files here: https://github.com/DelphiWorlds/KastriFree/tree/master/Java
-
Some code I'm working with uses AddFontResource or AddFontResourceEx - both return a positive value (in this case 1), so according to the documentation the font is added successfully, however they are not actually displaying correctly. The problem happens only on certain machines, in this case Getac Windows Tablet (F110 and T800 models), but the fonts are displayed correctly using the same application on a Microsoft Surface. All machines are using an administrator user account. Any ideas as to why it does not work on the machines in question?
-
AddFontResource/Ex not working on some machines
Dave Nottage replied to Dave Nottage's topic in Windows API
I think you may be right. No, since the goal is to not have them installed. Having said that, I have a bad feeling that the machines on which it does work may have the font already installed (not sure if anyone actually checked), especially given Hans' answer. I'll know for sure tomorrow. -
1. You don't need to add the classes.dex file to the project, nor the .java files 2. The UseAsJar.java file is missing the package directive which by convention is a domain in reverse order followed by a package identifier, e.g. com.mydomain.mypackage. Also, you do not need a main method, unless you're intending to run the jar separately. 3. Your import (android.JNI.UseAsJAR) is incorrect, since the signature for JUseAsJar does not match the package/class. It should be the package name followed by the class name e.g. com/mydomain/mypackage/UseAsJar. You don't need RegisterTypes, either; I believe that's a hangover from earlier versions of Delphi. 4. Once you've recompiled the .jar, add it to the project, in Project Manager under Target Platforms > Android. This saves having to manually deploy the classes.dex. You could then remove that manual addition. I'd also recommend updating to Delphi 10.3.3
-
Deploying macOS apps with App Store configuration
Dave Nottage replied to Dave Nottage's topic in Delphi IDE and APIs
I expect you mean certificate update? Recently as in a couple of months ago, yes, however I removed the old ones. The provisioning page for macOS is very different from iOS - you need to manually type in the developer certificate name (and installer certificate name if one applies), and cannot even select a provisioning profile. -
Linking errors with FacebookAudienceNetwork
Dave Nottage replied to Chris Pim's topic in Cross-platform
Same happens for me. My guess is a bug in ld, since lipo reports that it has arm64. Reported the issue here: https://quality.embarcadero.com/browse/RSP-27697 -
Rio.1 does not save all layout settings
Dave Nottage replied to Sherlock's topic in Delphi IDE and APIs
I'd like to know how you've solved this - it's still a problem for me. -
Delphi is turning 25, and to celebrate, there's a webinar being held this Friday, February 14th (US time). To register for the webinar, please visit: https://embt.co/Delphi25thWebinar
-
You could extend this demo: https://github.com/Embarcadero/RADStudio10.3.3Demos/tree/master/Object Pascal/Mobile Snippets/PhoneDialer Just create a handler for the OnCallStateChanged event of FPhoneDialerService, handle TCallState.Incoming and fetch the call using GetCurrentCalls