二维码扫描

4.3 (648)

Tools | 115.0KB

Description

简单的二维码扫描工具
开放,允许其它程序调用。以下是调用须知。
开发者文档:
// 参数及结果
mark.qrcode.SCAN // action
mark.qrcode //package
mark.qrcode.CaptureActivity //class
getStringExtra("data")
//result
实例:
// 启动扫码
Intent intent = new Intent("mark.qrcode.SCAN");
intent.setClassName("mark.qrcode", "mark.qrcode.CaptureActivity");
try { activity.startActivityForResult(intent, 0); } catch (Exception ignored) { }
// 获取扫码结果
@Override
protected void onActivityResult(int requestCode, int resultCode,
Intent intent) {
if (requestCode == 0) {
if (intent != null && intent.hasExtra("data")) {
String result = intent.getStringExtra("data"); // 扫码结果
}
return;
}
}

Show More Less

Information

Updated:

Version: 1.0

Requires: Android 2.2 or later

Rate

(648) Rate it

Reviews

Share by

You May Also Like