English 中文(简体)
使用z图书馆的roid子
原标题:android using zxing library

1. 我用扫描仪代码的用意启动z:

Intent intent = new Intent("com.google.zxing.client.android.SCAN");
        intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
        startActivityForResult(intent,REQUEST_QR_CODE);

但这只是回报内容/格式。 如果一对x条条条码扫描仪表扫描仪,它将确定其内容,如其URL或联系,并促使其采取适当行动,如在浏览器上增加联系或开放。

当使用意图触发同一目的时,如何做到相同

有一个文件解释将由谁获得的价值观。

 itent.getStringExtra("SCAN_RESULT");
                     intent.getStringExtra("SCAN_RESULT_FORMAT");

i 希望了解为QR代码重新编号的不同内容

问题回答

<代码>Intent机制是指,如果你想要提供某种不同于Barcode Scanner所能提供的行动。 在这种情况下,正如你希望用户开放和使用Barcode Scanner一样,这只是合理的。

You do that a little differently but it is also just a matter of sending the right Intent. Off the top of my head:

Intent intent = new Intent("android.intent.action.MAIN");
intent.addCategory("android.intent.category.LAUNCHER");
intent.setPackage("com.google.zxing.client.android");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
activity.startActivity(intent);




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签