Forum Index » macOS Development » Mac OS library update issue   XML
 
Author Message
mGoyal


Joined: 21/05/2021 06:47:44
Messages: 1
Offline

We are currently using an older version of Jabra SDK(Nov2017 version) and we are trying to upgrade to the latest version for OSX.

The following methods are not available in the new version:-
Jabra_GetLock
Jabra_ReleaseLock
deviceInfo.isBTPaired

Our implementation was library based, we were using libjabra.1.dylib
And using Jabra_Initialize.

Please provide us a demo for libarary integration, as we have a old code base so we have to stick to dylib integration, can not move to framework.
Our app does not supports swift as it is a coredova application.


Please find the attached source code:-

-(void)setup
{

// Prevent setup more than once
static dispatch_once_t once;

dispatch_once(&once, ^
{
NSMutableDictionary* dict = [[NSMutableDictionary alloc] init];
[self setJabraDevices:dict];
void* lib_handle = dlopen("libjabra.dylib", RTLD_LOCAL|RTLD_LAZY);
if (!lib_handle) {
NSLog(@"[%s] Unable to load libjabra library: %s\n", __FILE__, dlerror());
}
else
{
NSLog(@"Successfully loaded libjabra library");
}
lib_handle = NULL;
lib_handle = dlopen("libjsoncpp.1.dylib", RTLD_LOCAL|RTLD_LAZY);
if (!lib_handle) {
NSLog(@"[%s] Unable to load libjsoncpp.1 library: %s\n", __FILE__, dlerror());
}
else
{
NSLog(@"Successfully loaded libjsoncpp.1 library");
}
Jabra_SetAppID(APP_NAME);
[self initializeGNLibrary];
});
}
kolbeck-jabra


Joined: 17/03/2021 01:39:35
Messages: 7
Offline

Hi mGoyal,

With the latest release of SDK 1.8.8.4 on May 5th we reintroduced Jabra_GetLock and Jabra_ReleaseLock methods.
Download the package from the macOS SDK page, or directly here: https://developer.jabra.com/fileMedia/download/5a6b18a7-3718-4d3e-89bb-0c625f111064

I will do some more investigation on deviceInfo.isBTPaired and code examples, and get back to you.

Best regards,
Jesper Kolbeck
kolbeck-jabra


Joined: 17/03/2021 01:39:35
Messages: 7
Offline

Hi again mGoyal,

There's no version of deviceInfo.isBTPaired in the new library, but you you can try to get the name of the BT connected device.
I null is returned, then it is not paired. Something like below.

Will this solve your problem?

bool isBTConnected(const unsigned short deviceID)
{
    char* name = Jabra_GetConnectedBTDeviceName(deviceID);
    if (name)
    {
        Jabra_FreeString(name);
        return true;
    }
    return false;
}


Jesper
kolbeck-jabra


Joined: 17/03/2021 01:39:35
Messages: 7
Offline

Hi mGoyal,

Our technical team did some more digging and found that the isBTPaired function was renamed in October 2018 to isDongle.
You should be able to use that function directly without using the work-around provided earlier.

Best regards,
Jesper Kolbeck
 
 
Go to: