Man! This has really gotten me pissed! When Jellybean came out with the announcement that it will support higher resolution images (720×720) compared to what Ice Cream Sandwich did (2562×256), I was really excited.

But even when I sync my Android smartphone with Google Contacts, the contact photos still revert back to 96×96 versions.

I wondered why it took them very long to do something about this and I found out that it had been a few years back when this issue was raised. More than 3 years have passed and the GMail team still had not done anything.

So maybe they are doing something about it … but … 3 years have passed and not even a 256×256 support has not been incorporated.

This is actually the only feature I am looking forward if I were to upgrade my Android OS to Jellybean. I just want to see my contacts’ photos in high resolution.

There is no shortcut in getting a contact’s age in Android. What I did instead was to get the birthday of the contact (if any is provided) and subtracted that from the current year.

The output of a contact’s birthday is a string formatted date with dashes (-) so I had to make a helper method to parse it; get the month, date and year; convert it to a Date object, then do calculation to get the age of the contact.

Check out the helper method below.

And this is how I retrieved the birthday of the contact from the contact list. Once retrieved, I parsed the output and passed it to the calculateAge() method.

The Contacts API in Android has evolved over the years and the current one has many changes that existing code I found in forums to get the list of contacts do not give the results that I wanted.

In my own way, the code below shows how I retrieve the details of contacts. It retrieves the contact’s display name, email and phone number.

Related Posts Plugin for WordPress, Blogger...