Jump to content

Fabian1648

Members
  • Content Count

    14
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. 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
  2. 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
  3. 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
  4. 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?
  5. 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
  6. 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
  7. 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
  8. Fabian1648

    [REST/JSON] Trabstypage error

    I'm giving the benefit of the solution I found to solve my Transtyping error problem. I confirm that the problem comes from the format of the JSON response sent by the server. The JSON returned does not have a "{"result":[...]}" format but "{[...]}". Solution: 1. I retrieve the JSON sent by the server by a "str:=RESTResponse1.JSONText;". 2. I adapt the string: "{[...]}" becomes "{"result":[...]}". 3. I transform the modified string into a TJSONValue by a "JSONValue := TJSonObject.ParseJSONValue(str);". (Eureka! there is no more "Transtyping error") 4. I retrieve the values in JSONValue by code like "str1 := JsonValue.GetValue<string>('results[0].header');". Thanks to the various contributors who offered me their help.
  9. Fabian1648

    [REST/JSON] Trabstypage error

    The problem seems to be due to the fact that the JSON format sent by the server is not compatible with "JSON made in Delphi"! I found an example that works with code and "JSON that fits" and the JSON has "\" in it that I haven't seen in any example JSON file. The same code processing a JSON from different test servers via REST gives an " Transtyping Error" on the line "LJSONResponse:= TJSONObject.ParseJSONValue(response) as TJSONObject;". The same code with the "JSON that fits" without the "\" (=response_bis) and we end up with an "Access Violation error" ... Delphi can parse a JSON file or only a JSON file using a specific Delphi format???
  10. 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
  11. Yes, it is not a problem of resolution or light. The focusing is very too long to be acceptable and depends certainly of the smartphone model. Is it not possible to help the focusing (for exemple with the definition of a specific area in the image given by camera)?
  12. Unbelievable! it works! Thank you for your help Vandrovnik!
  13. Hi, In a Android App, I start a CameraComponent with the following code: When the image capture is done, I stop the camera with the following code: When I want to capture a new picture, the setting "CameraComponent1.Quality := TVideoCaptureQuality.MediumQuality" is no longer applied, the camera use its default setting! Where is the problem? In my code or in the CameraComponent?
  14. Hi everyone, Context: Development of an Android app with FMX that requires a smartphone to take a picture of a label and then extract data from the image. My problem: I use the CameraComponent and it's a pain to get an image that doesn't look like an artistic blur. Big problem with focusing. 1. As we are used to from Embarcadero, we have a lot of poor documentation. Thanks again to Embarcadero for the help indicating "Embarcadero Technologies has no further information at this time. Please help us document this topic using the Discussion page!" 2. With a "CameraComponent1.FocusMode := FMX.Media.TFocusMode.AutoFocus" the image is permanently blurred. 3. With a "CameraComponent1.FocusMode:= FMX.Media.TFocusMode.ContinuousAutoFocus", the image is sharp from time to time and the rest of the time, the image returned by the camera shows a focusing that is searching but... not finding the right setting. 4. There doesn't seem to be a Macro mode (which would indicate to the FocusMode that you are limited to close-ups). Has anyone experienced this problem before? What would be the best approach to solve this problem? Create a Macro mode? Create a manual focus by indicating a limited area of the image that needs to be "focused"? Any ideas and opinions are welcome...
×