Jump to content

Dave Nottage

Members
  • Content Count

    1297
  • Joined

  • Last visited

  • Days Won

    29

Everything posted by Dave Nottage

  1. 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
  2. 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)
  3. 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
  4. 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.
  5. 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.
  6. 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
  7. 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/
  8. Did you read this? Did you also read this?
  9. 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 😉
  10. 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"? 😉
  11. 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
  12. 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/
  13. 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?
  14. Dave Nottage

    Error Message after Update to 11.2

    In what location? Please provide the exact error message.
  15. 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;
  16. Dave Nottage

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

    Yes, this value can no longer be accessed by regular apps on Android since version 10. It might help to know why you need this value
  17. Is the original question about retrieving local IP addresses? This code still works for me with a target SDK of 31+: uses IdStack; procedure GetLocalAddressList(const AAddresses: TIdStackLocalAddressList); implementation uses System.SysUtils, Androidapi.JNI.Java.Net, Androidapi.JNI.JavaTypes, Androidapi.Helpers, Androidapi.JNIBridge, 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(LInterfaces.nextElement); LAddresses := LInterface.getInetAddresses; while LAddresses.hasMoreElements do begin LAddress := TJInetAddress.Wrap(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;
  18. Dave Nottage

    Async/Await with updating visual controls

    I do not see why you would not be able to use it. Did you see whether your example worked?
  19. Dave Nottage

    Delphi 11.1, Android API 31, FLAG_IMMUTABLE in Pending Intent

    Indeed. According to the docs, setting a scheduled notification in this demo: https://github.com/Embarcadero/RADStudio11Demos/tree/main/Object Pascal/Mobile Snippets/Notifications/SendCancelNotification Should fail, but it doesn't. At this point I have no idea why - the target SDK level is 32, and a PendingIntent is being created without the MUTABLE or IMMUTABLE flags being included. Back to the drawing board: You'll need to provide a reproducible example.
  20. Dave Nottage

    Delphi 11.1, Android API 31, FLAG_IMMUTABLE in Pending Intent

    Unfortunately, no.. and I don't know why it was missed. There's a couple of spots in System.Android.Notification.pas (local notification support) where a PendingIntent is used and the flag is not being included. Best you could do right now is to copy the unit, put it somewhere in your project path and make the necessary modifications.
  21. Dave Nottage

    Delphi 11.3 is available now!

    Delete the SDK from SDK Manager in Delphi Delete the MacOSX13 SDK folder from C:\Users\(username)\Documents\Embarcadero\Studio\SDKs Delete the cache-dir folders from the scratch-dir folder on the Mac Re-import the SDK
  22. Dave Nottage

    App crash on close when windows style = windows

    Both are in the list of fixes: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/New_features_and_customer_reported_issues_fixed_in_RAD_Studio_11.3
  23. Dave Nottage

    Desktop path crossplatform?

    It appears there is not a single function "out of the box", but it wouldn't be too difficult to implement. TPath.GetHomePath is supposed to return /Users/<username> on macOS: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Standard_RTL_Path_Functions_across_the_Supported_Target_Platforms So appending "Desktop" should be reliable. For Windows you'd need to do a bit more work. TPath.GetDocumentsPath on Windows gives, for example: C:\Users\<username>\Documents, so you could remove the Documents part and add Desktop 🙂
  24. Dave Nottage

    Delphi 11 - Android - Google Firebase Crashlytics

    I've now released Codex 1.6, which has the functionality I mentioned, and I had a crack at implementing Firebase Crashlytics, but I was unable to make it work. I guess I'm missing something; I just don't know what 🙂 There's a test project in the Playground repo: https://github.com/DelphiWorlds/Playground/tree/main/Demos/Crashlytics if anyone is interested in the work in progress
  25. Dave Nottage

    Delphi 11 - Android - Google Firebase Crashlytics

    There's info about it here: https://firebase.google.com/docs/crashlytics/ndk-reports. There is also: https://firebase.google.com/docs/crashlytics/get-started?platform=android#java however since Delphi apps are native, I expect the former is more relevant, and it includes the SDK version as well anyway. A quick glance tells me that it should be able to be integrated into a Delphi app, however it appears it may need the same treatment as described in: https://quality.embarcadero.com/browse/RSP-20000 Next week I plan to release version 1.6 of Codex - the changes include functionality that is intended to help with this process.
×