09-24-2013 07:32 AM
in what way does the BlackBerry runtime for Android retrieve the contacts from the default Contacts app? My app uses a normal ContentProvider, as specified by Android, but the data retrieved is not UTF8 encoded, so I get wrong characters for each entry that is not MS-1251 encoded. On the other hand I see that BlackBerry ported Android code (the Contacts app) displays the same data normally. Are you doing some conversions? What is the BlackBerry recommended way to retrieve this data?
Btw, why did you port the Contacts app, wouldn't it be nicer if contacts are open and edited in the native Contacts app?
09-26-2013 07:11 AM
09-26-2013 03:56 PM
I'm just curious, which OS are you testing against? If it's 10.1, that was released with the Android Gingerbread runtime, which in general has poor support for special characters.
Could you test against a 10.2 build and see if the issue persists?
09-27-2013 04:06 AM
Android 2.3 Gingerbread does NOT have poor support for special characters. I've worked with Android since 1.1 and my app is in 16 different languages and never had a problem with 2.3. I actually, never had a problem even with 1.6.
09-27-2013 11:32 AM
If the problem persists, please file a Jira item here: https://www.blackberry.com/jira/secure/Dashboard.j
Please include a description of the problem and attached sample code/application to reproduce the issue. We'll let the devs investigate further.
09-28-2013 03:44 AM
@ jjasmann I'm testing with my Z10 running 10.2.0.1743. I also asked precisely:
In what way does the BlackBerry runtime for Android retrieve the contacts from the default Contacts app?
Are you doing some conversions?
What is the BlackBerry recommended way to retrieve this data?
I was really hoping for an answer from BlackBerry on any of these questions, since this is a BlackBerry forum, in which BlackBerry is expected to provide help to developers, not an independent developer forum where developers help each other.
As you see, I'm not the only one having this problem.
But ok, I will file an item as you suggest.
@tom_anmoney you are absolutely correct, Android handles encodings perfectly, not only since v.2.3, but since day 0, because it relies on Java, which also handles encodings perfectly since day 0. The simple solution of Java/Android is to use UTF-8 all the way. How come Java folks figured that out in 1997 and BlackBerry does not figure it out in 2013, I don't know, it beats me.
So the only way I can see that jjasmann's statement was correct is that it means that the BlackBerry runtime for Android 2.3 handled encodings poorly.