startActivivityForResult and onResult From a view

by TreKing » Tue, 20 Jul 2010 09:20:32 GMT

Sponsored Links

Based on the posted code, I'm guessing he has a custom view which he's
getting his context (activity) from and calling startActivityForResult from.

No, nor should you be calling startActivity from a View, you should be
calling it from the parent activity of that view and handling the result
there as well. If your view is what cares about the result, delegate the
result to the view from the activity (which should know about the View).

TreKing <> ; - Chicago
transit tracking app for Android-powered devices


Other Threads

1. Adding image to Background:

Hi All,
Can any one guide how to implement ,As Adding image to the  background.

Thank's in adv.
Diya :)


2. using ident to react when an sms is sent

Hi there

I'm planning to write some code that allows to send sms over a http service. 
So basically I need to achieve that the current messaging application calls a 
function from my class of my appliction. Then I need to get the text and 
establish a connection and so on. Furthermore I need to be able to exit my app 
if there is no internet connection - in such a case the sms should be sent 
using the normal method.

For me developing on android is totally new. (I'm now at ex2 of the notepad 
tutorial, and read the basic docs).

So how can I do what I would like to? Maybe someone can help me with the 
basics: Lets say that a popUp is generated when an sms is sent. Will I use an 
Indent on the method of sendTextMessage ?

Thanks a lot for your help.

Cyrill Helg


3. Having trouble getting ListView to show selected item as highlighted

4. Need Help for installing Eclipse plugin

5. ActivityInstrumentationTestCase issue - can't send key

6. fix for QuickDraw error os x ?

7. dlopen error "Cannot find library" when trying to load a c library