PhotoWall is a sample application with a client-server architecture where a client application lets you take a picture and send that picture to a server application, which displays the picture.
You can find the PhotoWall project at:
- Start | Programs | Embarcadero RAD Studio 10.2 Tokyo | Samples and then navigate to either of the following folders:
Object Pascal\Multi-Device Samples\Device Sensors and Services\App Tethering\PhotoWall
- Subversion Repository:
This sample applications folder provides two server projects (FireMonkey and VCL) and a client project. The projects are designed so that you can run any number of instances of each at the same time. Many client applications may connect to the same server application, and any client application may connect to multiple server applications, as long as they are reachable using app tethering.
- The client application is intended for mobile platforms while the server application is only supported on desktop platforms.
- The VCL server application is only available in
In the server application (DesktopWallApp or DesktopWallVCLApp) you have an empty image area that you can fill remotely with a picture using a client application.
In the client application (MainMobileApp) you have the following controls:
- An image area that shows the last picture taken and sent to a server application.
- A list of connected server applications under Select Photo Wall, and a Refresh button to refresh the list.
- A Take Photo button to take a picture to send to the server application selected from the list.
How to Use the Sample
- Navigate to the location given above and either one of the server applications in any of the locations given above:
- Select Run > Run to run the selected server application.
- On the Project Manager:
- Right-click the project group entry.
- Select Add Existing Project.
- Open either Mobile\MobilePhotoApp.dproj or Mobile\MobilePhotoApp.cbproj in any of the locations given above.
- Select Run > Run to run the client application.
Each application in the project group contains a single source file that contains the class for the main form of the application.
Each application defines a single class that implements the main form of the application.
FireMonkey Server Application
VCL Server Application
FireMonkey Client Application
- The application defines the following methods:
Trueif there is an item selected in
lbWalls. If there is no selected item,
Falseand shows a message.
SendImagesends a previously-taken picture, or shows a message asking you to take a picture first.
- The application defines the following event handlers:
lbWallsClickconnects to the remote profile selected in
TakePhotoManagerEndManagersDiscoveryattempts to pair with any remote manager, and if successful triggers
TakePhotoManagerRequestManagerPasswordprovides the password of the remote server application: "1234".
TakePhotoFromCameraAction1DidFinishTakingloads the taken image into the image area and calls
- The application defines the following nonvisual components:
TakePhotoFromCameraAction1is handled by
- The application defines the following controls:
- System.Tether unit