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

Developer

Forums

Forums:

Hi,

I am trying with following code to get default ring tone. But IRINGERMGR_EnumNextCategory always returns error even though category information is filled.

retVal = IRINGERMGR_EnumCategoryInit(pRinger);
while (retVal == SUCCESS) {
retVal = IRINGERMGR_EnumNextCategory(pRinger, &cat);
if (retVal == SUCCESS &&
cat.id == AEE_RINGER_CATEGORY_ALL) break;

if (retVal == SUCCESS) {
defaultRingId = cat.idRinger;

Anybody know why?

Regards
tuma

You are checking for the wrong return value on IRINGERMGR_EnumNextCategory(). You should be checking for TRUE, not SUCCESS. From the BREW API Reference:
[INDENT]IRINGERMGR_EnumNextCategory()
Return Value:
TRUE: SUCCESS
FALSE: FAILED or no more categories to enumerate.[/INDENT]

You are checking for the wrong return value on IRINGERMGR_EnumNextCategory(). You should be checking for TRUE, not SUCCESS. From the BREW API Reference:
[INDENT]IRINGERMGR_EnumNextCategory()
Return Value:
TRUE: SUCCESS
FALSE: FAILED or no more categories to enumerate.[/INDENT]