OK, I'm stuck.

I call startActivityForResult. Based on everything I've read, this
should return a result after the activity calls finish().

But it doesn't.OnActivityResult() is called with the correct request
code IMMEDIATELY after startActivityForResult is called. Based on
debugging, this is happening before DownloadActivity.onCreate() is
called. If I add a default constructor to DownloadActivity, it also
happens before the constructor is called.

OnActivityResult is called.

Here are the relevant lines of code, both of them:

                        Intent intent = new Intent(this,DownloadActivity.class);
                        startActivityForResult(intent, DOWNLOAD_ACTIVITY_RESULT 
);

Since the ApiDemos example does work, I checked to see the manifest on
the SendResult Activity. I found it was very simple and changed mine
to match, but that didn't help.


        <activity android:name=".DownloadActivity">
        </activity>

This is the stack trace when OnActivityResult is called.

MyActivity.onActivityResult(int, int, Intent) line: 330
MyActivity(Activity).dispatchActivityResult(String, int, int, Intent)
line: 3828
ActivityThread.deliverResults(ActivityThread$ActivityRecord, List)
line: 3310
ActivityThread.handleSendResult(ActivityThread$ResultData) line: 3356
ActivityThread.access$2700(ActivityThread, ActivityThread$ResultData)
line: 119
ActivityThread$ResultData(ActivityThread$H).handleMessage(Message)
line: 1878
ActivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 123
ActivityThread.main(String[]) line: 4338
Method.invokeNative(Object, Object[], Class, Class[], Class, int,
boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 521
ZygoteInit$MethodAndArgsCaller.run() line: 860
ZygoteInit.main(String[]) line: 618
NativeStart.main(String[]) line: not available [native method]

Can anyone make any suggestions? I know I haven't given you much to go
on, but I don't have any more. If I can't fix this, I can only
conclude that I can't use startActivityForResult, because it fails for
unknown reasons that I can't explain, even if it works just great for
all other developers.

Nathan

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to