Search the Community
Showing results for tags 'android'.
Found 156 results
-
Seeing External exception 0 error using TRESTRequest on some Samsung phones
Chris Pim posted a topic in Cross-platform
We've been having a strange issue using the TRESTRequest component with some of our users. When we call the request.execute on those devices, it always raises an exception with the message of "External Exception 0". Weirdly it only seems to happen on Samsung devices, particularly newer models such as the S22 Ultra (but not exclusively that device). It happens for every API call we make, but only affects our app. The user reports that all their other apps can talk to the internet fine, so not sure what this could be. We have a number of newer Samsung test devices but can't reproduce this issue. The error seems to be coming from the OS rather than Delphi, but I can't see any reason for it. We've been exploring device config-specific factors such as firewall apps, disabling data access to the app etc but there doesn't seem to be anything special. Most affected users keep their devices as factory default for these settings. I've extract a logcat from those devices (I don't have physical access to the device though), and it doesn't show any errors, warnings or messages related to network access, security or things I would expect if the OS was the cause. We're running out of ideas, and the users are becoming frustrated as they can't use the cloud features of our app. I'd really appreciate any thoughts, suggestions or even just troubleshooting theories that could help to figure this out. Thanks! -
Hello, I still am on Delphi 10.1, because it does all what need and I hat spending 2 days installing all my third party components after upgrading to a new Delphi version. And of course it is not that cheap any more as it used to be, when I started with Delphi a long time ago. Unfortunately an Android app I made with Delphi 10.1. does not start on a new device with Android 11. Is there a way to get an app, that is made with Delphi 10.1 working on Android 11 or do I have to upgrade to Delphi 11.x? Any help would be highly appreciated.
-
Currently, I'm working on an Android 13 FireMonkey mobile app (Delphi 11.3) with a TabControl with about four tabs. The app is grabbing JSON data from a URL and manually parses and loads the data into a FDMemTable. The app has very small data requirements (ie., single user, single table, and the JSON file would exchange only about 25 records per day containing about a dozen or so key/value pairs). Besides the memory table, I'm using an embedded database (SQLite) to store the data on device using LocalSQL features to implement database CRUD operations. My concern is persistence and restoring state if the app were to say crash/lose focus/device reset. Right now each time the app gains focus it starts from the beginning. For example, when running the app and then a call comes in on the device, my app loses its focus. When you return back to the app it starts as in the first time. I would like it if when the app restarts to remain in the same state it was before going to the background. I played around with the OnSaveState event on my main form, but it didn't behave the way I expected. For example, I send a mapping intent from my app to the default mapping app on the device for navigation. In this instance, the user temporarily leaves my app when the mapping app opens, and when closed, the user should return to my app. When I implement the OnSaveState event into my app (to read/write data to a stream) the user never returns to my app after closing the mapping app. But, if I remove the OnSaveState event, it does return back to my app, which is the desired behavior. How should persistence and restoring state be handled in an Android app?
-
delphi Thread ITask.ExecuteWork not wait until Task finish in mobile devices?
bravesofts posted a topic in Cross-platform
i have this code here: fTask: ITask; fTask := TTask.Create( procedure begin while not True do Application.ProcessMessages; TThread.Synchronize(TThread.Current, procedure begin // update ui end); end); fTask.ExecuteWork; // this will stop here.. until [fTask] finish work !! In android didn't wait untill Task Complete !!- 24 replies
-
- android
- multithreading
-
(and 2 more)
Tagged with:
-
Hello all, We've just deployed an update to our FMX app on the Play Store, but we're seeing a worrying number of ANRs reported in the Play Store vitals area. We've changed a lot in this latest update including much heavier use of styles from style books. We also can't reproduce the ANRs on any of our 10 Android test devices as it's only impacting < 1% of our user case (around 600 instances from 200,000 installs). I have a clear call stack (below) which is showing that the ANR is a block on a monitor when trying to apply the styles to my UI elements, loading the resource specifically. Does anyone have any ideas of how this could theoretically be caused? We do use a lot of threads so my first thing to check was that we weren't trying to update the UI from a thread without Synchronize or Queue but I can't find any case where we aren't. Any suggestions for what I could look for would be very welcome! Thanks Call stack: (System::Sysutils::WaitForSyncWaitObj(void*, unsigned int)+100) (System::Sysutils::WaitOrSignalObj(void*, void*, unsigned int)+96) (System::TMonitor::Enter(unsigned int)+528) (System::Rtti::TPoolToken::TPoolToken()+120) (System::Rtti::EnsurePoolToken(System::DelphiInterface<System::IInterface>*)::DoCreate(void*)+52) (System::Rtti::EnsurePoolToken(System::DelphiInterface<System::IInterface>*)+32) (System::Rtti::TRttiContext::KeepContext()+104) (System::Classes::BeginGlobalLoading()+20) (Fmx::Controls::TStyleContainer::LoadStyleResource(System::Classes::TStream*)+40) (Fmx::Controls::TStyleContainer::CreateStyleResource(System::UnicodeString)+92) (Fmx::Controls::TStyleContainer::FindStyleResource(System::UnicodeString, bool)+36) (Fmx::Controls::TStyledControl::LookupStyleObject(...)::LookupStyleInObject(void*, Fmx::Types::TFmxObject*, System::UnicodeString)+88) (Fmx::Controls::TStyledControl::LookupStyleObject(...)::LookupStyle(void*, Fmx::Types::TFmxObject*)+84) (Fmx::Controls::TStyledControl::LookupStyleObject(...)+336) (Fmx::Controls::TStyledControl::GetStyleObject(bool)+236) (Fmx::Controls::TStyledControl::GetStyleObject()+28) (Fmx::Controls::TStyledControl::ApplyStyleLookup()+124) (Fmx::Controls::Presentation::TPresentedControl::ApplyStyleLookup()+52) (Fmx::Controls::TStyledControl::PrepareForPaint()+32) (Fmx::Controls::TControl::PrepareForPaint()+656) (Fmx::Forms::TCustomForm::PrepareForPaint()+504) (Fmx::Forms::TCustomForm::PaintRects(System::Types::TRectF const*, int)+76) (Fmx::Platform::Ui::Android::TFormRender::Render()+124) (Fmx::Platform::Ui::Android::TAndroidWindowHandle::TSurfaceViewListener::surfaceChanged(...)+56) (System::Rtti::Invoke(void*, System::DynamicArray<System::Rtti::TValue>, System::Typinfo::TCallConv, System::Typinfo::TTypeInfo*, bool, bool)+556) (System::Rtti::TRttiInstanceMethodEx::DispatchInvoke(System::Rtti::TValue const&, System::Rtti::TValue const*, int)+1328) (System::Rtti::TRttiMethod::Invoke(System::TObject*, System::Rtti::TValue const*, int)+84) (Androidapi::Jnibridge::dispatchToNative2(...)+692) at com.embarcadero.rtl.ProxyInterface.dispatchToNative2 (Native method)
-
I'm having difficulties getting HTML into the body of an email message when I send using intents, which opens the email app on the device to send the message. My application is able to put the html code into the body via this method but the message just shows the html code, not the browser type view of the code. What am I doing wrong? Code follows: procedure TfrmMain.SendMailViaIntent(const AText: string); var Intent: JIntent; sMessageBody:string; Recipients: TJavaObjectArray<JString>; begin sMessageBody:=Body.Lines.Text; //Intent := TJIntent.Create; Intent := TJIntent.JavaClass.init(TJIntent.JavaClass.ACTION_SEND); Recipients := TJavaObjectArray<JString>.Create(1); Recipients.Items[0] := StringToJString(AText); //Intent.setType(StringToJString('message/rfc822')); Intent.setType(StringToJString('text/html'));//not showing as html Intent.putExtra(TJIntent.JavaClass.EXTRA_EMAIL,Recipients); Intent.putExtra(TJIntent.JavaClass.EXTRA_SUBJECT, StringToJString(edOutSubject.Text)); //Intent.putExtra(TJIntent.JavaClass.EXTRA_STREAM, StringToJString(sMessageBody)); Intent.putExtra(TJIntent.JavaClass.EXTRA_TEXT, StringToJString(sMessageBody)); Intent.putExtra(TJIntent.JavaClass.EXTRA_HTML_TEXT, StringToJString(sMessageBody)); TAndroidHelper.Activity.startActivity(TJIntent.JavaClass.createChooser(Intent, StrToJCharSequence('Which email app?'))); end;
-
Hi everyone, i need to ask the permissions to read the notifications on the device, but i can't find the correct way to do it, in the project options i selected the "Bind notification listner service" permission. The code I use is this: uses ... Androidapi.JNI.GraphicsContentViewText, Androidapi.JNI.Provider, Androidapi.Helpers, Androidapi.JNI.JavaTypes, System.StrUtils ... procedure TFormTestPerm.Button1Click(Sender: TObject); //to show the permissions dialog VAR LIntent : JIntent; begin LIntent := TJIntent.Create; LIntent.setAction(TJSettings.JavaClass.ACTION_NOTIFICATION_LISTENER_SETTINGS); TAndroidHelper.Context.startActivity(LIntent); end; procedure TFormTestPerm.Button2Click(Sender: TObject); //to take the test VAR SecureS : JString; NomeAppS : String; begin NomeAppS := JStringToString(TAndroidHelper.Context.getPackageName); SecureS := TJSettings_Secure.JavaClass.getString(SharedActivityContext.getContentResolver, StringToJString('enabled_notification_listeners')); If AnsiContainsText(JStringToString(SecureS),NomeAppS) Then Label1.Text := 'SERVICE FOUND!' Else Label1.Text := 'NO SERVICE FOUND'+sLineBreak+'"'+NomeAppS+'"'; end; but my application does not appear in the list. I've found a few solutions on the net that I still can't get to work. Does anyone know the proper way to ask for this type of permission?
-
Hi. As the title says, I cannot debug any Delphi FMX application on my Android phone. I'm using the latest Delphi version (Alexandria, Update 1), and my phone is Samsung A52s. When I try to run in debug mode, the app installs, a black screen shows up on the phone, and RAD studio layout transforms to Debug layout. Two outcomes may happen after that: I get the exception Stop(17), which leads me to CPU view and a call stack containing only "clone" and "bionic_clone", The app stays entirely black, and either nothing happens or RAD studio disconnects after a minute of being in the debug mode. On further investigation, I realized that if I set a breakpoint on Application.Initialize, it is never triggered. Also, if I set a breakpoint while the debugger is attached, RAD studio freezes for ~10 seconds, and after it unfreezes the debugger disconnects (while the app is still running on the phone, still as a black screen). Useful info: The app runs completely normal when opened without the debugger. I am able to debug blank apps with Android Studio. I tried using a different SDK version. I have another phone, Samsung A5 (2017) that can be used with the debugger (but it randomly restarts when debugging, hence unusable). A52s uses Android 12, while A5 is Android 8 (Oreo). I also attached logs from logcat, that are filtered for anything that matches with the app name 'com.embarcadero.BetterProgress'. I don't know what other information may be of use, so if I missed something feel free to write it in the comments. Any idea is appreciated! android-log.txt
-
Hi. I am making Android app, and i add Android Service to project, guided by this video: Code in the Android Service: unction TDM.AndroidServiceStartCommand(const Sender: TObject; const Intent: JIntent; Flags, StartId: Integer): Integer; begin Result := TJService.JavaClass.START_STICKY; end; Calling from main project: FService : TLocalServiceConnection; FService := TLocalServiceConnection.Create; FService.StartService('F'); But when i lainch my application, it is crashing at once at start. When i launch my app under debugging, Delphi writing me: Full text on the attachment. Also, debugger get this code: I am using Delphi 10.4 CE.
-
How to intercept the bluetooth joystick button press when the screen is locked.
sneg74ok posted a topic in Cross-platform
Hi All! I have a joystick that is connected to my phone. When my application is running a can see than joysticks buttons are pressing. But when the phone screen is locked, I don't see notifications about it in my app. What can I do to receive joystick button press in my application when the screen is locked? Receivers code procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState); begin inc(i); Memo1.Lines.Add('i=' + IntToStr(i) + '; Key=' + IntToStr(Key)); end; The result of the application, photos of joysticks and the source code are in the attachment. KeyCodeReceiver.7z -
I have old app in Android. I have used uniDac to connect to sqlite database. The database is encrypted using leAES256 method. FD cannot connect to it. I need to convert database for FD. But when I use both of these in the app, Delphi gives an error : sqlite3.c:(.text+0xb5e8): multiple definition of `sqlite3_aggregate_context' (And many other errors) I know the reason for the error but how to convert the database when I can't use both of them?
-
I use delphi 11.2 in my ANDROID app, i must handling a javascript function's result, it's convert javasciprt to pascal is very hard to me. my way: run javascript in TWebrowser and get result, js result is OK, but, how can i get return value from TWebrowser? My thoughts: 1,execute js throught some library eg: ScriptGate? ScriptGate run javascript Error in delphi 11 . 2,modify TWebrowserm, add javascript callback feature? test_javascript.zip
-
Issue/Problem: when deploying an app to android that has the: (camera, json, or barcode components on a form) the app starts up with a black screen flame and hangs and closes down. Has anyone tried the trial version of TMS FNC WX Pack Android? -- link: https://www.tmssoftware.com/site/tmsfncwxpack.asp I have been having a difficult time with the trial version v1.5.1.0 (via Getit) working on my smartphone with Android 10, using Delphi 11.2 Alexandria Professional under Windows 7 and also Windows 10 laptops. The trial version states to set it in release mode (For mobile device deployment, the trial version supports deploying in release mode only) which I have done, but after the app is deployed I still have a black screen with the Delphi flame and it eventually closes whenever click out of the screen. I am hoping that someone with similar experience knows how to resolve this issue. I would really appreciate the help. Thank you.
-
Howto handle Android BluetoothLE permissions that are compatible to API29,30,31 ?
Rollo62 posted a topic in Cross-platform
Hi there, I was experimenting with the Android.template.xml, to use different API-related selections, to searate old and new Bluetooth settings. Some recommendations in the web point to this nice and clean solution, so separate APIs in the manifest: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="..."> <uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" /> <uses-permission android:name="android.permission.BLUETOOTH_SCAN" android:usesPermissionFlags="neverForLocation" /> <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:maxSdkVersion="30" /> <application ... /> </manifest> Using the android:maxSdkVersion and the android:usesPermissionFlags="neverForLocation" identifier would allow an easy control over different versions. Unfortunately this didn't work in my current setup, maybe I have to rry again with a clean project, but I see a failure "attribute neverForLocation is not available". This seems that targeting to API31 is needed, and I'm still under API30, in its D11 default setup. But I'm not sure why this message pops up, and is not simply ignored, if there is an unknown attribute. Probably this needs linked somehow to the API31, and API30 throws exception. To be rescued, maybe the android:maxSdkVersion might work under different versions in different configurations, to make Delphi compatible with several API's at the same time in one manifest ? To be clear, I'm not talking about the targetSdkVersion here, but if someone could make use of the android:maxSdkVersion attribute already. I'm curious if somebody has get this working as expected under Delphi. Beside that, what would be the best way to handle BluetoothLE under API30, to be compatible with old and new devices ? -
Windows 7 Home 64bit Delphi XE7 Professional update 1 with FireDAC and Mobile add-on Indy version 10.6.1.518 Android version 10, (on smartphone) Android versions 4.4.4, and 4.4.2 (both on tablets) Issue/Problem: When I launch the app on Android, and click on the [Submit] button, the app shuts down when it tries to access the idhttp section here: idHttp1.get(url_address); It works fine under Windows FMX and VCL, just not Android. Can someone please help me resolve this? Thank you. History: Hi. I have been successfully creating small utility apps on my android devices (Galaxy S10+ (android 10) and tablets (android 4.x.x)) for the last 8 years. I've been playing around with a new windows project using API through OMdbAPI (an IMDB knock-off) to get quick movie/tv series info. The API is free for 1000 requests. I love it. It works well. Usage is simple, using the following -> [https://www.omdbapi.com/?t=Contact&apikey={8-dig-key-code}] as it will give back a JSON string (below), then I parse it to get back a two-column detail to visualize the data better. Later I plan to fine-tune it and display only certain info from it. Right now, I am simply debugging it on Windows 7 and Android. {"Title":"Contact","Year":"1997","Rated":"PG","Released":"11 Jul 1997","Runtime":"150 min","Genre":"Drama, Mystery, Sci-Fi","Director":"Robert Zemeckis","Writer":"James V. Hart, Michael Goldenberg, Carl Sagan","Actors":"Jodie Foster, Matthew McConaughey, Tom Skerritt","Plot":"Dr. Ellie Arroway, after years of searching, finds conclusive radio proof of extraterrestrial intelligence, sending plans for a mysterious machine.","Language":"English, Spanish, German, Russian","Country":"United States","Awards":"Nominated for 1 Oscar. 14 wins & 32 nominations total","Poster":"https://m.media-amazon.com/images/M/MV5BYWNkYmFiZjUtYmI3Ni00NzIwLTkxZjktN2ZkMjdhMzlkMDc3XkEyXkFqcGdeQXVyNDk3NzU2MTQ@._V1_SX300.jpg","Ratings":[{"Source":"Internet Movie Database","Value":"7.5/10"},{"Source":"Rotten Tomatoes","Value":"68%"},{"Source":"Metacritic","Value":"62/100"}],"Metascore":"62","imdbRating":"7.5","imdbVotes":"274,457","imdbID":"tt0118884","Type":"movie","DVD":"16 Dec 1997","BoxOffice":"$100,920,329","Production":"N/A","Website":"N/A","Response":"True"}
-
In Delphi 10.4, I was able to get a listing of files in an Android 11 device's shared storage. In Delphi 11.2, with necessary permission set (either programmatically or on the device), TDirectory.GetFiles() is returning an empty list (ie. zero entries). TDirectory.GetDirectories() is working correctly, and using TFile.Exists() with a filename which I know to be present returns true. But, if I try to open that file with, for instance, TFile.ReadAllText(), access is denied. Any suggestions? This is an example program which fails in Delphi 11.2: unit test11main; interface uses System.Types,System.Classes,system.sysUtils,system.IOUtils,system.Permissions, {$IFDEF ANDROID} Androidapi.Helpers, Androidapi.JNI.JavaTypes, Androidapi.JNI.Os, {$ENDIF} FMX.Types,FMX.Forms,FMX.Dialogs; type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); private fOK:boolean; procedure PermissionsResult(Sender: TObject; const APermissions: TClassicStringDynArray; const AGrantResults: TClassicPermissionStatusDynArray); end; var Form1: TForm1; implementation {$R *.fmx} procedure Tform1.PermissionsResult(Sender: TObject; const APermissions: TClassicStringDynArray; const AGrantResults: TClassicPermissionStatusDynArray); var n:integer; begin if length(AGrantResults)>0 then for n:=0 to length(AGrantResults)-1 do if not (AGrantResults[n] = TPermissionStatus.Granted) then fOK:=false; end; procedure TForm1.FormCreate(Sender: TObject); var DataDir:string; p:Tarray<string>; LList: TStringDynArray; begin fOK:=true; { if I omit the next two lines and manually set permissions on the Android device it still does not work} p:=[JStringToString(TJManifest_permission.JavaClass.READ_EXTERNAL_STORAGE), JStringToString(TJManifest_permission.JavaClass.WRITE_EXTERNAL_STORAGE)]; PermissionsService.RequestPermissions(p,PermissionsResult,nil); if fOK then begin DataDir := TPath.GetSharedDocumentsPath; showmessage(DataDir); //correctly displays /storage/emulated/0/Documents Llist:=Tdirectory.GetFiles(DataDir); showmessage(inttostr(length(Llist))); //returns zero when run in Delphi 11.2 end else showmessage('permission refused'); end; end.
-
How can I list all my Android SDK details in text format?
JohnLM posted a topic in Delphi IDE and APIs
I am trying to work out some issues with compiling certain components and need to list out all installations that pertain to Android development. I use the Android SDK tool to install various Android files. Although I can compile apps and deploy them to my Android device, I believe that I have messed things up pretty well, I think. F:\Users\Public\Documents\Embarcadero\Studio\15.0\PlatformSDKs\adt-bundle-windows-x86-20131030\sdk\tools\ --> Android Tools And I want to list out the same details seen below but in "text" format (so that I can post it to someone). I don't want to post it as an image like the below, plus also because there are a lot more info not seen in this image below and would require multiple images to post, and it would be better to post a text file and send that off to the person. Is there a command line tool that I can use to obtain the same text and layout? I can clean it up to look in a similar layout as in the image just above if I have to. Thanks. -
Hello. To get string versionName value of field inside <manifest> key, in AndroidManifest.xml file, I use this code: function GetFileVersionName: string; var PackageManager: JPackageManager; PackageInfo : JPackageInfo; Begin PackageManager:= SharedActivity.getPackageManager; PackageInfo := PackageManager.getPackageInfo(SharedActivityContext.getPackageName, TJPackageManager.JavaClass.GET_ACTIVITIES); Result := JStringToString(PackageInfo.versionName); End; If the filed is in a meta-data key, inside <activity> section, like this... <meta-data android:name="productName" android:value="HelloWorld" /> how can change above code to retrive it? Thanks.
-
Prior to 11.2, I used Android Monitor to access Log.d messages from my Android apps. Monitor appears to have been deprecated, and so I have attempted to access logging through adb logcat. While this returns a large amount of logs, copying the output and performing a search for logs from my app returns nothing. I've also attempted adding parameters to filter on the app itself, such as: adb -d logcat <app name>:I *:S which returns: --------- beginning of main --------- beginning of system But nothing else. I have also tried Device Lens 1.3.0 (mentioned by Dave Nottage here), which detects the Android device, displays all processes & allows a screen capture, but clicking the play icon to display notifications only shows one message, and that's it. I had no problems accessing logs using this device and app with the previous version of RAD. I would be very grateful for any help with this matter, thanks in advance.
-
Greetings, I have a TMapView component on my firemonkey (android) form. It gets the map image nicely, and I can scroll, zoom in, etc... I need to be able to save that mapview image to storage on an android app, and I'm having no luck. I can't even copy it to another TImage component. Can anyone help me with this? - How can I save the mapview image to local storage on the android? - How can I copy the mapview image to another image component? I've tried things like image1.assign(mapview1.MakeScreenShot) to copy, and MapView1.MakeScreenShot.SaveToFile(filename), but neither of those work. (Assign doesn't do anything, and SaveTo results in an error. Any help would be appreciated. Thanks!
-
Hi, Updated to Delphi 11.2 the other day and now unable to install apk file to android device (Tab6 Lite). Compile gives me the following error Have two android apps and both give the same error, Can someone please help me understand what the problem is. Any help would be appreciated. Thanks in advance Bill Zwirs
-
The difficulties when trying to use OpenSSL filters on a DataSnap application with an Android client have numbers of entries in various forums that go back a number of years. To summarize the problem: 1. Create a DataSnap server that specifies a filter of RSA, in my case using Delphi 11 Update 2, running on a Windows server as a service. 2. Create a DataSnap client that is deployed to an Android device, in my case a Samsung SD-9 with an ARM64-v8a instruction set running Android 10 3. The client application crashes because it is unable to load a required OpenSSL module. I have tried a number of solutions that are discussed in various places but nothing works for me. My question is: Does anyone know of a RECENT posting that provides a workable solution to getting an RSA filter to work with DataSnap/Indy/Firemonkey on an Android device? My current understanding that the root cause of the problem is probably the failure of Indy to remain current with Google's erratic development habits, that has deprecated OpenSSL in favor of a branch called Boring. Has this been addressed effectively by anyone? If not, are there any plans to do so? Thanks in advance, Milan
-
I want to add a feature so user shall be able to rate my android application - set a range of stars. Does someone can show me a sample code how to do this?
-
[Solved](Delphi 11) (Android 12) 32-bit Debug Segment Fault 11 (TFile.Copy?)
Al T posted a topic in FMX
[See 2nd Post on Solution] I keep hitting this road-block. There no source code it's pointing to. It's just pointing to CPU assembly code. It's always the same segment fault. How do I trace it down? The segment fault happens when it gets around 33 or 34 files of ran*.txt. There's plenty of space left to create hundreds more files, but it likes to stop around 33 or 34 on the ran*.txt Tfile.copy? I added true to the end of it... but the overwrite parameter didn't help. Error: BFD: C:/Users/alt/Documents/Embarcadero/Studio/Projects/Filler/Android/Debug/FSP/debug/linker: don't know how to handle section `.relr.dyn' [0x 13] Process FSP.apk (4871) [Switching to Thread 5055] Process FSP.apk (4871) First chance exception at $BD9F069E. Exception class Segmentation fault (11). Process FSP.apk (4871) BD9F069E F8525023 ldr.w r5, [r2, r3, lsl #2] BD9F06A2 BF08 it eq BD9F06A4 2608 moveq r6, #8 BD9F06A6 4281 cmp r1, r0 BD9F06A8 EA460605 orr.w r6, r6, r5 BD9F06AC F8426023 str.w r6, [r2, r3, lsl #2] BD9F06B0 D1EE bne.n 0xbd9f0690 call stack thread --> :BD9F069E ??() :BD9A21A6 ??() :BD9A21A6 ??() it doesn't tell me where the error is... but I suspect it to be in this procedure because it's in the middle of creating the ran*.txt files: Global variables: var Form1: TForm1; FileDirectory, RandomFileToCopy: String; FilePermissions, DeleteFiles, DeleteInProgress: boolean; DeleteDirectoryList: TArray<system.string>; MaxFreeSpace: Int64; debugLines: TStrings; dButtonPreviousIsPressed: boolean; breakit: boolean; copydataActive: boolean; const FillerDiectoryNameConst = 'FILLER'; Procedure that I believe to be causing the segment fault: procedure TForm1.CopyData(); var DriveStr : String; FileNameCounter : integer; FolderCounter : integer; FolderName : string; FolderArea : string; RandomFileName : String; begin copydataActive := true; RandomFileToCopy := ''; FileNameCounter := 0; FolderCounter := 0; DriveStr := FileDirectory + TPath.DirectorySeparatorChar; RandomFileToCopy := DriveStr + 'random.txt'; // create random file //CreateNewRandFile(64000000); //64 mb file CreateNewRandFile(640); //640 file for testing purposes inc(FolderCounter); FolderName := 'rand' + IntToStr(FolderCounter); FolderArea := FileDirectory + TPath.DirectorySeparatorChar + FolderName; LabelLine2.Text := ''; while DirectoryExists(FolderArea) = true do begin inc(FolderCounter); FolderName := 'rand' + IntToStr(FolderCounter); FolderArea := FileDirectory + TPath.DirectorySeparatorChar + FolderName; LabelLine1.Text := 'Folder: ' + FolderName; if breakit = true then exit; end; try TDirectory.CreateDirectory(FolderArea); dString('CreateDirectory:'+FolderArea); except on E : Exception do begin dString('CreateDirectory(FolderArea):'+E.ClassName+' error: '+E.Message); copydataActive := false; exit; end; end; while CheckDiskSize(FolderArea) > 0 do begin if breakit = true then exit; RandomFileName := FolderArea + 'ran' + IntToStr(FileNameCounter) + '.txt'; FileNameCounter := 0; while FileNameCounter<126 do begin inc(FileNameCounter); RandomFileName := FolderArea + TPath.DirectorySeparatorChar + 'ran' + IntToStr(FileNameCounter) + '.txt'; try //if FileExists(RandomFileName) = true then DeleteFile(RandomFileName); LabelLine1.Text := 'Creating: ran' + IntToStr(FileNameCounter) + '.txt'; dString('Create RandomFile:'+RandomFileName); sleep(50); //dString writes to a file log file. TFile.Copy(RandomFileToCopy, RandomFileName, true); Except On E: Exception Do begin dString('TFile.Copy(RandomFileToCopy, RandomFileName):'+E.ClassName + ' ERROR: ' + E.Message); breakit := true; //break on error end; end; if breakit = true then exit; end; while DirectoryExists(FolderArea) = true do begin inc(FolderCounter); FolderName := 'rand' + IntToStr(FolderCounter); FolderArea := FileDirectory + TPath.DirectorySeparatorChar + FolderName; LabelLine1.Text := 'Folder: ' + FolderName; if breakit = true then exit; end; // all else fails... and it still is true... exit if DirectoryExists(FolderArea) = true then begin copydataActive := false; exit; end; try TDirectory.CreateDirectory(FolderArea); dString('CreateDirectory:'+FolderArea); except on E : Exception do begin dString('CreateDirectory(FolderArea):'+E.ClassName+' error: '+E.Message); copydataActive := false; exit; end; end; end; copydataActive := false; end;- 5 replies
-
- delphi
- alexandria
-
(and 3 more)
Tagged with:
-
Prevent TEdit FMX being overwritten by the virtual keyboard with the floating mode?
Fabian1648 posted a topic in FMX
Hi, I discovered on my test smartphone (samsung) that I can change the display mode of the virtual keyboard: Put it in a "floating keyboard" mode. This solves the problem since you can move the keyboard so that it no longer covers the input field. 3 questions arise: 1. Does this possibility exist on all Android smartphones and/or on all versions of the Android OS? 2. Question 1 for iOS smartphones 3. Is it possible to force this "floating keypad" mode via programming? Thank you for your feedback