• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Symbol Functions
      • Item Functions
      • Array Object
      • Audio Object
      • Barcode and QR Codes
      • Case Object
      • Document Object
      • File Object
      • Freq Object
      • Geometry Object
      • HashMap Object
      • Image Object
      • List Object
      • Map Object
      • Path
      • Pff Object
      • SystemApp Object
      • ValueSet Object
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
      • Batch Edit Statements
      • Numeric Functions
      • String Functions
      • Multiple Occurrence Functions
      • General Functions
      • Date and Time Functions
      • External File Functions
      • Synchronization Functions
        • SyncConnect Function
        • SyncConnect Function (CSWeb)
        • SyncConnect Function (Bluetooth)
        • SyncConnect Function (Dropbox)
        • SyncConnect Function (LocalDropbox)
        • SyncConnect Function (LocalFiles)
        • SyncConnect Function (FTP)
        • SyncServer Function
        • SyncDisconnect Function
        • SyncData Function
        • SyncFile Function
        • SyncMessage Function
        • SyncParadata Function
        • SyncApp Function
        • SyncTime Function
        • GetBluetoothName Function
        • SetBluetoothName Function
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

GetBluetoothName Function

Format
s = getbluetoothname();
Description
The getbluetoothname function returns the name of the device as broadcast to other Bluetooth devices. When other Bluetooth-enabled devices scan for nearby devices to connect to, this is the name that they will see.
When using Bluetooth for synchronization between two devices, the Bluetooth name of the device is what is shown in the screen asking the user which device to connect to. The Bluetooth name of one device may be passed as an argument to the syncconnect function on the other device in order to connect directly to that device, bypassing the screen asking the user which device to connect to.
Because it is possible to change the Bluetooth device name using logic (setbluetoothname) or in the settings on Android and in the Device Manager on Windows, the Bluetooth name can be used as a way to name devices for management and audit purposes. The device can be assigned a unique identifer or serial number which is used as the Bluetooth device name. Using getbluetoothname, this identifier can be written to an item in the data file for audit purposes, supplied as a username for synchronization, or used as a key in lookup file as part of a survey management system.
Return Value
The function returns a string containing the name of the device.
Example
PROC DEVICE_NAME

preproc

    DEVICE_NAME = 
getbluetoothname();
   
noinput;
See also: SetBluetoothName Function, GetDeviceID Function, GetOperatorId Function, GetOS Function, GetUserName Function, SyncConnect Function (Bluetooth)