Jump to content

Dave Nottage

Members
  • Content Count

    320
  • Joined

  • Last visited

  • Days Won

    8

Dave Nottage last won the day on February 9

Dave Nottage had the most liked content!

Community Reputation

119 Excellent

1 Follower

Technical Information

  • Delphi-Version
    Delphi 10.3 Rio

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Dave Nottage

    Java class cannot be found

    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
  2. Dave Nottage

    Java class cannot be found

    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
  3. Dave Nottage

    AddFontResource/Ex not working on some machines

    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.
  4. 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?
  5. Dave Nottage

    Java class cannot be found

    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
  6. Dave Nottage

    Deploying macOS apps with App Store configuration

    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.
  7. 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?
  8. Dave Nottage

    Linking errors with FacebookAudienceNetwork

    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
  9. Dave Nottage

    Rio.1 does not save all layout settings

    I'd like to know how you've solved this - it's still a problem for me.
  10. Dave Nottage

    ZOOM MODE for Design Editor?

    Uwe said "new edit window". If the new edit window (using View|New Edit Window) is associated with a form, it includes the form designer. Having a dedicated window means having more room to design.
  11. Dave Nottage

    Delphi's 25th Birthday Webinar

    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
  12. Dave Nottage

    Receiving incoming calls

    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
  13. Dave Nottage

    iOS handle incoming url

    Yes, the application delegate needs to implement this method: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623072-application?language=objc 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.
  14. Dave Nottage

    class designation question

    (2) is used pretty extensively. In the Delphi source folder (and subfolders) there are 386 instances of it.
  15. Dave Nottage

    Delphi 2007 supported in Indy 10?

    Just out of curiosity: which versions will be supported? From Delphi 2009 and up?
×