firemonkey

Delphi 10 Seattle Android service (TAndroidService) receiving GCM

被刻印的时光 ゝ 提交于 2019-12-24 00:26:05
问题 Is it possible possible to receive Google Cloud Messages within an android service (TAndroidService)? It works fine in an application, but when I try to do the same in an android service (local service) I always get the same error... I have tried it with TKinveyProvider and TPushServiceConnection, but when I debug it, I get an "Activity not found, maybe you are in a service" error. 来源: https://stackoverflow.com/questions/36546294/delphi-10-seattle-android-service-tandroidservice-receiving-gcm

How to show a firemonkey form on second monitor

穿精又带淫゛_ 提交于 2019-12-23 19:02:37
问题 I am trying to display a FireMonkey form on a second monitor, using C++Builder with following code: void __fastcall ShowFormOnScreen( int OutMon ) { MyForm->Top = 0; MyForm->BorderStyle = bsNone; MyForm->WindowState = wsNormal; MyForm->Left = Screen->Monitors[OutMon]->Left; MyForm->Height = Screen->Monitors[OutMon]->Height; MyForm->Width = Screen->Monitors[OutMon]->Width; MyForm->Show(); } Unfortunately, the Screen object does not have the Monitors property, so how can do this in FireMonkey?

How to draw a dotted line in Firemonkey?

感情迁移 提交于 2019-12-23 17:25:09
问题 I want to draw a dotted grid on a TPaintbox canvas in a Firemonkey project, the outcome should be exactly like this: To start with I thought I would draw the vertical dotted lines and then the horizontal dotted lines, so with that in mind I attempted to draw a single line first in attempt to get the appearance just right, this is what I tried: Canvas.Stroke.Color := TAlphaColorRec.Black; Canvas.Stroke.Dash := TStrokeDash.Dot; Canvas.Stroke.Kind := TBrushKind.Solid; Canvas.Stroke.Thickness :=

Click events being caught by list view parent item

…衆ロ難τιáo~ 提交于 2019-12-23 17:25:09
问题 I'm writing a custom switch object to be used in Firemonkey's TListView control per item. Everything works as expected, except for one strange glitch. When the user clicks on one of the items, but not on the particular switch object, it toggles the switch anyway. I'm assuming the MouseDown event is triggered when the user clicks on the list item, and not necessarily my particular "control" drawn on it. How do I restrict the click event to only apply when the user clicks the actual switch? JD

How to get model number of the phone?

一曲冷凌霜 提交于 2019-12-23 16:07:03
问题 I am targeting Android with Delphi XE7. I would like to obtain the model number of the phone. That is, I would like to obtain the information highlighted in this image: How can I achieve this? 回答1: You can use DeviceType := JStringToString(TJBuild.JavaClass.MODEL); OSName := GetCodename(JStringToString(TJBuild_VERSION.JavaClass.RELEASE)); OSVersion := JStringToString(TJBuild_VERSION.JavaClass.RELEASE); There is a sample here. I hope it'll be useful 来源: https://stackoverflow.com/questions

How to convert Rich Text RTF to plain or HTML in Delphi XE4?

大城市里の小女人 提交于 2019-12-23 12:27:48
问题 In Delphi XE4 FireMonkey, I have some RTF in a stream from a database. It uses only fonts, sizes, bold and italics. How can I extract the plain text or convert it to HTML? Can I somehow use JVCL's component(s) even though I'm using FireMonkey ? 来源: https://stackoverflow.com/questions/21612243/how-to-convert-rich-text-rtf-to-plain-or-html-in-delphi-xe4

Get TextSettings.Font.Style property with GetObjectProp using Delphi Tokyo 10.2

五迷三道 提交于 2019-12-23 10:09:40
问题 I'm using Delphi's GetObjectProp function to get the properties of the form components, I get all the properties of several components, but I can not get the TextSettings.Font.Style (Bold, Italic, ...) property of components like TLabel for example. I need to know if the component text is bold or italic. The procedure I am working on trying to get these properties follows below: procedure Tfrm1.aoClicarComponente(Sender: TObject); var TextSettings: TTextSettings; Fonte: TFont; Estilo:

Delphi FireMonkey store data inside application

﹥>﹥吖頭↗ 提交于 2019-12-23 09:03:41
问题 I need to store some custom, static data inside my Delphi XE5 FireMonkey (Android) mobile application. I have seen a 'RC_DATA' solution on the web, but it is windows-specific. I need a cross-platform solution. Here is the RC_DATA solution I discovered:http://delphidabbler.com/articles?article=2 A comment in the code sample reads: // resource type - RT_RCDATA (from Windows unit) I concluded from this comment that the code inside the Windows unit was Windows-specific. I apologize if this is not

How can I launch the Navigation app on iOS and Android with RAD Studio FireMonkey?

孤街浪徒 提交于 2019-12-23 05:25:07
问题 I know that I can Programmatically open Maps app in iOS 6 using a URL like maps.apple.com/?q=Firehouse+Subs , but how can I get this to work with FireMonkey? I am able to put it into a WebBrowser, but it just displays the web interface for Google Maps. Also I know that this won't work for Android, but I can use an intent to handle that, but FireMonkey does not seem to expose that either. UPDATE: Further research reveals that this may be impossible for the time being, even if I wrote some

delphi XE-5 cross platform development - calling a showmodal form

筅森魡賤 提交于 2019-12-23 05:23:05
问题 I am currently developing cross platform applications on my Windows desktop using Delphi XE-5. I have a unit I want to use for cross platform development (for this example, lets just work with Windows and Android). In both my Windows and Android apps, I have a button with the following onClick event procedure TfrmMain.Button1Click(Sender: TObject); begin LPSystem:= TLPSystem.Create; try if LPSystem.execute then begin ShowMessage('Logged in!'); end else ShowMessage('Not logged in!'); finally