Android string access for database
<p>hopefully a simple question here, i have a barcode scanner using Zxing, this is an extract of the code(class1). I am trying to hook this up with a datbase(class2). How can i use the ("SCAN_RESULT"). In my database class think i am vaugly on the right lines but can't seem to comlete it!</p>

<p>Class1</p>

<pre><code>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);
</code></pre>

<p>Class2</p>

<pre><code>  String b_code = ?????;
ArrayList&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;();
nameValuePairs.add(new BasicNameValuePair("Barcode", b_code));
</code></pre>

<p>Any ideas on how to begin taking this from one class to another?</p>

<p>Help greatly appriciated!</p>

<p>Many Thanks</p>
