Problem: How to Beam Files via IR or Bluetooth on PocketPC
Solution: It is possible to beam files via infrared or Bluetooth from a PocketPC handheld in your Satellite Forms application, by calling the standard PocketPC beam utility and passing it the path and name of the file you want to send.
To achieve this, use the SysUtils extension that was introduced with Satellite Forms 7.1, which includes an SU_LaunchApp function:
USAGE: result = SU_LaunchApp( strPath, strParam )
The system beam utility is "\Windows\beam.exe" for PocketPC 2003 and higher devices. For PocketPC 2002 devices, it is "\Windows\irsquirt.exe" (supporting infrared only). This is the value you need to pass in the strPath parameter for the SU_LaunchApp function.
The strParam parameter should contain the full path and name of the file you want to beam, for example "\My Documents\Work Order
Sample\ESMS20000_WRKSITES.PDB".
An example to beam the WrkSites table would go like this:
dim strBeamUtilPath, strPDBPathname, result
strBeamUtilPath = "\Windows\beam.exe"
strPDBPathname = GetAppPath & "ESMS20000_WRKSITES.PDB"
result = SU_LaunchApp( strBeamUtilPath, strPDBPathname )
When this function is run, the standard Beam utility progress screen will appear overtop of your application, listing the file to send and the devices found within range. The user must tap on the device they wish to send to from the list presented. When the transfer is done, the user needs to tap on the OK button in the upper right of the screen and that will close the Beam utility and return them to your application.
You can beam files to any accepting devices, including other PocketPC PDAs, PCs, PalmOS PDAs, mobile phones, etc.
Because Satellite Forms 7.x uses the same Palm Database PDB for application tables on both the PalmOS and PocketPC platforms, you can beam a PDB from a PocketPC to a PalmOS device and use it directly without any need for conversion.
When receiving a beamed file on a PocketPC device, files are placed into the \My Documents folder by default. If you need to have that file in a different folder on the PocketPC (for example your application folder), you'll need to devise a method to do that. [The PalmDataPro.com SFTextFile-PPC extension (http://www.palmdatapro.com/itm00152.htm) does provide the capability to copy files programmatically.]
Note that this method is not applicable to the Windows CE OS, which does not have a standard beam utility like the Windows Mobile/PocketPC OS does.
Keywords: Beam, Send, Bluetooth, IR, Infrared
KB ID: 10084
Updated: 2008-05-16
Satellite Forms KnowledgeBase Online