Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Hi Folks - After reading the SDK docs for Settings and Contacts I thnk I'm more lost than ever.

Could someone show me a sample to add/remove/update a contact into the device (first, last, fax, mobile, email, etc...) with the Contact API?

And also...

If someone could provide a sample to update/reset/erase/set device settings with the Isettings API?

Thanks :cry:

Refer PIM Technology guide and Settings technology guide available on BrewMP site.
Code for getting device settings and listening for changes:
nErr = ISHELL_CreateInstance(me->piShell, AEECLSID_SettingsReg, (void **)&piSettings);
if(nErr != SUCCESS)
{
DBGPRINTF("***SettingsReg failed[%d]***", nErr);
return;
}
nErr = ISettings_Get((ISettings *)piSettings, "/system/display/lcdOn", value, 0, &valueLenReq);
if(AEE_SUCCESS == nErr)
{
value = MALLOC(valueLenReq);
nErr = ISettings_Get((ISettings *)piSettings, "/system/display/lcdOn", value, valueLenReq, &valueLenReq);
}
DBGPRINTF("***ISettings_Get [%d]***", nErr);
nErr = ISHELL_CreateInstance(me->piShell, AEECLSID_SignalCBFactory, (void **)&piSignalCBFactory);
if (AEE_SUCCESS == nErr)
{
nErr = ISignalCBFactory_CreateSignal(piSignalCBFactory, helloworld_MySignalCB, (void *)me, &piSignal, &me->pISignalCtl);
if (AEE_SUCCESS == nErr)
{
nErr = ISettings_OnChange((ISettings *)piSettings, "/system/display/lcdOn", piSignal, &me->piReg);
}
}

Refer PIM Technology guide and Settings technology guide available on BrewMP site.
Code for getting device settings and listening for changes:
nErr = ISHELL_CreateInstance(me->piShell, AEECLSID_SettingsReg, (void **)&piSettings);
if(nErr != SUCCESS)
{
DBGPRINTF("***SettingsReg failed[%d]***", nErr);
return;
}
nErr = ISettings_Get((ISettings *)piSettings, "/system/display/lcdOn", value, 0, &valueLenReq);
if(AEE_SUCCESS == nErr)
{
value = MALLOC(valueLenReq);
nErr = ISettings_Get((ISettings *)piSettings, "/system/display/lcdOn", value, valueLenReq, &valueLenReq);
}
DBGPRINTF("***ISettings_Get [%d]***", nErr);
nErr = ISHELL_CreateInstance(me->piShell, AEECLSID_SignalCBFactory, (void **)&piSignalCBFactory);
if (AEE_SUCCESS == nErr)
{
nErr = ISignalCBFactory_CreateSignal(piSignalCBFactory, helloworld_MySignalCB, (void *)me, &piSignal, &me->pISignalCtl);
if (AEE_SUCCESS == nErr)
{
nErr = ISettings_OnChange((ISettings *)piSettings, "/system/display/lcdOn", piSignal, &me->piReg);
}
}