Raffaele Rossi
Raffaele Rossi

Reputation: 3127

Delphi android cannot use TPath

I need to store a picture taken from the camera and I am trying to use the code you can find below.

ImagePhoto.Bitmap.SaveToFile(  TPath.Combine(TPath.GetCameraPath, getNewName) );

In particular the variables names stands for:

I have included System.IOUtils in the uses clauses but the TPath doesn't work properly. When I press Ctrl and I click on TPath the IDE opens this

TPath = class(TCustomPath)

and that's inside the FMX.Objects, not it System.IOUtils! How can I fix this? I am using Delphi Tokyo.

Basically I need to know how to specify that I need the TPath from IOUtils.

Upvotes: 1

Views: 4686

Answers (1)

Uwe Raabe
Uwe Raabe

Reputation: 47714

Seems that FMX.Objects appears after System.IOUtils in the uses clause. Either change that or qualify the call to TPath:

ImagePhoto.Bitmap.SaveToFile(System.IOUtils.TPath.Combine(System.IOUtils.TPath.GetCameraPath, getNewName));

Upvotes: 5

Related Questions