returning a file or a file path to the main activity after startActivityForResult
<p>i have just started programming for android and i have a little question </p>

<p>i got a main activity that calls another activity like so:</p>

<pre><code>public void onClick(View view) {
            Intent myIntent = new Intent(view.getContext(), FilePicker.class);
            startActivityForResult(myIntent, PICK_FILE);
        }
</code></pre>

<p>this works fine and opens a new activity which is like a file manager where my user needs to select a file.</p>

<p>my question is this: how do i return the file (a file is another class i have called Option which holds all the file info)
can i return it to the main activity as an object?
or can i just return strings like the path to the file and its name?</p>

<p>this is my setresult code right now:</p>

<pre><code>Intent intent = this.getIntent();

    setResult(RESULT_OK, intent);
    finish();
</code></pre>

<p>where do i add my object so it will return to the main activity?.</p>

<p>thanks!</p>
