Skip to content

Developer Skill Sprints - Remote control a Windows app from a mobile device

Today’s (June 3, 2014) Developer Skill Sprint by Jim McKeeth shows you how to use App Tethering to control a Windows app from a mobile device. From the DocWiki: The RTL provides new App Tethering components to give your applications the ability to interact with other applications running either on the same machine or on a remote machine. You can use App Tethering in your VCL and FireMonkey applications.

Using App Tethering, your applications can:

The App Tethering feature does not depend on a specific transport or protocol. In XE6, the RTL supports Ethernet connections between applications on the same local areal network (LAN) subnet, including applications running on the same device. You can implement your own adapters to support new transports and protocols using the app tethering API.

I created a blog post back in April, "Finding your Tethered Apps", that contains additional information about App Tethering and shows you how to find tethered apps on your subnet. The post includes a link to a sample project that finds and displays tethered app information.

This Skill Sprint Replay is available on YouTube at http://youtu.be/TXmlOXoN2d0

For a complete list of Developer Skill Sprints - check out the landing page at https://www.embarcadero.com/landing-pages/skill-sprints.

You can register for the Developer Skill Sprint series at http://forms.embarcadero.com/DeveloperSkillSprintsWebinarSeries

To use the tips, tricks and techniques covered in the Developer Skill Sprints, you can download the free RAD Studio XE6 trial.

Developer Skill Sprints - Use C++ packages in your 64-bit Windows applications

Today’s (May 29, 2014) Developer Skill Sprint by John Thomas (JT) covers how to use C++ packages in your 64-bit Windows applications. From the DocWiki: C++Builder XE6 now supports the production of packages for 64-bit Windows. Previously, C++Builder supported production of packages only for 32-bit Windows. The BCC64 compiler produces .bpl files for Win64. Note that C++Builder does not produce dylibs for the Mac, or packages for the iOS and Android platforms. For these platforms, static libraries can be used.

Why use Packages? Design-time packages simplify the tasks of distributing and installing custom components. Runtime packages, which are optional, offer several advantages over conventional programming. By compiling reused code into a runtime library, you can share it among applications.

Differences between C++ Win32 and Win64 packages:

  • For Win64, the compiler exports code elements marked as PACKAGE if they are defined in the current translation unit. For classes, if one non member is defined, the class is exported. If no definition is seen, the compiler will treat the code element as imported. This behavior is different from Win32.
  • You must use PACKAGE for both Win32 and Win64, but Win64 exports only if there is a definition present. This requirement applies to variables, functions and classes that are meant to be exposed to consumers of the Package.

This Skill Sprint Replay is available on YouTube at http://youtu.be/fVZDJS85MX0

For a complete list of Developer Skill Sprints - check out the landing page at https://www.embarcadero.com/landing-pages/skill-sprints.

You can register for the Developer Skill Sprint series at http://forms.embarcadero.com/DeveloperSkillSprintsWebinarSeries

To use the tips, tricks and techniques covered in the Developer Skill Sprints, you can download the free RAD Studio XE6 trial.

Background operations on Android and Change the FMX mouse cursor

Two items that should be of interest to Delphi developers: Marco Cantu’s recent blog post, "Background Operations on Delphi Android, with threads and timers" and Alistair Christie’s LearnDelphi.tv video "Delphi Programming Tutorial #99 - Mouse Cursor in Firemonkey"

Also, the "RAD in Action: Build Connected Multi-Device Apps using BaaS" webinar replay from last week is now OnDemand at http://www.embarcadero.com/rad-in-action/baas. I am still working on the source code clean up which should be ready later this week.

Enjoy!

Appmethod presented in SF May 29 at Mobile App Developer Tools panel

We will be demoing Appmethod, a multi-device development platform that lets you create native apps for Android, iOS, Mac and Windows simultaneously. If you’re anywhere near San Francisco on Thursday May 29, stop by and learn how to "Build Fast Apps Fast for Android, iOS, Windows and OS X"!

Come network with your fellow devs, and pick up some new tools and tricks. This meetup will help you to understand the various options for building a mobile app, how to choose between them, and the developer tools that you can use to achieve your goals.

6-7pm Networking
7-8:15pm Panel and Demo’s
8:25-9pm: Q&A, and more networking!

Thursday, May 29, 2014
6:00 PM to 9:00 PM
at Parisoma, 169 11th St, San Francisco, CA

http://www.meetup.com/Secure-Enterprise-Developer-Program/events/178867662/

RAD News Flash for May 2014 - multiple XE6 webinars and C++ Mobile Day (June 4)

We have a full schedule of upcoming online events for the next several weeks to help you create new applications and extend the reach of your existing apps using XE6. I will be showing you how to "Build Connected Multi-Device Apps using BaaS" in three webinars next Wednesday, May 14 (6am, 11am, 5pm Pacific Daylight Time) showcasing the new BackEnd as a Service (BaaS) technology that is included in RAD Studio, Delphi and C++Builder XE6 for your VCL and FMX apps.  Fast Reports is also two webinars on May 22 and June 3 to show you how to build great reports using FastReport and OLAP based applications using FastCube for VCL and FMX. Stephen Ball is presenting three webinars to show you how to "Create Secure Database Applications using InterBase" on Wednesday May 28. Finally, save the date, mark your calendars and set your alarms for our "C++Mobile Day" online conference on Wednesday June 4 from 5am to 4pm Pacific Daylight Time.

These upcoming webinars and other developer news items are included in this weeks RAD News Flash.

Update your Delphi and C++Builder Applications

On April 8, 2014 Microsoft ended support for Windows XP, one of the most popular operating systems ever. Industry experts estimate that Windows XP is still being used on nearly 30% of PCs. An estimated 500 million computers, kiosks, ATMs and other systems are still running XP. A massive shift forward to newer versions of Windows is expected this year with the end of support. Migrate Now!

XE Developers Qualify for XE6 Upgrade until June 30, 2014

By popular demand, the XE6 upgrade pricing to XE developers is being extended for a limited time (previously only available to registered users of XE2 or later). From now until 30 June 2014, XE developers can purchase the XE6 "upgrade from XE2 or later" products. This offer does not apply to any other earlier version developers. Find out more.

Webinar: Build Connected Multi-Device Apps using BaaS, featuring David I

Take your applications to new heights by integrating with leading Back-end as a Service (BaaS) providers to add functionality and platform services to your mobile and desktop applications. Whether you have an immediate need or just want to learn more about the potential, David I will show you how to gain easy access to common services in the cloud without having to build or maintain the back-end services yourself.

Wednesday, May 14, 2014

Session 1: 6:00am Pacific,8:00am Central, 9:00am Eastern, 13:00 UTC
Session 2: 11:00am Pacific, 1:00pm Central, 2:00pm Eastern, 18:00 UTC
Session 3: 5:00pm Pacific, 7:00pm Central, 8:00pm Eastern, 00:00 UTC (Thursday May 15)

Sign up here - http://forms.embarcadero.com/RADinActionBaaSWebinar

Webinar Series: RAD Studio Reporting with Fast Reports

See what’s new with FastReport and FastCube VCL and FMX. You’re invited to join Embarcadero with Fast Reports’ Michael Philippenko and Den Zubov for two new webinars on reporting for RAD Studio, Delphi and C++Builder developers.

Thursday, May 22, 2014 - Webinar 1: New Report Generator for Delphi FastReport VCL 5
Tuesday, June 3, 2014 - Webinar 2: FastCube VCL 2 and New FastCube FMX - OLAP Components for your Software!

Learn more and register today! http://forms.embarcadero.com/14Q2FastReportWebinarSeries

Webinar: Creating Secure Database Applications using InterBase, featuring Stephen Ball

Data security is a hot topic right now. When it comes to securing your data and applications, small changes can make a massive difference. If you want to learn how to help reduce the risk of being hit by the next Heartbleed and how to reduce the time and effort to managing security, then this webinar is for you.

Wednesday, May 28, 2014

Session 1: 6:00am Pacific,8:00am Central, 9:00am Eastern, 13:00 UTC
Session 2: 11:00am Pacific, 1:00pm Central, 2:00pm Eastern, 18:00 UTC
Session 3: 5:00pm Pacific, 7:00pm Central, 8:00pm Eastern, 00:00 UTC (Thursday May 15)

Sign up to attend! http://forms.embarcadero.com/InterBaseSecurityWebinar5-28

Don’t miss C++ Mobile Day - Wednesday, June 4, 2014!

Join Embarcadero team members, top industry speakers, technologists and practitioners for a day of informative technical sessions focused on mobile development with C++! C++ Mobile Day will show you how to visually create Android and iOS apps coded in C++. You will learn how to build apps that can run on tablets, smartphones and wearables with access to platform APIs, sensors and services.

Wednesday, June 4, 2014 : 5:00am - 4:00pm Pacific, 7:00am - 6:00pm, Central 8:00am - 7:00pm Eastern

Register Now to save your seat - http://forms.embarcadero.com/CPPMobileDay6-04

White Paper of the Month - Embrace and Extend: Connect Your Infrastructure to Mobile

This 42-page technical white paper covers a typical scenario in the IT world including architecture and techniques for connecting with a database server and providing data to different front-ends using different technologies. Learn from the guys that know, don’t re-invent the wheel, avoid the traps that others have fallen into! Download at http://forms.embarcadero.com/RADinAction_Mobile_Infrastructure_Whitepaper

RAD in Action Webinar On-Demand: VCL Developer’s Guide to RAD Studio XE6

Watch Marco Cantù in the popular RAD in Action webinar series that covers what’s new in RAD Studio, Delphi and C++Builder XE6 for Windows developers including new VCL styles, components and how you can transform the potential of your existing Windows applications with app tethering! More info and on-demand

RAD Studio XE6 First Look Launch Webinar On-Demand

The RAD Studio XE6 First Look webinar is now available on demand. Watch John "JT" Thomas and Marco Cantù as they give an overview of what’s new in XE6. Thousands attended live and now it’s available on-demand. RAD Studio XE6 First Look Webinar

Embarcadero developer tools in the news…

Here are just a few of the recent articles and technology partner news from web sites, magazines and news outlets around the world covering our developer tools and the recent release of Delphi XE6, C++Builder XE6 and RAD Studio XE6.

If you have found additional news items about our products, post a link to the article in the comments section.

Finding your Tethered Apps

RAD Studio XE6, Delphi XE6 and C++Builder XE6 include support for tethering your VCL and FMX apps together. This blog post shows you how to display all of the tethered apps that you can find on your subnet. App Tethering includes two components: TTetheringManager and TTetheringAppProfile. For this article I’ve built a Delphi VCL application that uses these two components to discover the other tethered apps that are running on the my subnet. The example tether application demo I used is the PhotoWall sample that ships with the release (you can find it in the C:\Users\Public\Documents\Embarcadero\Studio\14.0\Samples\Object Pascal\RTL\Tethering\PhotoWall folder)

Here is the main form for my application showing a TButton, TSpinEdit, two TListbox and some TLabels.  The TSpinEdit is used to set the timeout for the TetheringManager.DiscoverManagers optional second parameter.

The app tethering discovery works by using UDP to broadcast a discovery message across ports 2020-2040. The default timeout for the manager discovery period is 1500 milliseconds. The default timeout for the profiles discovery is 5000 milliseconds. Make sure that you open up the app tethering ports in your firewall if they are not already open. If your network is busy, you might want to set the discovery timeout longer than 1500 milliseconds (I normally use 3000 milliseconds at work and the default at home).

The TButton onClick event handler code is very straightforward:

    procedure TForm1.Button1Click(Sender: TObject);
    var
      I : integer;
    begin
      // discover all managers
      Button1.Enabled := false;
      Label1.Caption := '0';
      ListBox1.Items.Clear();
      Label2.Caption := '0';
      TotalProfiles := 0;
      ListBox2.Items.Clear();
      for I := TetheringManager1.PairedManagers.Count - 1 downto 0 do
        TetheringManager1.UnPairManager(TetheringManager1.PairedManagers[I]);
        // Tethering Port Range: 2020 to 2040
        // Manager discovery default timeout is 1500 msec
      TetheringManager1.DiscoverManagers(DiscoveryTimeoutSpinEdit.Value);
    end;

In my Find Tethered Apps application I provide three event handlers for my TetheringManager: OnEndManagersDiscovery, OnEndProfilesDiscovery and OnRequestManagerPassword.

If your Tethered Apps have a password set in their TetheringManager property, you’ll need to provide a n OnRequestManagerPassword event handler to get any responses from the remote tether apps.

    procedure TForm1.TetheringManager1RequestManagerPassword(const Sender: TObject;
      const RemoteIdentifier: string; var Password: string);
    begin
      Password := '1234';
    end;

After the call to DiscoverManagers, the app tethering technology listens for replies from other TetherManagers and TetherProfiles. When the timeout period completes, the OnEndManagersDiscovery and OnEndProfilesDiscovery events are executed. The event handlers code displays the TetherManagers with their IPaddress and Port and the TetherProfiles with their GUID.

    procedure TForm1.TetheringManager1EndManagersDiscovery(const Sender: TObject;
      const RemoteManagers: TTetheringManagerInfoList);
    var
      I: Integer;
    begin
      // end of managers discovery - list those found
      // use RemoteManagers parameter to build ListBox1
      Label1.Caption := IntToStr(RemoteManagers.Count);
      for I := 0 to RemoteManagers.Count-1 do begin
        ListBox1.Items.Add(RemoteManagers.List[I].ManagerName
          + ' - '
          + RemoteManagers.List[I].ConnectionString
        );
        TetheringManager1.PairManager(RemoteManagers[I]);
      end;
      Button1.Enabled := true;
    end;
    
    procedure TForm1.TetheringManager1EndProfilesDiscovery(const Sender: TObject;
      const RemoteProfiles: TTetheringProfileInfoList);
    var
      I: Integer;
    begin
        // Tethering Port Range: 2020 to 2040
        // Profile discovery default timeout is 5000 msec
      Inc(TotalProfiles);
      // use RemoteProfiles parameter to build ListBox1
      Label2.Caption := IntToStr(TotalProfiles);
      for I := 0 to RemoteProfiles.Count-1 do begin
        ListBox2.Items.Add(RemoteProfiles[I].ProfileText
          + ' - '
          + RemoteProfiles.List[I].ProfileIdentifier
        )
      end;
      Button1.Enabled := true;
    end;

For my test run, I started the VCL and FMX PhotoWall desktop apps and then started the mobile PhotoWall apps on my iPhone and Android phone. The resulting display shows the four tethered apps in my FindTetheredApps demo along with pictures that I took on my two mobile devices and sent to the two desktop apps.

The source code to my Delphi Find Tethered Apps project is available in CodeCentral at http://cc.embarcadero.com/item/29849. Have fun adding app tethering to your VCL and FMX Delphi and C++ XE6 applications.

Great blog post about App Tethering by Steffen Nyeland

App Tethering is a new capability in XE6. RTL components are included for connecting your VCL and FMX apps together on the same machines or multi-devices in your Object Pascal and C++ projects. XE6 includes the TTetheringManager and TTetheringAppProfile components for your use. Using app tethering (from the Embarcadero DocWiki), your applications can easily:

  • Discover other applications that are using app tethering, running either on the same device as your application or on other connected devices.
  • Run actions remotely. An application can publish actions using app tethering. Then other applications can remotely invoke any of these actions on the former application.
  • Share data between applications. App tethering allows sharing of standard data types and streams.

The app tethering feature does not depend on a specific transport or protocol, and new protocols can be implemented using the app tethering API. The RTL provides built-in support for Ethernet connections between applications on the same local areal network (LAN), including applications running on the same device. Bluetooth support for App Tethering is on our roadmap for a future release.

Steffen Nyeland has written a great blog post showing how to use a barcode scanning app on Android and iOS and send the data to a desktop app. Check out the blog post at  http://fixedbycode.blogspot.dk/2014/04/fun-with-delphi-xe6-app-tethering-and.html. Steffen also has links to download the sender and receiver apps. He also includes links to additional sources of information.

Thank you Steffen and keep up the great work!

RAD Studio, Delphi and C++Builder XE6 featured partners list…

Tim del Chiaro has created a landing page with a list of Embarcadero Technology Partners that are among the first to update their tools and components to support RAD Studio XE6, Delphi XE6 and/or C++Builder XE6 at launch time. You can find the list at http://edn.embarcadero.com/article/43761. These are just some of the many partners who plan to support XE6 as soon as possible.

Technology Partner Tools and Components included in RAD Studio

RAD Studio XE6 includes special editions of popular tools and components from Embarcadero Technology Partners at no extra cost - enabling you to do more than ever before. Bundled tools vary by edition. See feature matrix for further details.

RAD Studio Bundled Tools

Become a Glass Explorer on Tues April 15 - still only US for now

Several of us have Google Glass and are building and testing apps using the devices. Google posted a message on their Google+ Glass page, announcing that "Next Tuesday, April 15th at 6am PDT, we’re opening up some spots in the Glass Explorer Program. Any adult in the US* can become an Explorer by visiting our site and purchasing Glass for $1500 + tax – and it now comes with your favorite shade or frame, thanks to feedback from our current Explorers. The number of spots available is limited, so mark your calendar if you want to get in. You can find us on Tuesday at: http://google.com/glass/start/how-to-get-one". The asterisk denoted a comment where Google said "*To everyone outside the US… we know. Sorry :( We’re just not ready yet to bring Glass to other countries."

Using Delphi (and soon C++Builder) with Google Glass

Jim McKeeth and I have been showing apps we’ve built for Glass in videos, blog posts and our Jaunary "Programming Devices and Gadgets with RAD Studio" webinar. Here are several links to our Glass information.

Google Glass Takes on Parkinson’s Disease

There’s a wonderful Google Glass article in PC Magazine reporting that Newcastle University researchers are looking at how Google Glass might help people with Parkinson’s disease. Read the article at http://www.pcmag.com/article2/0,2817,2456257,00.asp.

Bad Behavior has blocked 4 access attempts in the last 7 days.

Close