Search the Community
Showing results for tags 'fmx'.
Found 148 results
-
Hi, I'm quite new to Delphi (12.2, FMX) so maybe I'm just missing some explanations. I have a FMX application with a main window and main menu (I see the issue on Windows 32/64 bit). The application shows other child windows and independent non-modal windows. When a shortcut is pressed in any active window and the shortcut is not directly handled by the child window, main window "intercepts" the shortcut. The event fires before any private code is executed and main window gets activated, child deactivated. This makes the whole application unusable, which is a pity after some 100K of lines of code....
-
I have an app that uses SqLite on Android and iOS in encrypted mode. I'm migrating the app from Delphi 10.4 to Delphi 12.2. I get a link error I've never seen before : [DCC Error] E2597 C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\AndroidNDK-21-23.0.53982.0329\android-ndk-r21\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.exe: error: C:\\Program Files (x86)\\Embarcadero\\Studio\\23.0\\lib\\Android\\Release/libsqlite_fde.a(sqlite3_fde.o): multiple definition of 'sqlite3_aggregate_context' The file libsqlite_fde.a exists in all delphi directories "lib/android/debug" and "lib/android64/debug". I attach all error strings. If anyone has an idea on how to fix it I would be very happy. Thanks. logs.txt
-
HI, I created my media gallery using Delphi 10.4.2 and it works very well. I'm migrating to Delphi 12.2 and the Gallery is having some issues. The gallery reads, and if it does not exist, creates thumbnail files of the images present on the device from the \storage\emulated\0\pictures\.thumbnails\ directory. Using API 34 when I open the file in this directory I get an access denied exception. In manifest I have these permissions: <uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" /> <uses-permission android:name="android.permission.MANAGE_MEDIA" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" /> <uses-permission android:name="android.permission.READ_MEDIA_AUDIO" /> <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" /> <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" /> <uses-permission android:name="android.permission.READ_MEDIA_VISUAL_USER_SELECTED" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="32" /> At runtime I check android.permission.READ_EXTERNAL_STORAGE and android.permission.WRITE_EXTERNAL_STORAGE. Now I use Nokia 2.2, Android 11 and Delphi 12.2.
-
TakePhotoAction crashes android app and starts again on xiaomi Android 12
fisipjm posted a topic in FMX
Crosspost Stackoverflow Environment: Delphi 12.2 (latest SP) APP for Android and iOS Hardware Pixel 7a (Android 15) / Xiaomi Redmi (Android 12 SP1) Problem: The issue only happens on the Xiaomi device (or possibly other brands I haven’t tested). It works fine on the Pixel. In my project, I load data from an API endpoint into a local SQLite database. Then, I take photos and save them alongside the downloaded data. Here is the problematic code: procedure TPhotoForm.TakePicture(Sender: TObject); begin if TOSVersion.Check(11) then ActionTakePhotoFromCamera.Execute; end; I’m using the exact same code from the Embarcadero example: https://docwiki.embarcadero.com/CodeExamples/Athens/en/FMX.PhotoEditorDemo_Sample The issue happens after calling the procedure. The system camera opens, and I can take a picture. However, when I select the picture (to trigger the OnFinishTakingPicture event), the app crashes. There’s no error message—the app just restarts like I launched it again. Here’s the twist: this doesn’t happen every time. After a few retries (3–4 attempts), or if I restart the app, the photo-taking process works fine. Once it works, it will keep working—unless I restart the app. To reproduce the issue consistently: Uninstall the app Reinstall it Take a photo on the first run. The crash happens every time in this scenario. Investigations so far: What works The sample app from Embarcadero works perfectly on the Xiaomi device. After realizing this, I tested a few things: Access rights At first, I thought it was an issue with access rights or the Android manifest. I updated everything to match the demo project. I also discovered that you don’t actually need camera permissions when using the system camera dialog. Interesting, but it didn’t help—the issue still occurs. Bug in FMX.MediaLibrary.Android Next, I looked deeper into the code for `TAction.TakePhoto`. I traced it to `FMX.MediaLibrary.Android`. There are two key methods I investigated: - `TImageManagerAndroid.TakePhoto` - `TImageManagerAndroid.TPhotoActivityResponseListener.onResponse` `TakePhoto` passes the required data to `FActivityClient.TakePhoto(LRequestParams);`, which is implemented in a JAR file. This always works as expected—it launches the system camera dialog. The `onResponse` method is called every time the camera dialog closes, even when the app crashes. If the app crashes, first, `Application.Run` is triggered, then `TPhotoActivityResponseListener.onResponse`. But when the app crashes, `LParams.OnDidFinishTaking` is invalid because the app restarts. So everything looks fine here—no obvious issues. Energy management It feels like some kind of battery-saving issue. Maybe Android is trying to free up resources and closes my app while the camera is open. To test this, I manually installed the APK and disabled all battery optimizations for my app. The crash still happened. Log Files I also checked the ADB logs. There’s a specific message logged every time the crash occurs, but I couldn’t find any information about it online neither do I know if this is a Problem or not. Here’s a snippet from the logs: 2025.01.23 09:48:27.293 W 5929 System.err org.json.JSONException: No value for cannong 2025.01.23 09:48:27.298 W 5929 System.err at org.json.JSONObject.get(JSONObject.java:398) 2025.01.23 09:48:27.298 W 5929 System.err at org.json.JSONObject.getJSONObject(JSONObject.java:618) 2025.01.23 09:48:27.298 W 5929 System.err at android.util.MiuiMultiWindowUtils.initFreeFormResolutionArgsOfDevice(MiuiMultiWindowUtils.java:1436) 2025.01.23 09:48:27.298 W 5929 System.err at android.util.MiuiMultiWindowUtils.initFreeFormResolutionArgs(MiuiMultiWindowUtils.java:1430) 2025.01.23 09:48:27.298 W 5929 System.err at android.util.MiuiMultiWindowUtils.<clinit>(MiuiMultiWindowUtils.java:212) 2025.01.23 09:48:27.298 W 5929 System.err at com.android.internal.policy.DecorViewMultiWinStubImpl.<init>(DecorViewMultiWinStubImpl.java:19) 2025.01.23 09:48:27.298 W 5929 System.err at com.android.internal.policy.DecorViewMultiWinStubImpl$Provider.provideNewInstance(DecorViewMultiWinStubImpl$Provider.java:14) 2025.01.23 09:48:27.298 W 5929 System.err at com.android.internal.policy.DecorViewMultiWinStubImpl$Provider.provideNewInstance(DecorViewMultiWinStubImpl$Provider.java:8) 2025.01.23 09:48:27.298 W 5929 System.err at com.miui.base.MiuiStubRegistry.get(MiuiStubRegistry.java:129) 2025.01.23 09:48:27.298 W 5929 System.err at com.miui.base.MiuiStubUtil.newInstance(MiuiStubUtil.java:77) 2025.01.23 09:48:27.298 W 5929 System.err at com.android.internal.policy.DecorViewMultiWinStub.newInstance(DecorViewMultiWinStub.java:11) 2025.01.23 09:48:27.298 W 5929 System.err at com.android.internal.policy.DecorView.<init>(DecorView.java:335) 2025.01.23 09:48:27.298 W 5929 System.err at com.android.internal.policy.PhoneWindow.generateDecor(PhoneWindow.java:2380) 2025.01.23 09:48:27.298 W 5929 System.err at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:2760) 2025.01.23 09:48:27.299 W 5929 System.err at com.android.internal.policy.PhoneWindow.getDecorView(PhoneWindow.java:2140) 2025.01.23 09:48:27.299 W 5929 System.err at android.view.Window.findViewById(Window.java:1516) 2025.01.23 09:48:27.299 W 5929 System.err at android.app.Activity.findViewById(Activity.java:3492) 2025.01.23 09:48:27.299 W 5929 System.err at com.embarcadero.firemonkey.keyboard.VirtualKeyboardFrameObserver.<init>(VirtualKeyboardFrameObserver.java:56) 2025.01.23 09:48:27.299 W 5929 System.err at com.embarcadero.firemonkey.keyboard.VirtualKeyboard.<init>(VirtualKeyboard.java:41) 2025.01.23 09:48:27.299 W 5929 System.err at com.embarcadero.firemonkey.FMXNativeActivity.onCreate(FMXNativeActivity.java:125) 2025.01.23 09:48:27.299 W 5929 System.err at android.app.Activity.performCreate(Activity.java:8176) 2025.01.23 09:48:27.299 W 5929 System.err at android.app.Activity.performCreate(Activity.java:8143) 2025.01.23 09:48:27.299 W 5929 System.err at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329) 2025.01.23 09:48:27.299 W 5929 System.err at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3752) 2025.01.23 09:48:27.299 W 5929 System.err at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3946) 2025.01.23 09:48:27.299 W 5929 System.err at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:106) 2025.01.23 09:48:27.299 W 5929 System.err at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 2025.01.23 09:48:27.299 W 5929 System.err at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 2025.01.23 09:48:27.299 W 5929 System.err at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2324) 2025.01.23 09:48:27.299 W 5929 System.err at android.os.Handler.dispatchMessage(Handler.java:106) 2025.01.23 09:48:27.300 W 5929 System.err at android.os.Looper.loopOnce(Looper.java:210) 2025.01.23 09:48:27.300 W 5929 System.err at android.os.Looper.loop(Looper.java:299) 2025.01.23 09:48:27.300 W 5929 System.err at android.app.ActivityThread.main(ActivityThread.java:8273) 2025.01.23 09:48:27.300 W 5929 System.err at java.lang.reflect.Method.invoke(Native Method) 2025.01.23 09:48:27.300 W 5929 System.err at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576) 2025.01.23 09:48:27.300 W 5929 System.err at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1073) So, after all this, I’m running out of ideas on how to solve this problem. At this point, it feels like Android is terminating some background processes, which causes my app to crash. This might be happening because my app uses more RAM compared to a simple demo application like the one provided by Emba. Does anyone else have experience with this issue or any suggestions on how to move forward? Any help would be greatly appreciated. Best Regards PJM -
I have a situation that occurs on low-end Android devices. Short version: When the user double-taps a button, the event is being executed on the button that hasn't been created on the screen yet. What happens is, I have a list of frames created on my screen, which represent the product categories. When I tap on a category frame, the application destroys the category frames on the screen and creates a new set of product frames. The problem is, when my user double-taps very quickly on the category frame, the second click is executed on the product frame that hasn't even appeared on the screen yet. I'm using delphi 12.2 My code is something like this: procedure CreateCategory; var frm: TFrameCategory; category: TObjCategory; begin for category in listCategory do begin frm := TFrameCategory.Create(nil, category); frm.OnClick := OnClickCategory; rectangleFrames.AddObject(frm); end; end; procedure OnClickCategory(Sender: TObject); var frm: TFrameProduct; prod: TObjProduct; i: Integer; begin for i := rectangleFrames.ControlsCount - 1 downto 0 do begin rectangleFrames.Controls.DisposeOf; end; rectangleFrames.ControlCollection.Clear; for prod in listProduct do begin frm := TFrameProduct.Create(nil, prod); frm.OnClick := OnClickProduct; rectangleFrames.AddObject(frm); end; end So, the second tap is executed in OnClickProduct instead of being executed twice in OnClickCategory. How can I prevent this? i've alredy tryed a lot of things like calling this procedure on the OnClickCategory event but it doesn't seems ideal procedure disableRecTemp; begin rectangleFrames.Enabled:= False; TThread.CreateAnonymousThread(procedure begin Sleep(1500); TThread.Synchronize(nil, procedure begin rectangleFrames.Enabled := True; end); end).Start; end
-
Hello, I want to conditionally change stock ImageListItemBottomDetail appearance TListViewItem (not the list but a single item) background color at runtime. Stylebook - background changes for whole background as far as I can see. Any help is appreciated. Thanks & Regards, Ertan
-
fix stretched splash 🔥 Delphi Android Tip: Fix Stretched Splash Images in Your Delphi Apps! 🚀
bravesofts posted a topic in I made this
Hey Delphi developers! If you've ever generated Android splash screen images using Delphi IDE and noticed they appear **stretched**, here's a simple way to fix that and ensure your splash image is always **centered without distortion**. ### Steps to Fix It: ) After building your project, go to the following paths where the splash screen files are generated: if your target android system is 64bit: <YourProjectDirectory>\Android64\Debug\<YourProjectName>\res\drawable <YourProjectDirectory>\Android64\Debug\<YourProjectName>\res\drawable-anydpi-v21 or <YourProjectDirectory>\Android\Debug\<YourProjectName>\res\drawable <YourProjectDirectory>\Android\Debug\<YourProjectName>\res\drawable-anydpi-v21 Copy both files **`splash_image_def.xml | splash_image_def-v21.xml`** from this folder and paste it into a new directory in your project (e.g., **`YourProjectDirectory\res\theme`**). 2 Open both files in Delphi IDE and add the following line inside each file: android:scaleType="centerInside" 3 Deployment: Go to Project > Deployment in Delphi IDE. Select all configurations for your target system. Click on the column header "Local Name" to sort the list by name. Scroll down, find the default splash xml files, uncheck them, and replace them with your newly edited files. Don’t forget to set the remote path for the new files according to the unchecked ones. That’s it! Clean&Rebuild and deploy your project, and you’ll see your splash image properly centered on all devices without any stretching! ------------------------------------------------------------------------------------------------- I hope Embarcadero adds this by default in an upcoming version to fix the issue. ------------------------------------------------------------------------------------------------- Hope this helps, and happy coding! If you have questions, feel free to drop them below.- 3 replies
-
- android splash
- fmx
-
(and 1 more)
Tagged with:
-
Hi. I'm trying getting permission from Android in my app, i'm using standart code for this: procedure TForm1.GetPermission; begin if not PermissionsService.IsPermissionGranted(JStringToString(TJManifest_permission.JavaClass.VIBRATE)) then PermissionsService.RequestPermissions([JStringToString(TJManifest_permission.JavaClass.VIBRATE)], procedure(const APermissions: TClassicStringDynArray; const AGrantResults: TClassicPermissionStatusDynArray) begin if (Length(AGrantResults) = 1) and (AGrantResults[0] = TPermissionStatus.Granted) then ShowMessage('Access granted') else ShowMessage('Access denied'); end); end; But that not works. My app not asking permission on the launch this code, it just sending message 'Access denied'. What's wrong and how fix it? Also, when i'm using this code for getting permission WRITE_EXTERNAL_STORAGE, all working right.
-
[DCC Error] E2597 android-ndk ld.exe: cannot find shlwapi.dll
GabrielMoraru posted a topic in Cross-platform
I get this error when I try to run my FMX program on my android phone: Both file exists: Windows -> shlwapi.dll c:\Delphi\Delphi 11\CatalogRepository\AndroidNDK-21-22.0.48361.3236\android-ndk-r21\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64\aarch64-linux-android\bin\ld.exe The NDK folder is 3,508,921kB. _______ It worked yesterday. What I have changed since then, was to install a USB driver from my phone's manufacturer (OnePlus Nord): OnePlus_USB_Drivers_Setup.exe It installed this file: c:\Android\adb.exe and more in Program Files. Uninstalling the program will not delete the c:\Android\ folder.- 1 reply
-
- android
- firemonkey
- (and 8 more)
-
Hi. I would like to sort the elements in a ComboEdit in the exact order of typing. That is... the combo should save the typing history of the inserted elements, with the last element in first position and so on... I don't see the sorted property to set the order of all the elements/items, which are, by default, sorted alphabetically. How can I do that?
-
Hello, Android has 24H/12H hour display format setting. I wanted to format my time values displayed as in system settings but I couldn't find how to read that specific is24HourFormat value. Delphi TFormatSettings does not include that information. There are earlier SO threads like this one. But that code gives me Invoke error: method not found. I also tried to import "android/icu/text/DateFormat" that I found in another SO answer and the app crashes without any error displayed. What would be the correct way to read that system setting? Thanks & Regards, Ertan
-
How to Force the Generation of a New Notification Token on iOS Without Reinstalling the App?
moises@coderbox.com.br posted a topic in FMX
Hello, Masters. I appreciate your help in advance. All of my production apps have stopped receiving notifications on iOS. They only start working again when the user uninstalls and reinstalls the app, which generates a new token that works correctly, both in Firebase Messaging tests and in notifications sent from my server. It seems that the previously generated tokens are no longer valid. Is there a way to force the app to generate a new token without requiring it to be uninstalled? Additionally, what is the best approach to handle users who already have the app installed in production, considering there are several hundred of them? -
Using Gesture Navigation in Android causes eventlistener to fail
fisipjm posted a topic in Cross-platform
Hi, unfortunately Emba is not responding to the Tickets in qp. https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-2047 https://embt.atlassian.net/servicedesk/customer/portal/1/RSS-2040 I Just wanted to ask, if someone encountered this problems as well. The Problem is, that some events are not Triggert reliable, if using the Android Gesture Navigation feature and do a HwBack Gesture. If you do not know what I mean with Android gesture Navigation, here is a Video: best regards, PJM -
I use the FMX TGrid control but I really miss some of the DevExpress TcxGrid behaviours yet I would like to go cheap this time and use OSS one. I am in search for a grid with: * Multi-column sorting * Ability to show/hide columns from UI * Filter Control (which shows a hyeretical tree control in a new form allowing picking columns, oeprators and operands) ala the DevExpress one * Bookmarks/Goto to Bookmark * Footer * In-place eidt for numeric and text * Display of custom drawn cell with images in cells * reoder columns with drag and drop * resize columns from ui * freezed column * Inplace seearch (go to the next found row with substring martch while typing) * grouping is optional I am aware of: * https://www.devexpress.com/products/vcl/fmx/data-grid/ * https://www.tmssoftware.com/site/tmsfmxgrid7.asp * https://www.devmachines.com/download-for-delphi.html But I am in search for a free control
-
The SwipeTransitionEffect does not work correctly in the Right to Left direction, it seems MousePoint cannot go negative. exp. SwipeTransitionEffect1.CornerPoint := TPointF.Create(250, 300); Bottom Right Corner of the image SwipeTransitionEffect1.MousePoint := TPointF.Create(-50, 250); Does not work correctly! Worked ok in 11.3 and before SwipeTransitionEffect1.CornerPoint := TPointF.Create(0, 300); Bottom Left Corner of the image SwipeTransitionEffect1.MousePoint := TPointF.Create(300, 250); Here it works as it should. Does anyone know if there are any changes made to the FMX Filters in Patch 1?
-
I am developing an android application on Delphi 12. My application connects to a DataSnap server. Some times, but not every time, my application throws this exception. Once when the application starts, the second time when a new form is opened and sometimes everything works without error I suppose everything crashes on line 312 in this module Those any one know the reason of this?
-
I have a problem when my andoroid device lost wifi and connection broke. I can not reestablished that in ordinary maner. My andorid application have TSQLConnection object that connects to DataSnap server application. Everything works fine until I issue network problem. When wifi temporarly lost connection TSQLConnection also lost connection and I get Socket error #103 when I try to open TClientDataSet and that is OK. When I try it once again it works fine. I supose my application successfuly reconnect and open the query. But when I tryed it for the third time I have Socket error # 104. And again. Once OK another time Socket error #104. There is no problems when wifi connection is stable. What should I do?
-
Hi, The TListView component offers just a swipe left to display the Delete button. While it's possible to customize the text with something else, it fires an event only to an Item "swipe left". I'd like to be able to swipe both directions, right and left, in order to check/uncheck (select/unselect) the current item. Any way to easily implement this? Or any available FMX component (even paid) that extends/derives from TListViews? Thanks for any help and suggestion
-
Specs: Delphi XE7, FMX, Win7, Galaxy s10+ phone Android 12. I've have compile and deployed many apps over to my Android 12 device, galaxy s10+ phone. Earlier this year (2024) I stopped working on those projects I used to compile in this setup/specs (listed above). Today, I am trying to deploy an app and now I can not because of the 'Unsafe app blocked message'. I recall seeing something similar in late Dec/2023 on this phone, but there was a button to allow or not, and now I don't see that on this message screen given on my phone. How can I resolve this?
- 14 replies
-
- delphi xe7
- fmx
-
(and 2 more)
Tagged with:
-
delphi delphi fmx tbuttonstyleobject effect not working in touch screen
Artur78 posted a topic in FMX
Could someone help me solve the problem with display and response to touch of the button? The test application contains a simple keyboard made of buttons (TButton), has configured TButtonStyleObject and everything works correctly but only when using a mouse. When the application is running on a device with a touch screen, then the visualization elements do not work. Could someone suggest how to easily solve this problem? -
My App with FMX on Windows has a standard TChart with a around 10 fastline series. Every series has a lot of data-points. After loading the data in the chart I will just set a tPanel( also on the form) from visible:= False to true. The displaying of the panel takes about 4 seconds. The same when hiding the panel again. To show this issue I have made a small test app, see attached. The testcase has these steps: 1. click fillchart - this takes some time, but this is not my issue 2. click showpanel and see how long it takes. Same when click and pull the border of the form to enlarge the form. (Chart ist not aligned as client so the size does not change) The app show the amount of chart repaint events in a label. This is done with a timer and in the event afterdraw of the chart the amount will be increased. So if you playing with the app size, clicking the chart, moving over the legend, click in the memo and so on you see that there are a lot of repaint events. You will also see some commented lines in the code what I have tried to fix this issue. I have made a call to embarcadero and the technician has checked it and the result ist that this should be a tchart issue. So I will be happy for all ideas and help. Thanks a lot. Andreas chartTest.zip
-
Hello I am porting a project to FMX (from VCL). I use a TSaveDialog with Filter for the file extensions : SaveDialog1.Filter := 'Acrobat file PDF|*.pdf|'+ 'Excel file(*.xls)|*.xls|'; As the user has choice for some extensions, I use the 'OnTypeChange' event to know the chosen extension. But when I change the extension this event does'nt fire, but the 'OnShow' event fires ! I tried TOpenDialog with the same problem. Some informations : * Delphi Pro 10.3.1 (I tried Delphi 10.3.3) * Event 'OnFolderChange' does'nt fire. Any idea ? Is there any option I missed ? Or a known bug ? Thx
-
I'm trying to use some custom button's style looks like in screenshot. There is just added TRectangle (in blue) in back of other controls. But this stopped button pressing event hiring - when press on button, it does nothing. Where is my bad?
-
I trying to add SSL function to my app. The app will be in win/android and IOS. I cant find a good example to make the calls to the server in HTTPS. Someone that knows witch DLL and can make a code example? Thansk
-
When compiling delphi fmx app using xcode 15.3 and 15.4 (beta) with IOS 17.4. The Delphi IDE returns the following error "Debbuging the application on device running IOS 17 or later is currently not supported." I urgently need to debug my app but I can't even use the IOS simulator. I'm using Delphi 12 but I've already tried it in Delphi 11.3