delphi-xe5

Accessing Photo File

丶灬走出姿态 提交于 2019-12-13 02:05:07
问题 I use the standard TTakePhotoFromCameraAction in my application in order to take a photo. What I would like to do, is when the user closes the application and then open it again, the last taken photo to be uploaded. I know how to use SharedPreference in delphi, but I don't know what is the filename & path of the photo it self! Any clues? 回答1: The TTakePhotoFromCameraAction.OnDidFinishTaking event gives you a Bitmap of the taken photo. It is then your responsibility to save it where and how

Delphi XE5 - strange behavior help needed

拟墨画扇 提交于 2019-12-13 01:55:23
问题 I'm working on TLogger class that is logging my application logs to file... I have to way of getting Logs from File to TMemo: 1. assign TMemo to TLogger class then, assign True to DisplayInMemo property, then just call GetLogFromFile(); 2. call GetLogsFromFile(); then Self.Memo1.Text := TLogger.LogsResult; Below... Commented solution works fine... Uncommented solution works only every 2 click on button 4 procedure TForm1.Button4Click(Sender: TObject); // get log.file to memo begin //

BASE64 Encode and Decode is not working

左心房为你撑大大i 提交于 2019-12-12 16:32:05
问题 I am working on android applicatin in Delphi XE5 and I need to BASE64 encode and decode some strings. This function is working fine for english characters, but what I want to encode €, $ or any special iso8859-2 characters encoding doesn't work. Any idea how to fix it? I found BASE64 unit http://www.delphipraxis.net/991-base64-mime-en-decoding.html But does FireMonkey support AnsiString and PAnsiChar type and what unit to include to use this type? My code uses IdCoderMIME; ... function

Delphi XE5 Acces Violation on app start

匆匆过客 提交于 2019-12-12 13:54:37
问题 On two computers is ok, on three there is the same exception with the same addres for AV. Thank for help begin Application.Hinthidepause := 30000; Application.Initialize; Application.MainFormOnTaskbar := True; Application.CreateForm(TForm1, Form1); Application.CreateForm(TForm2, Form2); Application.CreateForm(TForm3, Form3); Application.CreateForm(TForm4, Form4); Application.Run; end; exception class : EAccessViolation exception message : Access violation at address 00405361 in module

Error Invalid PLATFORM variable “MCD” [duplicate]

白昼怎懂夜的黑 提交于 2019-12-12 12:19:58
问题 This question already has answers here : Why Delphi says 'cannot resolve unit name xxx'? (5 answers) Closed 6 years ago . I've just installed Delphi XE5 since I wanna try to develop with android. But I cannot compile anything because I always get an error message. This is the error I get while I compile: [Error Error] Invalid PLATFORM variable "MCD". PLATFORM must be one of the following: "Win32", "Win64", "Android", "iOSSimulator", "iOSDevice", or "OSX32". If PLATFORM is defined by your

Application taking a really long time to synch threads ( or not at all )

大兔子大兔子 提交于 2019-12-12 10:29:17
问题 I am using REST components in Delphi XE5 (iOS and Android). I am testing via the iOS simulator currently, and my application often hangs at the following line within my code: R_Request.Execute; After some debugging, I find it it specifically hangs at this line of code within the REST.Client.PAS: HandleEvent(DoAfterExecute); which looks like: procedure TCustomRESTRequest.HandleEvent(AEventHandler: TMethod); begin // Handle Synchronized if we are NOT already in the main thread // NEVER call

Make Chrome open on second monitor?

核能气质少年 提交于 2019-12-12 09:45:15
问题 I'm currently trying to make an app that forces a Chrome window to open on my second monitor but I can't find anyway to do it using arguments, now I'm wondering if I can somehow use Delphi to force it to open on the second screen or a specific pixel? This is solely an app for myself and my PC so I can put the code in specific for my case. I'm currently using this bit of code to start the app procedure TForm1.BtnClick(Sender: TObject); begin ExecProcess(ChromePath,'',False); end; function

How to send email using gmail app in Delphi XE5?

折月煮酒 提交于 2019-12-12 05:43:15
问题 It's simple: i'm trying to create an email using the gmail app for android, just like when you share something using gmail. I have no idea how to do it. 回答1: Found it: procedure TfrmSendMail.CreateEmail(const Recipient, Subject, Content, Attachment, Attachment2: string); var Intent: JIntent; Uri: Jnet_Uri; AttachmentFile: JFile; begin Intent := TJIntent.Create; Intent.setAction(TJIntent.JavaClass.ACTION_SEND_MULTIPLE); Intent.setFlags(TJIntent.JavaClass.FLAG_ACTIVITY_NEW_TASK); Intent

Delphi XE5 Firemonkey TStringGrid OnClick event

吃可爱长大的小学妹 提交于 2019-12-12 03:39:44
问题 I have a very strange problem with Delphi Firemonkey TStringGrid on Android. It looks like that events on TStringGrid are triggered differently on windows and android platform. For example: in windows firemonkey application I have a string grid with a few columns. TStringGrid is set as read only. OnClick event I have the following code: TStringGrid(Sender).Cells[TStringGrid(Sender).ColumnIndex,TStringGrid(Sender).Selected] := 'result'; Android application has exactley the same code OnClick

How to make my own dialog component from Firemonkey TPopUp?

穿精又带淫゛_ 提交于 2019-12-12 02:50:20
问题 [Delphi XE5 Up2] I am trying to use TPopUp to inherit and create a component, following the same idea as exposed on the Flyouts demo for the CalendarFlyout. I will be not using the Calendar, but I want that space free so that I can place any other FMX component that I want. I have made the component using the new component wizard and added some controls: unit PopupTest; interface uses System.SysUtils, System.Classes, FMX.Types, FMX.Controls, FMX.Layouts, FMX.StdCtrls; type TPopupTest = class