Prefer directing user to Barcode Scanner in preference to anything else, no matter what the list of targeted apps are

git-svn-id: https://zxing.googlecode.com/svn/trunk@2909 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen@gmail.com 2013-11-16 00:17:24 +00:00
parent cc8a8792c6
commit 4eb503ee7a

View file

@ -314,7 +314,14 @@ public class IntentIntegrator {
downloadDialog.setPositiveButton(buttonYes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
String packageName = targetApplications.get(0);
String packageName;
if (targetApplications.contains(BS_PACKAGE)) {
// Prefer to suggest download of BS if it's anywhere in the list
packageName = BS_PACKAGE;
} else {
// Otherwise, first option:
packageName = targetApplications.get(0);
}
Uri uri = Uri.parse("market://details?id=" + packageName);
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
try {