01-04-2012 04:41 AM
Don't know where to report this so I'll just post it here. Contacts API misses property fields for retrieving Mobile 2 and Home fax. Also, the faxPhone property returns a work fax, this caused some confusion on my part either it's a home fax or work fax. Hopefully, you could look into this issue.
01-04-2012 03:22 PM
I commented on the issue, but I'll comment here as well. Those fields are internal only and I do not believe they can be accessed from a public API.
As per the fax number, you make a good point that the name and docs make it unclear which fax number it refers to. I have opened this issue to track that - https://github.com/blackberry/WebWorks-API-Docs/is
01-04-2012 08:53 PM
Hopefully this is not tagged as spam, just want to share this in the forums if ever someone else faced the same problem. This comment is also posted on the github thread.
01-05-2012 02:55 AM
01-09-2012 04:25 PM
Truth is that I believe what you want to do hasn't been exposed in Java, and thats why it can't be done in WW. If I'm mistaken ofcourse you can write a custom JS extension, but in truth we should be able to add it to the API.
As per it acting differently on different OS/Build combos, that problem resides on the device code them selves, you can see for yourself the API is not that complicated. Best I can suggest is modifying your UI based on the OS/Build the device is running.
01-09-2012 09:36 PM
Ok I'm hands down with the mobile 2 and home fax issue not being accessible through the API. Probably the best thing to do there is wait for it to be accessible in later SDKs but truth be told, I strongly suggest it to be open to us developers. Who knows who might be needing the mobile 2 data right? Anyway, thanks for your support on this.
Now about the different OS/build combo, is it really because of that? Though lacking with evidence (since I've only tested it on three OS5 devices, Torch OS6 and Bold OS7), results in retrieving data seems really different against OS6 and 7 as to what I get from OS5. Please see this sample :
/** * Retrieve Contact list */ var aContactList = blackberry.pim.Contact.find( null , null , null , null , true); /** * Let's say for example that my first contact has the following * contact details : * Mobile : 11111111111 * Mobile 2 : 22222222222 */ /** * This is where the problems occur */ alert(aContactList.mobilePhone); // Displays 11111111111 on OS5 // Correctly displays 22222222222 on OS6 and 7 /** * For another test, assuming details for second contact : * Mobile : <none> * Mobile 2 : 22222222222 */ alert(aContactList.mobilePhone); // Displays 22222222222 on OS5 // Correctly retrieves none on OS6 and OS7
Sorry, I just need a solid explanation for my client
01-10-2012 08:09 PM - edited 01-10-2012 08:12 PM
It seems like your wish was granted in 6.0. The mobile2 and fax2 were made public then - http://www.blackberry.com/developers/docs/6.0.0api
Unfortunately it did not exist on 5.0, which means it would give a compile-time error if we changed the API generically, but you should be able to modify the API yourself.
As per the code inconsistencies, you can see the code we wrote here and its not complicated. Best advice would be to replicate the 5.0 behaviour in 6.0+ with the extra properties you now have...