-
Content Count
1559 -
Joined
-
Last visited
-
Days Won
36
Everything posted by Dave Nottage
-
Why TFooBaseClass = class of TFooBase in parameter can not compile, but TClass could?
Dave Nottage replied to wqmeng's topic in RTL and Delphi Object Pascal
You do not have that. Please provide a complete example, that has the correct spelling of implementation, and the declaration for TFooBase, e.g. unit Unit2; interface type TFooBase = class; TFooBaseClass = class of TFooBase; TFooBase = class end; TFooA = class(TFooBase) end; TFooB = class(TFooBase) end; //Then in another class type TBar = class public function FindFooByClass(AFooClass: TFooBaseClass): TFooBase; end; implementation function TBar.FindFooByClass(AFooClass: TFooBaseClass): TFooBase; begin end; end. Which incidentally, compiles. Also, please just ask your question in one group. -
ANDROID - How to create a folder in a USB stick and write some files in that folder
Dave Nottage replied to steve.b's topic in Cross-platform
Given the content of the links, to create Delphi code for what you want to do does not seem trivial. -
ANDROID - How to create a folder in a USB stick and write some files in that folder
Dave Nottage replied to steve.b's topic in Cross-platform
Can you provide links to the code and information you're referring to? -
I expect it's not Delphi 12.3 that's the problem, but the version of Android on the device that you're running the app on. See here. It would help to know the location of the folder you're trying to create.
-
Android. TDirectory.GetFiles('/storage/emulated/0/DCIM/Camera') returns an empty list
Dave Nottage replied to dmitrybv's topic in Cross-platform
Actually, there is more to this. If you need access to files other than audio, images and video that are not created by your app, you would need to use the relevant action(s), as described here. This kind of thing is implemented in the FilesSelector feature in Kastri. -
Android. TDirectory.GetFiles('/storage/emulated/0/DCIM/Camera') returns an empty list
Dave Nottage replied to dmitrybv's topic in Cross-platform
It depends on the folder. If it's private to the app (e.g. via TPath.GetDocumentsPath) then TDirectory.GetFiles will work. If the folder is shared (as are those that you listed), then a method similar to what is in the demo could be used, i.e. via ContentResolver. -
Android. TDirectory.GetFiles('/storage/emulated/0/DCIM/Camera') returns an empty list
Dave Nottage replied to dmitrybv's topic in Cross-platform
I've created a demo in my HowTo repository. It also demos a way of accessing the contents of the files, since you cannot use the "traditional" methods of accessing the files in Delphi. -
How to Force the Generation of a New Notification Token on iOS Without Reinstalling the App?
Dave Nottage replied to moises@coderbox.com.br's topic in FMX
Looks like I was wrong about that. Compiling the FCMBaseDemo in Kastri, using the Firebase iOS SDK v11.11 succeeds using Delphi 12.3. Might have been another SDK I was thinking of 🙂 -
How to Force the Generation of a New Notification Token on iOS Without Reinstalling the App?
Dave Nottage replied to moises@coderbox.com.br's topic in FMX
After a conversation I have had with someone with the same problem, it seems it is due to a bug in earlier versions of the Firebase iOS SDK. The implementation in Delphi uses v6.28, and the latest version is v11.11, so it is quite a way "behind". Due to a linker issue in Delphi 12.1 and earlier, the latest version of the Firebase iOS SDK that can be used with it is v10.8. Delphi 12.2 can use at least v11.2, however I believe the linker starts failing again sometime before v11.11 (I'd have to check this). Having said all that, even if you download one of the later versions of the Firebase iOS SDK, there's a number of changes that would need to be made to Delphi source code in order to make it work. Alternatively, the FCM implementation in Kastri could be used, which is known to work with Firebase iOS SDK v11.2. -
Error: INSTALL_FAILED_INVALID_APK (base.apk code is missing)
Dave Nottage replied to brx's topic in FMX
It may be a misconfiguration of the SDK settings in Delphi. What value do you have for SDK API level location? -
problem integrating AAR from manufacturer startup-runtime maybe not working (?)
Dave Nottage replied to NecoArc's topic in FMX
It shouldn't, since Delphi itself inserts a provider tag in the resulting AndroidManifest.xml for example when using Secure File Sharing (enabled in the Entitlement List in Project Options). -
problem integrating AAR from manufacturer startup-runtime maybe not working (?)
Dave Nottage replied to NecoArc's topic in FMX
Not sure if this may have been affecting it, however you have an extraneous space in the android:authorities attribute, i.e. just before: %package%. Can you take out the provider tag to see if that really was required? -
problem integrating AAR from manufacturer startup-runtime maybe not working (?)
Dave Nottage replied to NecoArc's topic in FMX
You would need to add the provider node of that manifest.xml to AndroidManifest.template.xml inside of the application tag, but remove the: tools:node="merge" attribute, and replace: ${applicationId} with: %package% Which Delphi should replace with your package identifier in the resulting AndroidManifest.xml -
Android only shows the FMX logo for my app
Dave Nottage replied to GabrielMoraru's topic in Cross-platform
Yes, Android 8.0 has a bug that prevents the Delphi debugger from starting. One solution is to upgrade to Android 8.1, if you can. -
Même chose 😄
-
How to implement automatic synchronization and location monitoring at regular intervals in a Delphi Android application?
Dave Nottage replied to Carlos Miller Goncalves de's topic in Cross-platform
If it's just data synchronization, is not user initiated, and you want it in Delphi code, you may be stuck. -
How to implement automatic synchronization and location monitoring at regular intervals in a Delphi Android application?
Dave Nottage replied to Carlos Miller Goncalves de's topic in Cross-platform
This kind of background task scenario calls for using a Worker descendant, which is yet to be supported in Delphi. Location monitoring in the background is achievable with Delphi, however capturing location events cannot be at defined time intervals - they occur (oddly enough) when the device location changes. You could however check what the time is when a location update occurs, and if it is close enough to your defined time, take action then. If no location update is available at a defined time it could be assumed that the device is stationary. I had been struggling for some time to implement location updates in the background in a reliable way, however with this latest demo in my Playground repository, it has become the most reliable yet. The next step is to be able to have it start at boot time, which unfortunately in newer versions of Android requires user interaction. -
Delphi 12.2 Android Debugging - EXTREMELY SLOW
Dave Nottage replied to Shano's topic in General Help
The debugger for Android has been unusable* for me for some time now. I have learned to live with using log statements and a logcat viewer, such as Device Lens. *I guess that aligns with not being able to debug on iOS, too. -
Personally, I create .pkg files - using the create installer function of Mosco.
-
Using a value of slDynamic for FDPhysSQLiteDriverLink1 EngineLinkage works for me
-
Sorry, I had that backwards - static linking causes the issue, or at least it did in the early days. When I have time, I'll check which way around it is, and/or whether or not it will work at all.
-
No. Why would you want to?
- 3 replies
-
- installation
- 12.2
-
(and 1 more)
Tagged with:
-
Yes, you need to use static linking: https://docwiki.embarcadero.com/RADStudio/Athens/en/Connect_to_SQLite_database_(FireDAC)#Driver_Linkage
-
Delphi 12.1 with MacOS version and iOS version
Dave Nottage replied to Peter J.'s topic in Cross-platform
I mean not being able to have the debugger attach to the process on the device at all, regardless of whether or not there are breakpoints set. The install process should still succeed. If this an error you receive when attempting to install the app on the device using the IDE, it sounds like you have a development (as opposed to App Store) certificate/profile issue. -
Apple GetTimerTick64 - mach_absolute_time: How to handle the NSPrivacyAccessedAPIType privacy?
Dave Nottage replied to Rollo62's topic in Cross-platform
Actually, the messages I was referring to were warnings from before the privacy requirements came into force, as evidenced by this post on the German Delphi Praxis. Transporter might not be issuing warnings/errors any more; it could be that they're rejected at the review stage. One way to find out is to submit something 🙂