Jump to content

Dave Nottage

Members
  • Content Count

    1607
  • Joined

  • Last visited

  • Days Won

    36

Everything posted by Dave Nottage

  1. Dave Nottage

    MacOs Ventura and NaN

    Can you post code that reproduces the issue? It'll save having to type out the code, and work out the cut off parts, if they're important.
  2. Dave Nottage

    Send Email from Android with HTML message body

    I have an import for it, here: https://github.com/DelphiWorlds/Kastri/blob/master/API/DW.Androidapi.JNI.Text.pas
  3. Dave Nottage

    Video with Overlays is very jerky

    If you have code that is used to update the information in the overlays, try removing it temporarily, to see whether it's caused by the overlays themselves. If that improves the playback, you may want to consider executing the code in a separate thread, synchronize with the main thread when it is done, and update the overlays then.
  4. Are you talking about the demo, or your own app? If your own app, did you follow the instructions in the readme? Either way, please indicate what version of Android you have on your device.
  5. I took a keen interest in this, so have put together a demo, here: https://github.com/DelphiWorlds/Kastri/tree/master/Demos/NotificationListenerService Please ensure that you read the readme, as it has information about how to configure a project of your own, should you use the code that the demo uses.
  6. Please provide a link to the documentation that led you this point, or at least examples in Java or Kotlin that achieve the same result
  7. Dave Nottage

    Unable to execute '"C:\Program Files\Java\jdk-17.0.1\bin\java.exe" 

    Is this a project created in an earlier version of Delphi? If so, you may need to follow the step described here.
  8. Dave Nottage

    Unable to execute '"C:\Program Files\Java\jdk-17.0.1\bin\java.exe" 

    Once again, not enough information
  9. Dave Nottage

    Unable to execute '"C:\Program Files\Java\jdk-17.0.1\bin\java.exe" 

    As per my earlier reply, later versions of Delphi require the OpenJDK. You can install it from the Delphi IDE by using Tools | Manage Platforms, select the Additional Options tab, select Eclipse Temurin OpenJDK 11 (Hotspot) JVM and click Apply. Once installed, you'd need to modify your Android SDK settings to use the installed JDK:
  10. Dave Nottage

    Unable to execute '"C:\Program Files\Java\jdk-17.0.1\bin\java.exe" 

    It may depend on which version of Delphi you are using. Later versions of Delphi (e.g. 11.3) require the OpenJDK. It's hard to tell without more information, including the rest of the error message
  11. Dave Nottage

    Android development Pixel 7 Pro

    Pixel 7 Pro shipped with no 32-bit support. You need to compile for 64-bit, or perhaps use this: https://github.com/ThomasKing2014/Pixel7_32bit_helper
  12. Dave Nottage

    Delphi 11.1 compiled under MacOS Ventura

    As long as you have a compatible version of Xcode on the Mac, Delphi 11.1 will be able to produce iOS and macOS apps. In the case of Delphi 11.1 (with patch 1 installed), even the latest version of Xcode should work. Is there some reason you're not upgrading to 11.3? That version definitely works with Xcode 14.2 (at least, for me)
  13. Dave Nottage

    iOS FMX controls not show on Iphone 14 device with ios 16

    Thanks.. I'll be taking a look into what is happening
  14. Dave Nottage

    iOS FMX controls not show on Iphone 14 device with ios 16

    Can you provide an example of this? Just the form with the TListView with customized item will do.
  15. Dave Nottage

    Delphi 11.2 and MacOS SDK 15.5

    It appears that all 3 developers I know of are in the same scenario, i.e. they are using a macOS VM on a Windows host. I wouldn't expect support from Embarcadero if the setup may be illegal to begin with. You may want to consider obtaining a Mac (least expensive option is usually a late-model Mac mini, or 2nd hand Mac - not too old, though), or use a cloud hosted Mac machine.
  16. The question is: why do you want your app to be able to do this? As Dalija mentioned, users can easily go to the home screen anyway. Even if you were able to achieve it, if you submit it to the App Store it's highly likely that the app will be rejected. I suggest reading this: https://developer.apple.com/library/archive/qa/qa1561/_index.html
  17. Dave Nottage

    Delphi 11.2 and MacOS SDK 15.5

    I've seen another developer have this issue - he has talked with an engineer from Embarcadero and they are yet to find what the problem is. This is something new. Best I can suggest is to report the issues to https://quality.embarcadero.com/
  18. Did you read this? Did you also read this?
  19. Dave Nottage

    compiling DCU without creating EXE

    In my case, it still generates DCUs. (but yes, the "c" is not needed). Regardless, my goal of having a kind of "compile check" was achieved I lived in hope that it was able to work out something that I couldn't 😉
  20. Dave Nottage

    compiling DCU without creating EXE

    Not sure when it was added, but this compiler option appears to just compile (i.e. omits the linking phase): -Jc I discovered this after probing ChatGPT for an answer. The reason why I'm using this option is because I want my CI to just do a compile check in case there's been any boneheaded mistakes in the code, without having it linking to SDKs or other binaries (which can take ages) Jc = "Just compile"? 😉
  21. Dave Nottage

    Delphi 11.2 and MacOS SDK 15.5

    You need to update Xcode, and import the iOS 16.1 SDK. Xcode 14.1 requires at least macOS Monterey 12.5
  22. Dave Nottage

    Delphi iOS Push Notifications (APNS)

    You can use Apple Push Services, but it's for iOS only. You don't give any details about how you're sending it, or what you are sending. Are you following the documentation, here? https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns?language=objc Also, have you enabled Push Notifications for the App ID that is used in the Provisioning Profile for the application? Please refer to: https://blog.grijjy.com/2017/01/31/receiving-push-notifications-from-apples-push-notification-and-googles-firebase-cloud-messaging-services/
  23. Dave Nottage

    Application fail to start on android 10-11-12-13 IMEI

    There is no reliable way of uniquely identifying a specific Android device. If you were able to do this, what would be the process for ensuring that the IMEI is correct? Would the identifier be hard-coded into the app itself, or would there be some other measure external to the application?
  24. Dave Nottage

    Error Message after Update to 11.2

    In what location? Please provide the exact error message.
  25. Dave Nottage

    FMX mobile device internal storage information

    Probably because his answer is for memory, not storage. If you're after the latter, there's an answer in Java here that should be relatively easily translated. Some time ago I added an import for the relevant classes (Environment and StatFs) in this unit, but I'll repeat the code just for those classes if that's all you are looking for: JEnvironmentClass = interface(JObjectClass) ['{847171A2-7B65-4251-9BD3-E0BC89DE31FD}'] {class} function _GetDIRECTORY_ALARMS: JString; cdecl; {class} procedure _SetDIRECTORY_ALARMS(Value: JString); cdecl; {class} function _GetDIRECTORY_AUDIOBOOKS: JString; cdecl; {class} procedure _SetDIRECTORY_AUDIOBOOKS(Value: JString); cdecl; {class} function _GetDIRECTORY_DCIM: JString; cdecl; {class} function _GetDIRECTORY_DOCUMENTS: JString; cdecl; {class} function _GetDIRECTORY_DOWNLOADS: JString; cdecl; {class} procedure _SetDIRECTORY_DOWNLOADS(Value: JString); cdecl; {class} function _GetDIRECTORY_MOVIES: JString; cdecl; {class} function _GetDIRECTORY_MUSIC: JString; cdecl; {class} procedure _SetDIRECTORY_MUSIC(Value: JString); cdecl; {class} function _GetDIRECTORY_NOTIFICATIONS: JString; cdecl; {class} procedure _SetDIRECTORY_NOTIFICATIONS(Value: JString); cdecl; {class} function _GetDIRECTORY_PICTURES: JString; cdecl; {class} function _GetDIRECTORY_PODCASTS: JString; cdecl; {class} procedure _SetDIRECTORY_PODCASTS(Value: JString); cdecl; {class} function _GetDIRECTORY_RINGTONES: JString; cdecl; {class} function _GetDIRECTORY_SCREENSHOTS: JString; cdecl; {class} procedure _SetDIRECTORY_SCREENSHOTS(Value: JString); cdecl; {class} function _GetMEDIA_BAD_REMOVAL: JString; cdecl; {class} function _GetMEDIA_CHECKING: JString; cdecl; {class} function _GetMEDIA_EJECTING: JString; cdecl; {class} function _GetMEDIA_MOUNTED: JString; cdecl; {class} function _GetMEDIA_MOUNTED_READ_ONLY: JString; cdecl; {class} function _GetMEDIA_NOFS: JString; cdecl; {class} function _GetMEDIA_REMOVED: JString; cdecl; {class} function _GetMEDIA_SHARED: JString; cdecl; {class} function _GetMEDIA_UNKNOWN: JString; cdecl; {class} function _GetMEDIA_UNMOUNTABLE: JString; cdecl; {class} function _GetMEDIA_UNMOUNTED: JString; cdecl; {class} function init: JEnvironment; cdecl; {class} function getDataDirectory: JFile; cdecl; {class} function getDownloadCacheDirectory: JFile; cdecl; {class} function getExternalStorageDirectory: JFile; cdecl; {class} function getExternalStoragePublicDirectory(&type: JString): JFile; cdecl; {class} function getExternalStorageState: JString; cdecl; overload; {class} function getExternalStorageState(path: JFile): JString; cdecl; overload; {class} function getRootDirectory: JFile; cdecl; {class} function getStorageState(path: JFile): JString; cdecl; {class} function getStorageDirectory: JFile; cdecl; // **** Android 11 **** {class} function isExternalStorageEmulated: Boolean; cdecl; overload; {class} function isExternalStorageEmulated(path: JFile): Boolean; cdecl; overload; {class} function isExternalStorageLegacy: Boolean; cdecl; overload; // **** Android 10 **** {class} function isExternalStorageLegacy(path: JFile): Boolean; cdecl; overload; // **** Android 10 **** {class} function isExternalStorageManager: Boolean; cdecl; overload; // **** Android 11 **** {class} function isExternalStorageManager(path: JFile): Boolean; cdecl; overload; // **** Android 11 **** {class} function isExternalStorageRemovable: Boolean; cdecl; overload; {class} function isExternalStorageRemovable(path: JFile): Boolean; cdecl; overload; {class} property DIRECTORY_ALARMS: JString read _GetDIRECTORY_ALARMS write _SetDIRECTORY_ALARMS; {class} property DIRECTORY_AUDIOBOOKS: JString read _GetDIRECTORY_AUDIOBOOKS write _SetDIRECTORY_AUDIOBOOKS; // **** Android 10 **** {class} property DIRECTORY_DCIM: JString read _GetDIRECTORY_DCIM; {class} property DIRECTORY_DOCUMENTS: JString read _GetDIRECTORY_DOCUMENTS; {class} property DIRECTORY_DOWNLOADS: JString read _GetDIRECTORY_DOWNLOADS write _SetDIRECTORY_DOWNLOADS; {class} property DIRECTORY_MOVIES: JString read _GetDIRECTORY_MOVIES; {class} property DIRECTORY_MUSIC: JString read _GetDIRECTORY_MUSIC write _SetDIRECTORY_MUSIC; {class} property DIRECTORY_NOTIFICATIONS: JString read _GetDIRECTORY_NOTIFICATIONS write _SetDIRECTORY_NOTIFICATIONS; {class} property DIRECTORY_PICTURES: JString read _GetDIRECTORY_PICTURES; {class} property DIRECTORY_PODCASTS: JString read _GetDIRECTORY_PODCASTS write _SetDIRECTORY_PODCASTS; {class} property DIRECTORY_RINGTONES: JString read _GetDIRECTORY_RINGTONES; {class} property DIRECTORY_SCREENSHOTS: JString read _GetDIRECTORY_SCREENSHOTS write _SetDIRECTORY_SCREENSHOTS; // **** Android 10 **** {class} property MEDIA_BAD_REMOVAL: JString read _GetMEDIA_BAD_REMOVAL; {class} property MEDIA_CHECKING: JString read _GetMEDIA_CHECKING; {class} property MEDIA_EJECTING: JString read _GetMEDIA_EJECTING; {class} property MEDIA_MOUNTED: JString read _GetMEDIA_MOUNTED; {class} property MEDIA_MOUNTED_READ_ONLY: JString read _GetMEDIA_MOUNTED_READ_ONLY; {class} property MEDIA_NOFS: JString read _GetMEDIA_NOFS; {class} property MEDIA_REMOVED: JString read _GetMEDIA_REMOVED; {class} property MEDIA_SHARED: JString read _GetMEDIA_SHARED; {class} property MEDIA_UNKNOWN: JString read _GetMEDIA_UNKNOWN; {class} property MEDIA_UNMOUNTABLE: JString read _GetMEDIA_UNMOUNTABLE; {class} property MEDIA_UNMOUNTED: JString read _GetMEDIA_UNMOUNTED; end; [JavaSignature('android/os/Environment')] JEnvironment = interface(JObject) ['{8A8591BC-BC01-4338-91D8-2671DAB231F8}'] end; TJEnvironment = class(TJavaGenericImport<JEnvironmentClass, JEnvironment>) end; JStatFsClass = interface(JObjectClass) ['{F97A99DF-CDC1-4842-80F2-2EA53A906E3E}'] {class} function init(path: JString): JStatFs; cdecl; end; [JavaSignature('android/os/StatFs')] JStatFs = interface(JObject) ['{C34856EE-443F-42CB-B25B-DEC0B8C938D0}'] function getAvailableBlocks: Integer; cdecl; function getAvailableBlocksLong: Int64; cdecl; function getAvailableBytes: Int64; cdecl; function getBlockCount: Integer; cdecl; function getBlockCountLong: Int64; cdecl; function getBlockSize: Integer; cdecl; function getBlockSizeLong: Int64; cdecl; function getFreeBlocks: Integer; cdecl; function getFreeBlocksLong: Int64; cdecl; function getFreeBytes: Int64; cdecl; function getTotalBytes: Int64; cdecl; procedure restat(path: JString); cdecl; end; TJStatFs = class(TJavaGenericImport<JStatFsClass, JStatFs>) end;
×