Profile cover photo
Profile photo
David Nottage
54 followers
54 followers
About
David's posts

Was there no "stop" button in Delphi 7? It's been a loooong time since I've used it, but a friend of mine is using it where he works. Is/was there any experts for Delphi that added one?

Is there a variable that can be used in the Output Directory option that includes the project name? For instance:

SomePath\$(ProjectName)\$(Platform)\$(Config)

Using $(ProjectName) does not appear to work...

Apakah ada pengembang di sini yang dari Ubud, atau Sanur?

Post has attachment
In iOS 10, if TouchID is used and the user has too many attempts (such as using the wrong finger), the OS locks the user out until they enter their PIN. For applications, this means that the canEvaluatePolicy call on the LAContext class will always return False until the user "unlocks" TouchID with their PIN.

The problem is being able to detect if this is the reason why the call returns False, which can be done only through examining the Code property on the error parameter in the canEvaluatePolicy call. The docs show that the error parameter is an NSErrorPointer:

https://developer.apple.com/reference/localauthentication/lacontext/1514149-canevaluatepolicy

i.e. a pointer to an NSError, so in Delphi I have the method declared like this:

function canEvaluatePolicy(policy: LAPolicy; error: Pointer): Boolean; cdecl;

Except that I'm having trouble with how to access the returned error. Simply dereferencing the parameter doesn't work (which I wouldn't expect it to anyway), however using the Wrap method of TNSError also does not work (the former locks up the app, the latter causes a crash). Some example code:

var
LPointer: Pointer;
LError: NSError;
LCode: Int64;
begin
Result := FContext.canEvaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometrics, LPointer);
if LPointer <> nil then
begin
LError := TNSError.Wrap(LPointer); // PNSError(LPointer)^; // Neither way works
LCode := LError.code;
if LCode <> 0 then
// Take action here
end;
end;

Any ideas on how to solve this?


Can someone please explain lines 3174-3177 in FMX.Grid.Style to me? More to the point, why they're before lines 3180-3181. (Delphi 10.1 Berlin, Update 1)

Can anyone recommend a relatively low-cost fitness tracker type of device that I can interface to with my own code (eg via CoreBluetooth on iOS)? Most of those that I've come across are seemingly expensive ( > A$200)

The device should at least have movement tracking capability. Other metrics are probably a bonus

I'm in the market for an Android device. It doesn't have to be a phone, however I'd prefer a device with a display at least the size of the Samsung S7 (maybe a little smaller). Also preferably inexpensive, however the absolute-must-have requirement is that the OS is upgrade-able in a timely manner (i.e. not having to wait ages for the manufacturer to provide one), and of course that I can build for it with Delphi.

Suggestions?

Post has attachment
I'm using the Java2OP tool to import some classes from the Android API, including this one:

https://developer.android.com/reference/android/security/keystore/KeyGenParameterSpec.Builder.html

The docs say the class was introduced in API level 23, and Java2OP finds the class to import, however when it does import, some methods (eg setBlockModes) are missing. I added the ones I want manually, however when the app runs, I receive the error:

Project1.apk raised exception class EJNIFatal with message 'Invoke error: method not found'

I have my SDK options all pointing to level 23, and the device has Android 6.0.1 (API level 23). Is this perhaps a bug that it's unable to find the method?

Post has attachment

At the moment, I'm looking for justification (if any) for using a service like Kinvey for push notifications for mobile devices. Take the example where there's an existing DB of customers, and you're (probably) able to associate one or more devices with each customer by adding a table that links them.

Apparently Kinvey does the "push work" for you (i.e. sends push notifications to iOS and Android devices), however it looks like you still need to build the list of customers and their devices anyway so that it knows where to send them.

I figure I could extend TBackendPush and just do the push to Apple and GCM myself. Of course this all entails extending a backend service (or building one).

Would there be any advantage here in using something like Kinvey?
Wait while more posts are being loaded