-
Content Count
1604 -
Joined
-
Last visited
-
Days Won
36
Everything posted by Dave Nottage
-
Delphi 11.1, Android API 31, FLAG_IMMUTABLE in Pending Intent
Dave Nottage replied to nufus42's topic in FMX
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. -
Delphi 11.1, Android API 31, FLAG_IMMUTABLE in Pending Intent
Dave Nottage replied to nufus42's topic in FMX
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. -
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
-
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
-
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 🙂
-
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
-
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.
-
Error while building an Android application in Delphi 10.4 Sydney
Dave Nottage replied to at3s's topic in FMX
Weird.. I could have sworn when I checked earlier there had not been any commits for that file since my first reply. Thanks! -
Error while building an Android application in Delphi 10.4 Sydney
Dave Nottage replied to at3s's topic in FMX
As per the earlier replies, in Grijjy.ErrorReporting.pas. Please read the replies to see exactly where in that unit, and what to change. -
Application crashed when i connect Android Service
Dave Nottage replied to Delpher2600's topic in FMX
Are you saying you do not understand this part? -
Application crashed when i connect Android Service
Dave Nottage replied to Delpher2600's topic in FMX
That doesn't show where in the project the code is executed. In later versions of Android, you a service needs to be started when the application is in the foreground, so you may need to execute the code that starts it in the OnShow event of the main form, or possibly add a listener for the BecameActive application event, and execute it then. Also, this code: Does not match the exception in the image, since 'Z' <> 'F'. I assume a typo, or you renamed the service. -
This code is not going to work. I suggest looking at the code for TLocalServiceConnection.TJavaServiceConnection.onServiceConnected in the System.Android.Service unit in the Delphi source code. Warning: it's not for the faint of heart 🙂
-
Might help to show your code for whatever implements JServiceConnection.
-
Delphi 11.2 + Android sdk 31 = "black screen"
Dave Nottage replied to santycg's topic in Cross-platform
One reason may be that your startup code is attempting to access something that requires additional runtime permissions. I suggest using a logcat viewer to see what warnings or errors are emitted - personally, I use Device Lens (my own product). Alternatively, isolate what your code does at startup (including components on the main form that access OS resources e.g. Bluetooth) until you find the culprit. -
I assume this worked? Thanks for the info! I just tested it myself, without the changes to info.plist.TemplateOSX.xml and it worked. Thanks again! I'll be updating the report
-
I assume this worked? Thanks for the info!
-
An example of what probably needs to be added to info.plist.TemplateOSX.xml (inside of the dict tag): <key>DTPlatformBuild</key> <string>22C65</string> <key>DTPlatformName</key> <string>macosx</string> <key>DTPlatformVersion</key> <string>13.1</string> <key>DTSDKBuild</key> <string>22C55</string> <key>DTSDKName</key> <string>macosx13.1</string> <key>DTXcode</key> <string>1420</string> <key>DTXcodeBuild</key> <string>14C18</string> DTPlatformBuild is (as I understand) the value for the OS used to build the app. In my case I have Ventura 13.1 DTSDKBuild the build value for the SDK. Here it is for macOS 13.1 SDK DTXcode is the version of Xcode with no periods i.e. here it is 14.2.0 (or just 14.2) DTXcodeBuild is the build value for the version of Xcode used I expect the most important values are DTPlatformBuild, DTSDKBuild and DTXcodeBuild - it may be that the others can be omitted. No guarantee that all the values are correct here - I had to do some Googling to find them.
-
Never mind - it looks like it's an additional problem: https://developer.apple.com/forums/thread/689377 Delphi is not including the information mentioned in that thread. Yet another thing to work around 😞 More later when I work out what needs to be added
-
Was the profile that you included (as embedded.provisionprofile) the App Store provisioning profile?
-
That doesn't match this pattern: https://developer.android.com/training/sharing/receive#update-manifest I suggest also reading the rest of that page in regards to handling the incoming intent
-
In App Purchase (consumable and subscription)
Dave Nottage replied to Joe Sansalone's topic in Cross-platform
According the code, they're supported on at least Android. Check the FMX.InAppPurchase.Android unit. Not sure about iOS. The current implementation for Android was updated after that article was written. -
You need jdk-11.0.14.101-hotspot. You could use Tools | Manage Platforms, and select Additional Options in the IDE to install it, then configure your Android SDKs in the SDK Manager in Delphi to modify the settings on the Java tab. Once you have that right, see: https://github.com/DelphiWorlds/HowTo/tree/main/Solutions/AndroidServiceDelphi111
-
How convert an android app into an i-phone app?
Dave Nottage replied to Fabian1648's topic in Cross-platform
One that supports the latest version of iOS, if possible. It appears this is iPhone 7. That said, the support for later iOS versions for that device might soon disappear. See here: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/IOS_Mobile_Application_Development That's usually not a requirement, however there might be some specific arrangement they're referring to that I'm unaware of. The only cost should be for the Apple Developer program -
Apparently things are different on Android 11 or higher: https://developer.android.com/training/articles/user-data-ids#mac-11-plus Going by that documentation, it appears it is not possible any more. If you're after a unique identifier for the device, see the earlier messages in this thread.
-
Some more fun with ChatGPT and Delphi
Dave Nottage replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
I never assumed anything like that. What is missing from his post that raises that question?