Jump to content

Patrick PREMARTIN

Members
  • Content Count

    344
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by Patrick PREMARTIN

  1. Patrick PREMARTIN

    Some REST help please.

    As I understand it, your doc integration displays a REQUEST with a JSON as the body of the request. It's not a POST/GET standard call... and they must not having called it "REST API". Try to pass the parameters as BODY fields instead of GET/POST. Other way could be to copy/paste the object JSON generated with your parameters directly in the first tab in REST Debugger as "personalized body".
  2. Patrick PREMARTIN

    Some REST help please.

    It depends on how the API expect to receive them. The GET/POST is use as GET param when you send a GET request and as POST params when you send a POST request. The status code 200 is normal : it's the http/s return status code. It says the URL you called has answered. As we see in the screen capture, Vodafone answered with a JSON object with 3 properties : result, code, and data as a JSON object. Fix the problem in REST debugger and export the components. Open a text editor (or Delphi's code editor), paste the result and you'll have all properties of the components to change in the form editor or by code depending on what you want to do.
  3. Patrick PREMARTIN

    Some REST help please.

    The URL ? Did you tried with REST Debugger to be sure you have all parameters ?
  4. Patrick PREMARTIN

    Strange problem skipping loop with tTask

    And to not block the program during the loop, the Parallel.For can be put in a thread. 🙂
  5. Or you can use "Bonjour" (or uPnP) to publish your service over the network and find it, because as I suppose your question is how to find computers where your program is launched to communicate between devices.
  6. About the WIFI, it's normal : AppTethering uses a broadcast UDP message to find other programs on the local network. It don't work over the Internet (so not over 3G/4G/5G/... except if you give a public address with a routing to your computer).
  7. It's a normal security feature on Android : we can't replace an existing app when it's from an other source than previous one. The compiler add a key in the program, if you compile with an other you have to remove the app on your phone before.
  8. Could you try this sample project ? The server listen on port 8080 for all IP by default on the PC. The firewall should ask if you want to open the port on public or private network (private should be the one clicked by default if your computer has the good parameters). You can specify an IP address in the client project and compile it for Windows and for Android. Check the IP with "ipconfig" or in the network parameters in a terminal window. (just download a ZIP of the repository to compile this sample : no need of any dependance https://github.com/DeveloppeurPascal/Socket-Messaging-Library or you can use Git, of course)
  9. Does your laptop have a fixed IP address or does it change sometimes ?
  10. Did you check you firewall or antivirus on both side ? If you have Bluetooth enable, you can try AppTethering with Bluetooth instead of ethernet, I never tried it but perhaps it could solve your problem ? https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Using_App_Tethering
  11. Patrick PREMARTIN

    Some REST help please.

    Hi Delphi has TNetHTTPClient/TNetHTTPRequest components and THTTPClient/THTPRequest classes to work with http(s) requests. You can use them to POST something if you want. Look at btnSendFileClick method in https://github.com/DeveloppeurPascal/Des-solutions-de-synchronisations-de-donnees/blob/master/04-Internet/Client/Unit1.pas or how I use POST request in the DeepL4Delphi library at https://github.com/DeveloppeurPascal/DeepL4Delphi And if you want to use TRESTClient/TRESTRequest, you can use the REST Debugger available in "tools" menu of the IDE to do a sample request and export the components from it.
  12. I'm agree, cleaning sockets instances have to be done when they disconnect. I have to add it to my sample program and in other tools, but no real impact for a little program with little volume of users. For a big server it has to be fixed.
  13. Patrick PREMARTIN

    No Android Platform in Delphi 11.3

    Ok, try to uninstall the Android compiler, reboot and reinstall it, but if it doesn't work contact Embarcadero support https://www.embarcadero.com/support
  14. Patrick PREMARTIN

    No Android Platform in Delphi 11.3

    If you open a project made for iOS/Android, does it compile or show Android platform as available ? You can try https://github.com/DeveloppeurPascal/LearnToCodeSummerCamp2021/tree/main/Day-3 or a mobile snippets (permission or camera) for Embarcadero samples to check.
  15. I added a sample for send/receive strings over a Socket here : https://github.com/DeveloppeurPascal/Delphi-samples/tree/main/Network-Samples/01-TSocket it could inspire you. 😉
  16. Perhaps check the AppTethering here : https://github.com/DeveloppeurPascal/Des-solutions-de-synchronisations-de-donnees You also can embed a web server in your desktop app and use GET/POST http commands. And if you want to do something really free, use a TSocket and a TSocketStream to send and receive texts. This unit will help to write/read a string over a stream : https://github.com/DeveloppeurPascal/librairies/blob/master/Olf.RTL.Streams.pas
  17. Patrick PREMARTIN

    No Android Platform in Delphi 11.3

    In the installer, did you have android platform (on main menu), JDK and SDK (on options) installed ? Do you have Android in the contextual menu when you clic on the project and "add new platform" or just nothing ? Check your license in the license manager to verify if mobile is available on it. Some old licenses had a problem (Embarcadero support can fix it).
  18. Patrick PREMARTIN

    Google Sign-In

    and a link to Grijjy solution 🙂 https://github.com/grijjy/DelphiGoogleSignIn
  19. Patrick PREMARTIN

    Google Sign-In

    Hi You'll find the solution for google sing-in in https://github.com/DelphiWorlds/Kastri
  20. Patrick PREMARTIN

    Can one run delphi (32 bit) apps on Windows 11 ARM?

    They work, but sometimes Windows 11 ARM / Intel interpreter have problems. It's more a Microsoft bug than other. If you can try to compile your program with 11.3 Alexandria to check if the compiler does something different and perhaps Microsoft understand it better. But don't forget ARM/Intel converters are not a 100% success feature (except for Apple).
  21. Patrick PREMARTIN

    Apple Transporter Error

    do you have an other info.plist in deployment wizard files list?
  22. Patrick PREMARTIN

    Apple Transporter Error

    Perhaps a filed in project / Application / version info / iOS or something missing in the 10.4 project the 11.3 adds with missing contents ? If 10.4 can't push it in the Info.plist, add the key/value pair in the template file.
  23. Patrick PREMARTIN

    Apple Transporter Error

    To check the differences, you can open the IPA file on your Mac and compare the Info.plist of the two. Perhaps something is wrong in the "app name" when it is generated from 10.4 and has been changed in 11.x release ? Try to disconnect and reconnect from the Transporter app in case it's a problem with the developper account.
  24. Hi If you installed the samples from RAD Studio / Delphi, you have a "mobile snippets" folder where you'll find pieces of code to do what you want. And if you want only code, look at this simple sample I've made for the Learn to code Summer Camp 2021 : https://github.com/DeveloppeurPascal/LearnToCodeSummerCamp2021/tree/main/Day-3 Just notice you have to add some permissions for Android devices in Project / Options. In SelfieCam sample I used the TCameraComponent instead of calling the camera SDK/instant (iOS/Android). In this case we need to manage the "lost focus" of the app to free the handle to the device. If you need to call the embed camera app, you can do it with an action list (even by code) or the platform service (if available). Some explanations are available on this page : https://developpeur-pascal.fr/utiliser-l-action-standard-takephotofromcamera-pour-les-applications-android-9-et-plus.html (in english with Google Translate).
  25. Patrick PREMARTIN

    Paste image from clipboard : RGB becomes BGR on IOS 64 bits ?

    Thanks for having opened an issue, it will be easier to follow at https://quality.embarcadero.com/browse/RSP-41896
×