Delphi XE5 Android app running on Google Glass with a BlueTooth keyboard

Posted by on in Blogs
Jim McKeeth was the first of us to get Google Glass and to build the first Delphi XE5 app to run on glass.  I now also have Google Glass and built my first Delphi XE5 app for it. I paired my Samsung BlueTooth wireless keyboard to my Glass so that I can do data entry into a Delphi FM form.  The program code is the standard TEdit, TLabel and TButton app. Here is the form and the code:


    type
    TForm4 = class(TForm)
    Edit1: TEdit;
    Button1: TButton;
    Label1: TLabel;
    procedure Button1Click(Sender: TObject);
    private
    { Private declarations }
    public
    { Public declarations }
    end;
    var
    Form4: TForm4;

    implementation
    {$R *.fmx}
    procedure TForm4.Button1Click(Sender: TObject);
    begin
    Label1.Text := Edit1.Text
    end;


Here is the Project Manager window in the IDE showing my project's target platforms including Win32, Android (Google Glass, Samsung Galaxy S4 and Android Emulator), iOS (iPhone and iPad both running iOS 7), and iOS Simulator:

With the keyboard I can use the Tab key to move around the form and type into the edit box. After compiling and deploying my "Project4" application to Glass, you can see the FM icons for each of my apps on my Glass desktop:

Here is the screen grab after I type some text into the edit box and hit the button.

The same app above can be compiled for Windows, OSX, iOS and Android using the same source code and project. Get started building Android apps using Delphi XE5 and those apps will also work on your Glass (when you get one). Of course there is always more to do including added support for Glass specific APIs.  More about this in a future blog post.


About
Gold User, Rank: 1, Points: 2466
David Intersimone (known to many as David I.) is a passionate and innovative software industry veteran-often referred to as a developer icon-who extols and educates the world on Embarcadero developer tools. He shares his visions as an active member of the industry speaking circuit and is tapped as an expert source by the media. He is a long-standing champion of architects, developers and database professionals and works to ensure that their needs are folded into Embarcadero's strategic product plans. David holds a bachelor's degree in computer science from California Polytechnic State University at San Luis Obispo, California.

Comments

  • Guest

    [...] Nos cuenta David Intersimone en su blog como ha conseguido facilmente hacer una app con Delphi XE5 que conecta un teclado Bluetooth con sus Google Glass (Android). Y por supuesto, la misma app funciona en Windows, en OSX y en iOs. Solo es un ejemplillo, pero muestra el potencial que tiene Delphi como herramienta de desarrollo multiplataforma. Tags: No tags Categories: Uncategorized You can leave a response, or [...]

  • Please login first in order for you to submit comments
  • Page :
  • 1

Check out more tips and tricks in this development video: