0
希望这里有一个简单的问题,我有一个使用Zxing的条形码扫描器,这是一个代码提取(class1)。我试图把这个与数据库(class2)挂钩。我怎样才能使用(“SCAN_RESULT”)。在我的数据库类中,我认为我是正确的行voky,但似乎无法完成它!Android数据库字符串访问
Class1的
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
if (requestCode == 0) {
if (resultCode == RESULT_OK) {
String contents = intent.getStringExtra("SCAN_RESULT");
contents.?????
Intent intent2 = new Intent("com.new.data");
startActivityForResult(intent2, 1);
的Class2
String b_code = ?????;
ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("Barcode", b_code));
如何开始服用这种从一类到其他任何想法?
帮助大大appriciated!
非常感谢
要命的感谢送与其他班的意图和访问内容作为字符串非常多,用这种挣扎!非常感谢 – user985644
在这种情况下,接受答案。 –