-
Content Count
1331 -
Joined
-
Last visited
-
Days Won
29
Posts posted by Dave Nottage
-
-
4 hours ago, PavelX said:There is any ANDROID64 Symbol ?
In what circumstances would the code do something different?
-
44 minutes ago, Kryvich said:It's strange that "Borland" still here in Delphi 10.3.3.
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
-
1
-
-
35 minutes ago, Darian Miller said:You should be able to fix spelling mistakes of public methods from a recently published version
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".
-
1
-
-
3 hours ago, BobTheBuilder said:What Dave Nottage excludes completely is the fact that during creation the AndroidManifest.xml is copied to AndroidManifest.template.xml in your source directory.
You're misrepresenting my reply. It is exactly why I said to examine that file.
3 hours ago, BobTheBuilder said:So changing the AndroidManifest.xml in your AppData folder has zero effect
It certainly does have an effect when creating new projects.
-
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.
-
50 minutes ago, Aamgian said:now I have not found a reference for iOS.
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.
-
1
-
-
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/-
1
-
-
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"
-
2 hours ago, NIRAV KAKU said:I don't understand what 'package directive' means or how to define it
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
-
1
-
-
2 hours ago, Hans♫ said:On Firemonkey there is a problem loading fonts dynamically, so maybe its related to that?
I think you may be right.
1 hour ago, Anders Melander said:Have you tried installing the fonts manually on these machines?
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.
-
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?
-
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
-
1
-
-
53 minutes ago, Rollo62 said:I'm not dealing with MAcos yet, but did you has provisioning file update recently ?
I expect you mean certificate update? Recently as in a couple of months ago, yes, however I removed the old ones.
55 minutes ago, Rollo62 said:Most of the time, the Options\Provisioning page shows wrong information
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.
-
Anyone here successfully deployed a macOS App Store application? I've followed the instructions here:
http://docwiki.embarcadero.com/RADStudio/Rio/en/Completing_the_Provisioning_Page
..have a correct provisioning profile on my Mac, and have set CFBundleIdentifier to the correct value, however Delphi complains:[Error Error] Missing provisioning information. Mobile Provisioning Profile has not been specified for the "AppStore" platform configuration.
Any ideas as to what I should check?
-
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
-
On 2/8/2020 at 7:17 AM, timfrost said:Yes, problem completely absent in 10.3.3. I have withdrawn my vote for RSP23655 mentioned above
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
-
1
-
-
You could extend this demo:
Just create a handler for the OnCallStateChanged event of FPhoneDialerService, handle TCallState.Incoming and fetch the call using GetCurrentCalls
-
10 hours ago, vfbb said:the handling of incoming url of a universal link is different
Yes, the application delegate needs to implement this method:
This means class_addmethod will need to be called to add it to the delegate (DelphiAppDelegate). It will also need an import for NSUserActivity, one of which follows (no guarantees as to being 100% accurate):
NSUserActivityPersistentIdentifier = NSString; TNSUserActivityBlockMethod1 = procedure(inputStream: NSInputStream; outputStream: NSOutputStream; error: NSError) of object; TNSUserActivityBlockMethod2 = procedure of object; NSUserActivityClass = interface(NSObjectClass) ['{412EAEBF-5927-4D01-B83F-69D3B5DFE7B5}'] {class} procedure deleteAllSavedUserActivitiesWithCompletionHandler(handler: TNSUserActivityBlockMethod2); cdecl; [MethodName('deleteSavedUserActivitiesWithPersistentIdentifiers:completionHandler:')] {class} procedure deleteSavedUserActivitiesWithPersistentIdentifiers(persistentIdentifiers: NSArray; handler: TNSUserActivityBlockMethod2); cdecl; end; NSUserActivity = interface(NSObject) ['{B8C2F6C9-31FE-4282-B7CA-98C96E163033}'] function activityType: NSString; cdecl; procedure addUserInfoEntriesFromDictionary(otherDictionary: NSDictionary); cdecl; procedure becomeCurrent; cdecl; function delegate: Pointer; cdecl; function expirationDate: NSDate; cdecl; procedure getContinuationStreamsWithCompletionHandler(completionHandler: TNSUserActivityBlockMethod1); cdecl; function initWithActivityType(activityType: NSString): Pointer; cdecl; procedure invalidate; cdecl; function isEligibleForHandoff: Boolean; cdecl; function isEligibleForPrediction: Boolean; cdecl; function isEligibleForPublicIndexing: Boolean; cdecl; function isEligibleForSearch: Boolean; cdecl; function keywords: NSSet; cdecl; function needsSave: Boolean; cdecl; function persistentIdentifier: NSUserActivityPersistentIdentifier; cdecl; function referrerURL: NSURL; cdecl; function requiredUserInfoKeys: NSSet; cdecl; procedure resignCurrent; cdecl; procedure setDelegate(delegate: Pointer); cdecl; procedure setEligibleForHandoff(eligibleForHandoff: Boolean); cdecl; procedure setEligibleForPrediction(eligibleForPrediction: Boolean); cdecl; procedure setEligibleForPublicIndexing(eligibleForPublicIndexing: Boolean); cdecl; procedure setEligibleForSearch(eligibleForSearch: Boolean); cdecl; procedure setExpirationDate(expirationDate: NSDate); cdecl; procedure setKeywords(keywords: NSSet); cdecl; procedure setNeedsSave(needsSave: Boolean); cdecl; procedure setPersistentIdentifier(persistentIdentifier: NSUserActivityPersistentIdentifier); cdecl; procedure setReferrerURL(referrerURL: NSURL); cdecl; procedure setRequiredUserInfoKeys(requiredUserInfoKeys: NSSet); cdecl; procedure setSupportsContinuationStreams(supportsContinuationStreams: Boolean); cdecl; procedure setTargetContentIdentifier(targetContentIdentifier: NSString); cdecl; procedure setTitle(title: NSString); cdecl; procedure setUserInfo(userInfo: NSDictionary); cdecl; procedure setWebpageURL(webpageURL: NSURL); cdecl; function supportsContinuationStreams: Boolean; cdecl; function targetContentIdentifier: NSString; cdecl; function title: NSString; cdecl; function userInfo: NSDictionary; cdecl; function webpageURL: NSURL; cdecl; end; TNSUserActivity = class(TOCGenericImport<NSUserActivityClass, NSUserActivity>) end;
The method implementation should probably be (again no guarantees):
class function TApplicationDelegate.applicationContinueUserActivityRestorationHandler(self: id; _cmd: SEL; application: PUIApplication; userActivity: Pointer; restorationHandler: Pointer): Boolean;
As far as I know, it doesn't necessarily have to be patched in FMX.Platform.iOS since you should be able to call class_addmethod anywhere, as long as you pass it the correct class function.
Hopefully this will give you head start.
-
2
-
1
-
-
2 hours ago, David Schwartz said:but (2) and (3) I've rarely seen used
(2) is used pretty extensively. In the Delphi source folder (and subfolders) there are 386 instances of it.
-
4 hours ago, Remy Lebeau said:which will drop support for Delphi 2007 and earlier going forward
Just out of curiosity: which versions will be supported? From Delphi 2009 and up?
ANDROID64 Conditional compiling
in FMX
Posted
There appears to be an ANDROID64 define (it's all over the Delphi source). Probably just not documented?