Android barcode reader [closed]
i really want to know if there is a uri for calling via intent a generic barcode scanner, i don't want to limit the user to ZXing one.
There is no official Google-approved generic intent, but theoretically any app could register itself for the ZXing intent, as long as you don't explicitly set the package name.
In other words, ZXing's intent is:
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
intent.setPackage("com.google.zxing.client.android"); // This is explicit - leave off to let other apps match
intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
startActivityForResult(intent, 0);
If you leave off the line I commented (line 2), any app that registers itself as an IntentHandler for "com.google.zxing.client.android.SCAN" can handle the Intent. Whether any actually do (or whehther they handle the same range of extra options and return the same kinds of data) is a different issue, although it's listed on the OpenIntents site.
if there is a uri for calling via intent a generic barcode scanner
No, sorry, there is none.
精彩评论