[android-developers] Re: After onActivityResult event State Is Gone (Droid Phones)
Using the Application should work in this instance, however, why not
use setResult(resultCode, data) to return a result from the child
activity?
http://developer.android.com/reference/android/app/Activity.html#setResult(int,
android.content.Intent)
You can add the url to the data (Intent) that is returned:
data.putExtra("url", url)
On Sep 17, 7:57 am, GregAZ <ggur...@gmail.com> wrote:
> I have a problem that's only affecting Droid phones. I end up not
> being able to access global variables after an onActivityResult event.
>
> While looking into this I came across:http://stackoverflow.com/questions/708012/android-how-to-declare-glob...
>
> I follow those directions, but still the value is NULL.
>
> On my HTC Hero everything I've tried works. On Droid phones everything
> is NULL or an empty string.
>
> What I need is the URL from the webview. In the onPageFinished I've
> been putting the URL into a global variable. The app has the correct
> URL in that method because that's when I pop open the imagepicker.
> After that is when the global variable value is gone. I also can't
> read the webview (I can on my Hero, can't on Droid's) after hitting
> the onActivityResult event. GetUrl() returns NULL for them, works fine
> for me. Everything also works fine in the simulator. I've 1.5, 2.1,
> and 2.2 in the simulator.
>
> How else can I store the info I need to retrieve?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home