delphi-xe5

Play a sound alert/beep on Delphi XE5/Android platform

不羁的心 提交于 2019-12-09 03:36:19
问题 Is there any way to play a sound alert/beep on Delphi XE5/Android platform? What I'm trying to achieve is how to play system alert/beep sound like Windows application using Beep function or at least find the path of system's audio files so I can run specific audio file based on an event. 回答1: I ended up using resource files to play my custom audio file. Steps: From Delphi IDE click on "Project". Then select "Resources and Images...". Choose your media file and set it as RCDATA. Remember your

Xe5 locationsensor distance doesn't work?

╄→гoц情女王★ 提交于 2019-12-08 13:23:53
问题 I use in my app TLocationSensor on Android but I have a problem with Distance property. If I set 10 meters and I don't move OnLocationChange is fired. What should I set and how to make it work ? 回答1: Probably the XE5's location sensor component does work - it is just the device incapable of providing Delphi accurate enough data under given circumstances. You can take some mapping software like MapSoft Navigator and record a track for few hours. If that track would show the significant

How can I show the keypad (type vktNumberPad) with decimal for input, with Delphi in android

岁酱吖の 提交于 2019-12-08 06:32:15
问题 As would edit.setInputType (InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL | InputType.TYPE_NUMBER_FLAG_SIGNED) In Delphi XE5. I only see how to select the keyboard type vktNumberPad , but does not show the decimal. 来源: https://stackoverflow.com/questions/19274897/how-can-i-show-the-keypad-type-vktnumberpad-with-decimal-for-input-with-delph

Is PascalScript compatible with Delphi XE5 to create Android/iOS/Windows applications?

空扰寡人 提交于 2019-12-08 03:38:01
问题 I want to create an application that will draw simple forms based on JSON data. I need to have a script to put intelligence on that. Is Pascal Script from RemObjects a solution for that? Is is compatible to generate application with the same source code for Android, iOS and Windows? EDIT: Extending to better understand the need: I have a delphi program that draws a form (pretty much like a dfm file, as a descriptor) and fill it with data from a database. However there is a need for

Component sizes in Delphi Android

我的梦境 提交于 2019-12-08 01:55:16
问题 I am creating an Android app in Delphi XE5 using Firemonkey, and for one of my forms I need a TImage that will fill the entire form where I can draw on it's Bitmap. What I did was this: I added a TImage component to my form and set it's Align := alClient. In the designer it fills the entire form. In my FormCreate procedure I initialized the Bitmap of the TImage by setting it's size to the size of the TImage procedure TDrawForm.FormCreate(Sender: TObject); begin Image1.Bitmap.SetSize(Trunc

Delphi XE5 Android - Storage path problems

馋奶兔 提交于 2019-12-08 01:26:56
问题 I started doing an app for android in Delphi XE5, and encountered some troubles. I really don't understand about getting paths. After I set the permissions to Write and Read External storage, I tried to get paths so I can see where I'm saving files I create, and this is what I get: for System.IOUtils.TPath. -> GetDocumentsPath; - /data/data/com.myapp.app1/files GetDownloadsPath; - /storage/emulated/0/Android/data/com.myapp.app1/files/Download GetHomePath; - /data/data/com.myapp.app1/files

Delphi xe5 exec root command conversion

落花浮王杯 提交于 2019-12-07 22:32:19
问题 i tried to covert Runtime and Process to send shell command to the rooted phone i don't understand why i had segmentation fault. On internet i found java code like: Runtime.getRuntime().exec(new String[]{"/system/bin/su","-c","reboot now"});` for reboot of the phone or `Runtime.getRuntime().exec("su"); for linux root privileges. I tried only to send the "su" command with a function after the conversion but i think i wrong something... I think that one possible problem can be the array of

How to stretch image in Firemonkey?

怎甘沉沦 提交于 2019-12-07 18:09:14
问题 I would like to resize an image to a predefined bitmap of 64 * 64, regardless of its current dimensions and aspect ratio. I tried Bitmap.ReSize but that keeps the aspect ratio. I tried TImage and set the WrapMode to iwStretch . That works to a certain extent in that it indeed rescales the image as I want it, but I can't find a way to get that image out of the TImage . The Bitmap property of TImage still contains the original bitmap. Does anybody know how to fetch the Image from a TImage as it

Waiting for Invoke to finish when using IOmniTaskControl/TOmniWorker

不问归期 提交于 2019-12-07 14:35:55
问题 I've created an IOmniTaskControl using a TOmniWorker, so that I can periodically run chunks of code an a specific thread. So I'll be calling Invoke as needed on this IOmniTaskControl. When I do so, I will sometimes need to wait for the execution associated with that work to complete. I tried calling WaitFor(INFINITE) on the IOmniTaskControl after the Invoke, but it hangs. I debugged and could see the method on the Invoke call completed. Am I misunderstanding the use of WaitFor with

How can I show the keypad (type vktNumberPad) with decimal for input, with Delphi in android

走远了吗. 提交于 2019-12-07 04:35:30
As would edit.setInputType (InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL | InputType.TYPE_NUMBER_FLAG_SIGNED) In Delphi XE5. I only see how to select the keyboard type vktNumberPad , but does not show the decimal. 来源: https://stackoverflow.com/questions/19274897/how-can-i-show-the-keypad-type-vktnumberpad-with-decimal-for-input-with-delph