Jump to content

JohnLM

Members
  • Content Count

    218
  • Joined

  • Last visited

Posts posted by JohnLM


  1. I think its because I believe the the 412x869 dimensions are not true. 

     

    When I send a photo to my windows machine, the dimensions are very large.  I am trying to determine the exact x,y pixels of my device, and its been truely deceptive and annoying.

     

    At this moment:

     

    * I am trying to figure out how to take a screenshot of my current display--I figure out that part: put a tlayout componet on the form and use layout1.MakeScreenshot;**

    * I am also trying to re-work the Photowall mobile app to send the bitmap from .MakeScreenshot via stream. But the snippet I updated/edited is not working. The image is not showing in the PhotoWallVCL app on my laptop computer (with the uppdated/edited code in the mobile app).  If I REM out the code, it works. So I am in the middle of debugging that portion of code now. 

     

    ** but I'm not sure how to use tlayout. I've never used it. I assume that whatever components (buttons/edits/etc) I add to it, that when I call .MakeScreenshot it will capture the whole current viewport of the device, whatever is displaying on it.  But the problem is, none of the controls are sticking to the tlayout control. That is, none of the controls are bound to it, that if I click and drag the layout1 control, all the controls (buttons/edits/etc) should move with it--but they don't. 

     

     


  2. I usually work in low light and it gets a little difficult sometimes to see certain characters when using the dark theme for the IDE.

    (Some of the colored fonts like blue/red/green get fuzzy looking under my laptop's 1366x768 screesize) 

     

    I thought it would be a quick and simple method of Ctrl+Wheel-up/down, but that did not work. 

     

    Is there a quick shortcut to enlarge/decrease the font at will?  TIA.

     


  3. Okay, I think I know what I can do. 

     

    1. I can use the 'Photowall' app, take a picture of a black background (lay the phone face-down) take a photo, and send that to the Photowall app in Windows via app-tethering.

    2. update the windows photowall app to capture the bitmap to the clipboard 

    3. paste that into windows paint 

    4. edit the image somehow to remove most of the black area (or make it white) and leave a 2 to 4 pixel black edge around the whole dimension. 

    5. save that to png

    6. open in delphi ide, device manager and update the custom view with this new image. I'll call it Galaxy S10+

    7. finish

     


  4. SPECS:  Delphi 11.2,  Galaxy S10+ phone (Android 12) (screen size is 6.4 inches)

     

    Issue:  I want to change the view in the IDE to match my phone but the closest one is the 'Android 5" phone', and when I add componets on the form in that view, after compiling, the controls don't fit the screen and/or are sometimes off the view of the screen. 

     

    In Delphi XE7, in the View's drop-down list, there is a custom setting option. I think I only used it once for a tablet years ago, but could not figure it all out and gave up.  However, in 11.2, there is no listing for custom.  So, I was wondering if there are downloadable views, or does the developer has to figure it out manually by eye/try.

     

    I've been searching around but cannot find any answers.  TIA.


  5. update #2 on App Tethering process. . .

     

    I have not found a good resource that goes through all the steps to build an app tethering project from a beginner's point of view.  All the ones I did find and tried to follow were too advanced for me.  I could not follow.  Instead, I had to read many different resources found through Google searches and those on Embarcadero's websites and try different things.  The notes below are what I have accomplished so far. 

     

    Later, I will follow up with the steps and code of how to build a working app tethering project for sending: TEXT, PARAGRAPH, and a PHOTO between devices. 

     

    History so far. . .

     

    I ended up rebuilding as a new project from scratch, piece by piece, compiling in Windows, then compiling as Android, multiple times while observing that the Android version continued to work.  And once I reached the point where the Android was able to receive TEXT from my laptop, I knew I had it working. By then, I was getting confused about what does what and so on, and so the project became a mess, all-be-it a working mess. 

     

    Then, I wanted to be able to send TEXT back and forth between the two devices, the laptop, and the Android phone.  Another day's coding mess now turned into a shameful mess of spaghetti and still trying to remember what each part of the code does. 

     

    And now I need to add and update the spaghetti code to be able to send a paragraph (or memo) of TEXT between devices.  But at this time, I do not know how to, but I will figure it out soon. 

     

    Then, I want to figure out how to send an image photo between each device.  To be able to do all three will be great. 


  6. update on App Tethering process. . .

     

    After a week or so of more searching and trial/error attempts, I managed to finally get one project to work, found via google search.  I can send a text to another vcl app in windows. 

     

    However, when I compile the Client side project for mobile instead, I get the following error: 

     

    [PAClient Error] Error: E7688 Unable to execute 

     

    ..and at the bottom of the list of error messages, I see that it also says "Circular Reference..." on the last line. 

     

    I am not sure what that means let alone, how to resolve it. 


  7. Update on compiling the PhotoWall app under Delphi 11.2 Alexandria for mobile. . . Success!!

     

    (The reason I could not compile the mobile portion was because my phone still had the compiled version (from XE7) and I did not uninstall it)

     

    I was able to finally compile the mobile portion to my phone and app-tether a live photo from it and sent it to my computer laptop. 

     

    * folder -> C:\Users\Public\Documents\Embarcadero\Studio\22.0\Samples\Object Pascal\RTL\Tethering\PhotoWall

    * Must remember to turn on wifi on the phone and the computer/laptop in order for app-tethering to work. 

     

    2nd edit:  I forgot to mention that I renamed the "MobilePhotoApp" to "MobilePhotoApp_D11_FMX_w7" and that was how I had success and no error message like the above-posted image shows. 


  8. Update. . .  Remy, I am getting 127.0.0.1 on Android with your code, compiled in Delphi 11.2 Alexandria. 

     

    Note, I compiled for both my Galaxy phones, the A01 (32bit) and S10+ (64bit), and both report 127.0.0.01 on them. 

     

    {
      creation 8-8-2023 tue
    
      purpose - to obtain the IP addresses of all devices
    }
    
    unit Unit1;
    
    interface
    
    uses
      System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
      FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Memo.Types,
      FMX.StdCtrls, FMX.ScrollBox, FMX.Memo, FMX.Controls.Presentation, FMX.Edit,
      IdGlobal, IdStack;
    
    type
      TForm1 = class(TForm)
        eb1: TEdit;
        m1: TMemo;
        btnGet: TButton;
        btnGetRemy: TButton;
        ToolBar1: TToolBar;
        Label1: TLabel;
        Memo1: TMemo;
        procedure btnGetRemyClick(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;
    
    var
      Form1: TForm1;
    
    implementation
    
    {$R *.fmx}
    {$R *.LgXhdpiPh.fmx ANDROID}
    
    // remy's code
    function GetLocalIpList2(Name: string): TStringList;
    var
      Lista: TIdStackLocalAddressList;
      temp: TIdStackLocalAddress;
      I: Integer;
    begin
      Result := TStringList.Create;
      try
        TIdStack.IncUsage; // instantiates GStack if needed...
        try
          Lista := TIdStackLocalAddressList.Create;
          try
            GStack.GetLocalAddressList(Lista);
            for I := 0 to Lista.Count-1 do begin
              temp := Lista[I];
              if temp.IPVersion = Id_IPv4 then
                Result.add(temp.IPAddress);
            end;
          finally
            Lista.Free;
          end;
        finally
          TIdStack.DecUsage; // frees GStack if needed...
        end;
      except
        Result.Free;
        raise;
      end;
    end;
    
    procedure TForm1.btnGetRemyClick(Sender: TObject);
    begin
      m1.Lines := GetLocalIpList2('');
    end;
    
    end.

     


  9. I started a new mobile app, threw a button and edit box, and compiled it to Android successfully and it ran. 

     

    So it appears to be an issue with the XE7 vs D11.2 when compiling the D11.2 version of the Photowall sample app in D11.2

     

    If anyone know's have to resolve the issue mentioned in my previous post above with the photo showing the error, please advise how I can fix and compile it in D11.2, TIA 


  10. The USB cable part is a new situation.  I never use to get a pop-up for it to configure it for the network.  I used to plug it the cable in the laptop and phone and that was it.

     

    Due to the nature of unexplained issues way back in the XE7 days of mobile development, I decided not to allow the pop-up to auto-accept and never pop up. I wanted to make sure that I had a true connection to each device, each time I connected the cable. 

     

    But, until recently, and I don't remember exactly when or why, on one day this past July/2023, when I plugged in the USB cable that it started to pop-up a network dialog box with three options to choose to setup with, (home, work, or public) and ask me which one I wanted for that session at the time of plug-in, as seen below. This started when I was debugging and reinstalling Bluetooth support on this laptop this past July. 

     

    600844104_08072023mon0548pm-SetNetworkLocation-wheniplugintheusbcabeltolaptopandphone.thumb.png.b2210cd8b6ede394843c27c756282a3e.png


  11. Patrick, I was busy trying another idea using one of the Embarcadero samples (the Photowall) from the Rad Studio Delphi XE7 Pro IDE and samples folder, and it worked. I was able to take a photo from my phone and send it over to a VCL app in Windows on my laptop.  Only this time, I had the wifi turned on in my phone. When I turned it off, the app did not work. Now, I want to try the same app but from the Delphi 11.2 IDE and its sample folder version (not the XE7's one). 


  12. Update on this endeavor. . .

     

    Yesterday, I compiled the two code snippets (from both DelphiUdIT and Remy) into an app, and both work.  Then I compiled and made several apps under Windows 7 (VCL and FMX apps) and Android, in both Delphi XE7 Pro and Delphi 11.2 Alexandria.

     

    The IP numbers I received so far are (10.0.0.3 laptop) and (127.0.0.1 cellphone).

     

    Now, depending on when I connect and disconnect the USB cable from my Windows laptop to my cellphone, I will get different IP numbers.  So, for example, the following is what I receive in that test app: 

     

    USB cable Connected

    * Windows app -- (192.168.nn.nnn) and (10.0.0.3) where n is a 2-to-3 digit number,

    * Phone s10+ -- (127.0.0.1) 

     

    USB cable Disconnected

    * Windows app -- (10.0.0.3) 

    * Phone s10+ -- (127.0.0.1) 

×