mirror of
https://github.com/zxing/zxing.git
synced 2025-01-12 11:47:26 -08:00
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:
parent
cc8a8792c6
commit
4eb503ee7a
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue