Download Print this page

Property Ksktscanpropidfriendlynamedevice - Socket ScanAPI Reference Manual

Advertisement

Socket ScanAPI Reference
ScanAPI Interface Version

14.11 Property kSktScanPropIdFriendlyNameDevice

This property is used to read or modify the friendly name of a device. The friendly
name is carried as a string in the property.
The friendly name of a device is what appears during a Bluetooth device discovery
process. The main purpose of changing the friendly name of a device is to have an
easy way to identify a particular device.
The changes are active immediately upon success of the Set Complete operation.
The friendly name size can be as long as 32 UTF8 characters including the null
terminator.
Example:
C/C++:
// Set a new friendly name
SKTRESULT SetNewFriendlyName(
IN SKTHANDLE hDevice,
IN
const
char* pszNewFriendlyName
)
{
SKTRESULT Result=ESKT_NOERROR;
TSktScanObject ScanObj;
memset(&ScanObj,0,sizeof(ScanObj);
ScanObj.Property.ID=kSktScanPropIdFriendlyNameDevice;
ScanObj.Property.Type=kSktScanPropTypeString;
ScanObj.Property.String.pValue=pszNewFriendlyName;
ScanObj.Property.String.nLength=
strlen(pszNewFriendlyName);
// set the friendly name here
// the final result should be fetched
// in the Set Complete handler
Result=SktScanSet(hDevice,&ScanObj);
return
Result;
}
Java:
public long
SetNewFriendlyName(ISktScanDevice device,String newFriendlyName){
long
result=SktScanErrors.ESKT_NOERROR;
© 2013 Socket Mobile, Inc.
1.0.0 or higher
93/152

Advertisement

loading
Need help?

Need help?

Do you have a question about the ScanAPI and is the answer not in the manual?

Subscribe to Our Youtube Channel