In android 2.3+ there is a ThumbnailUtils class which has
public static final int TARGET_SIZE_MICRO_THUMBNAIL = 96;
but @hide is hiding it from us.
Looking at the source code of the Contacts application, AttachImage.java file I found another interesting thing:
@Override protected void onActivityResult(int requestCode, int resultCode, Intent result) { // omitted if (requestCode == REQUEST_PICK_CONTACT) { // A contact was picked. Launch the cropper to get face detection, the right size, etc. // TODO: get these values from constants somewhere Intent myIntent = getIntent(); Intent intent = new Intent("com.android.camera.action.CROP", myIntent.getData()); if (myIntent.getStringExtra("mimeType") != null) { intent.setDataAndType(myIntent.getData(), myIntent.getStringExtra("mimeType")); } intent.putExtra("crop", "true"); intent.putExtra("aspectX", 1); intent.putExtra("aspectY", 1); intent.putExtra("outputX", 96); intent.putExtra("outputY", 96); intent.putExtra("return-data", true); startActivityForResult(intent, REQUEST_CROP_PHOTO);
That TODO and those .putExtra intentions say a lot, even if there is a constant size sketch, it is not used in the contact application.
source share