Jump to content

Fabian1648

Members
  • Content Count

    56
  • Joined

  • Last visited

Everything posted by Fabian1648

  1. Fabian1648

    [Android] How to change regional settings

    I have already tried TFormatSettings.LongDateformat...
  2. Fabian1648

    [Android] How to change regional settings

    Here is my problem: Why the default TFormatSettings.ShortDateformat displays the year with 4 characters under Windows, but only with 2 characters under Android? Isn't there a way to notify Android that you want the year with 4 characters instead of 2 without changing the regional settings?
  3. Fabian1648

    [Android] How to change regional settings

    When you have a software that is used in different countries, the date display format changes from one time to another (In France, you will have a "dd/mm/yyyy", in the USA a "mm-dd-yyyy", etc.). If you use a custom format in the code, you will have to create a custom format for each country!!!!!!!!!! So, I would simply force the display of the year with 4 characters instead of 2...
  4. Fabian1648

    [Android] How to change regional settings

    I have a problem with FormatSettings.ShortDateFormat: When I use it to display a date according to the country standard (e.g. the order "day, month, year" is not suitable in the USA), the year is only displayed with 2 characters. I'd like to take advantage of the default date format defined by the Android device OS but force the year to be displayed with 4 characters instead of 2. If I force the date format (example with a "dd mm yyyy"), I will lose the automatic adaptation of the date format according to the country...
  5. Hi, In an Android application, how can we catch the exception that is triggered when we make a REST request that remains unanswered. The following code does not work. When we launch the REST request, the app freezes until the REST timeout is exceeded and then Android displays a message "the app does not respond" try //Blabla... except on E: Exception do begin //blabla... end; end;
  6. Hello, I developed an FMX app for Android with Delphi Rio. On Android 9, the app icon is well readable. On Android 10, the app icon is reduced to a small size with a huge white frame around it. Here are 2 examples: Some apps have a "full size" icon (Editor++) and others an icon with a huge white frame (Droid Info). Does anyone know a solution to have a full size icon without the white frame?
  7. @vfbbStarting from an empty project, I have done your example successfully. Now I have my standard icons (.png files up to 144 pixels). How can I use my .png files as Adaptive Icon? I have converted a .png file to .svg (I obtain about hundred different "d=" lines!... I concatenated them to have only one "d="), but in the end I obtain only on the Android device a white square as icon. I have as "ic_laucher_background.xml": <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="108dp" android:height="108dp" android:viewportWidth="108.0" android:viewportHeight="108.0"> <path android:name="square" android:fillColor="#ffffffff" android:pathData="M0,0 L108,0 L108,108 L0,108 z" /> </vector> I have as "ic_launcher_foreground.xml" <vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt" android:width="108dp" android:height="108dp" android:viewportWidth="108" android:viewportHeight="108"> <path android:name="square" android:fillColor="#ffffffff" android:pathData="M1590 1370 c0 -5 5 -10 10 ..........." /> </vector> Is this the right approach to tranform my .png icons in adaptives icons?
  8. I must be a fool because I tried to follow the examples of both Dalija and vfbb and it doesn't work with Delphi Rio: I still have the basic icons (the Delphi flame). In my case, it's the customized Android OS of the device manufacturer that shown my icon with an external white frame. Are the adptative icons the only solution to remove this problem or is there an alternative way to disable this customized behavior?
  9. @corneliusdavid: Yes! I wrote " On Android 10, the app icon is reduced to a small size with a huge white frame around it". I tried it on another Android 10 device and the icons appear normal. So the problem is not with Android 10 but with the use of Android 10 by the device manufacturer. I tried to add files through "Project > Deployment": I can add a file but I can't modify the corresponding values, I end up with an empty value under "Local path" and the value "file" under "Type" without being able to edit and modify the values linked to the added file. @ dalija.prasnikar: I looked at your zip. So if I understand correctly: I don't modify in "Project > deployment" the icons defined by Delphi via "Project > options" I add the files of the additional icons in "Project > deployment" I modify the manifest.xml file Is this correct?
  10. Thank you for your answer. But I don't see how to put the proposed solution into practice. With Delphi Rio in the project options, you can only set for the icons .png files with the right resolution (if for the 144x144 icon, you propose an image with another size, Delphi detects it and refuses the proposed file). So the stories of adaptive icons and other vector images, I do not see how to add them to my project. Is it by modifying the manifest.xml file?
  11. Fabian1648

    [Android]How to make an event listener?

    Hello, Is there a solution with FMX to have an events listener that detects all the events that are triggered in an app? Thanks for all
  12. Fabian1648

    [Android]How to make an event listener?

    Thanks for your answers
  13. I am developing an app that connects to a server with an invalid certificate (because the server only has an IP address and no URL). With Delphi Rio, my app makes REST requests using the token provided by the server. If I compile the same app with Delphi Sydney, the REST requests end with an "invalid or missing server certificate" error. Has a change been made in Sydney to deny the REST connection in case of an invalid certificate?
  14. Hi, In an Delphi Rio FMX app, how can we get the name of the control if we click on it? In a VCL, we can use: ctrl := FindVCLWindow(Mouse.CursorPos) ; ShowMessage(ctrl.Name); Is there a similar approach for FMX?
  15. Hello, I want to display a "loading in progress" screen while a REST request is retrieving data from a server (execution time: 1.5 seconds with Windows, 6 seconds with Android): On click of a button on the initial form, the app display the "loading in progress" screen and start the REST request. At the end of the REST request, return to the initial form. 1) With windows, if I use the following code: The "loading in progress screen" is displayed after the end of the REST request. 2) With windows, if I use the following code: The "loading in progress screen" is displayed and the REST request start. But on Android, it doesn't work: The REST request runs but the screen "loading in progress screen" is never displayed. How can I proceed to have the right behavior? Thank for your help
  16. Hi, I am asked to compile for iOS an app that was previously developed for Android. Not being a customer of Apple products and having to meet only a one-shot need, the purchase of an Apple product is not on the agenda. I have heard that there are websites that offer the possibility to remotely compile for Apple devices or that it was possible to go through a virtual OS (installation of a Mac OS via VirtualBox or VMware on a windows PC). Does anyone have any experience on the subject? What is the best solution based on your experience? Thank you for your opinion
  17. Fabian1648

    [Rio][FMX]How to compile for iOS without an Apple device?

    MacIncloud writes on their website that MacIncloud has a partnership with Embarcadero. But in their "Featured Tools and Applications", they write... "RAD PASERVER XE8, XE7, XE6" It looks rather old... Is compatibility with RAD PaServer still available today?
  18. Hi, I have several TEdit in an Android App developed with Delphi Rio. With a virtual keyboard that covers almost 50% of the display area, several TEdit are hidden under the virtual keyboard when you want to enter data. Does anyone know of an approach to avoid this behaviour? Thank you in advance
  19. Hi, After pressing the right key on an Android device with 3 keys, most apps behave as follows: By pressing the left button and selecting the app, the app reappears on the screen and works normally. In the case of my app developed with Delphi Rio, the app doesn't keep working, it restarts! Is this a default behavior of the apps developed with Delphi? Can I change this behavior via code or via the configuration of the Delphi project? Thank you for your help
  20. Hi, Imagine an Android app developed with Delphi Rio that is connected to an external BlueTooth device (tests performed with barcode reader and keyboard). When a Carriage Return (CR) is sent, the app triggers a "FormKeyDown(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState);" event. So the CR is detected! If I use an Android text editor, the CR is taken into account. But it's impossible to identify the CR character in the Delphi "FormKeyDown" event: an "Ord(KeyChar)" which should give a #13 (and which gives #13 if you compile for windows) gives 0, a "LEncoding.GetBytes(KeyChar)" also gives 0; Same for the keyboard keys Backspace, Enter, Ctrl, Alt, Shift, Caps, F1...F12, Insert, Home, PgUp, Delete, End, PgDn, ..... which all give '0'! A question arises... How to identify the arrival of a CR or other non-alphanumeric character?
  21. Hello! I'm facing a problem that may be more of an Android problem than a "Delphian" one. My goal: Capture the barcode read by a bluetooth handheld device in an Android app developed in Delphi FMX (Delphi Rio 10.3.3). Principle of operation: The handheld device transmits the barcode as a sequence of characters entered on the keyboard. The Windows/Android compatible handheld device is configured to provide the code as: 1 character to indicate the beginning of the barcode ("!"), one character to indicate the type of barcode ("c" to indicate that it is an EAN8 barcode), the characters encoded in the barcode (8 characters for an EAN8) and the CR LF characters to indicate the end of the barcode. The app retrieves each character received on an OnKeyDown event and forms the barcode by harvesting the characters one by one (reason for the character that indicates the beginning of the barcode and an end character of the barcode). Problem encountered: Under Windows and Android, we do not get the same result. If we read a barcode of type EAN8 (=8 digits): Under Windows, we get: !C20010003 CR LF (this corresponds to the configuration of the showerhead) Under Android, nothing works anymore: 1. CR and LF are not detected (I seem to remember that Unix does not process CR and other LF) 2. If we visualize the characters captured in a Tmemo by displaying the value of the string that has captured one by one the characters received, we have !C20010003 (without CR and LF) 3. I control the number of characters received by checking length(string)=21 (21 and not 10 which would be the length of a string "!C20010003"!!) 4. So I check the ASCII code of the characters received at the onKeyDown event: 33 99 0 50 0 48 0 48 0 49 0 48 0 48 0 48 0 51 0 0 0 Which corresponds to: ! C 2 0 0 1 0 0 0 3 0 We have the correct ASCII code followed by a 0 after each character and a final 0 instead of CR LF. Conclusion: Under Android, the event receives 21 characters, the string shows 10 characters but indicates a length of 21 characters and adds at the end a "0" which corresponds to "I don't know what". Under windows, the event receives 12 characters (the 10 visible characters + CR + LF), the length of the string=12 and the string shows the 10 visible characters. Does anyone have any experience in handling strings in Android, an explanation of how it works under Android and a solution to detect CR and LF sent under Android? Thanks for your help
  22. Fabian1648

    [Android] How to capture characters with a bluetooth device

    Yes! A wireless barcode reader connected to a smartphone via bluetooth! I think that the last characters received could be ASCII=0 followed by a zero. ASCII=0 corresponds to NUL. The string sent with a CR LF could be treated as a string with terminal zero
  23. I'm trying to extract data from a REST response with Delphi 10.3.3. RESTResponse1.ContentType indicates 'application/json' RESTResponse1.JSONText give a JSON answer I use a code coming from the Delphi sample RESTDEMOS And it ends with a "Transtyping error" on the first line "LJson := RESTRequest.Response.JSONValue as TJSONObject;". I can't even retrieve the REST response in a variable of type TJSONObject as TJSONObject;!!! Does anyone have a sample code that works? Is this a known bug in version 10.3.3? Thanks for your answers
  24. Fabian1648

    Intraweb

    Intraweb is no longer included by default in Delphi 10.4 Sidney. You can dowload Intraweb (an old version) on the website of the editor et install it on your Delphi 10.4
×