Problem with IADDRBOOK_CreateRec on Motorazr V3C | developer.brewmp.com Problem with IADDRBOOK_CreateRec on Motorazr V3C | developer.brewmp.com

Developer

Problem with IADDRBOOK_CreateRec on Motorazr V3C

Forums:

Hi,

I m facing some problem with IADDRBOOK_CreateRec() on Motorazr V3C handset.

I am using BREW SDK 3.1.2,
I m trying to create a new record on Motorazr handset using this API.
But this is returning NULL,
I used IADDRBOOK_GetLastError() to get the details about this error.
But it is returning the value "242772"
I am unable to trace out what the error is.

Can anybody help in resolving this issue.

...abhi

Try with different category that you are passing to this API. Same issue is discussed in many other threads.
This error doesn't seems to be a valid one!

Try with different category that you are passing to this API. Same issue is discussed in many other threads.
This error doesn't seems to be a valid one!

There's plenty of threads dedicated to the problematic implementation of address books on the Moto V3 series of phones. I ran across one thing that hadn't been sufficiently addressed and figured I'd put this out there for any other poor soul doomed to work on these quirky devices.
Creating new records

Records must be created with the category 0x8001. There may be others that work but I don't know them.
Entries for phone numbers (apparently... our app doesn't add phone numbers) must be created with field type AEEDB_FT_PHONE.

Iterating over existing records

Only iterate over the category AEE_ADDR_CAT_NONE. Do not iterate over categories with IADDRBOOK_EnumCategoryInit() and IADDRBOOK_EnumNextCategory(). If you do the OEM address book -- and other applications that only iterate over AEE_ADDR_CAT_NONE -- will show no entries until you reboot the phone.

The iteration was the thing I hadn't found elsewhere. Nasty, nasty surprise for those thinking they're doing it right by using the category enumeration.
Hope this helps someone who otherwise would be crying.

There's plenty of threads dedicated to the problematic implementation of address books on the Moto V3 series of phones. I ran across one thing that hadn't been sufficiently addressed and figured I'd put this out there for any other poor soul doomed to work on these quirky devices.
Creating new records

Records must be created with the category 0x8001. There may be others that work but I don't know them.
Entries for phone numbers (apparently... our app doesn't add phone numbers) must be created with field type AEEDB_FT_PHONE.

Iterating over existing records

Only iterate over the category AEE_ADDR_CAT_NONE. Do not iterate over categories with IADDRBOOK_EnumCategoryInit() and IADDRBOOK_EnumNextCategory(). If you do the OEM address book -- and other applications that only iterate over AEE_ADDR_CAT_NONE -- will show no entries until you reboot the phone.

The iteration was the thing I hadn't found elsewhere. Nasty, nasty surprise for those thinking they're doing it right by using the category enumeration.
Hope this helps someone who otherwise would be crying.