I am using a method to detect pdf support on an Android device that goes like this
public boolean canDisplayPdf() {
PackageManager packageManager = application.getPackageManager();
Intent testIntent = new Intent(Intent.ACTION_VIEW);
testIntent.setType("application/pdf");
if (packageManager.queryIntentActivities(testIntent, PackageManager.MATCH_DEFAULT_ONLY).size() > 0) {
return true;
} else {
return false;
}
}
And that has been working great so far. I know that at least the HTC default viewer, droidreader and adobe acrobat get reported that way and the right result is returned. However I now got a comment on the market console by a user that says that he has pdf support on the device, but from the described behaviour of the app I conclude that this method returns false.
Is there any better way to detect pdf support?
PS: I would love to be able to ask the user for details on the market.
From all sources I found and practical experience testing on a rather large variety of devices the approach I have taken is correct.
I have not had any further feedback and think there might have been user error or a bad pdf application version involved.