background
starting with jelly bean (4.1), android now supports contact images that are 720x720 .
before, starting with ICS (4.0), android has supported contact images that are 256x256.
and before that, contact photos had just a size of a thumbnail - 96x96
the question
is there any function in the API that returns the max size of the contact image?
i also hope that the manufacturers didn't change the max image sizes, and even if they did and we have such a function, it would return us the correct size.
From the announcement:
I would query for
ContactsContract.DisplayPhoto.CONTENT_MAX_DIMENSIONS_URI
. It should return what you're looking for.according to this link, the correct way to get the max size is:
EDIT: if we use at least API 16 (4.1), it's possible to use something like: