*> startActivityForResult is only implemented for an Activity, not for a
Context!*

LOL... I should have noticed that before posting my comment

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, May 19, 2011 at 3:50 PM, Kristopher Micinski <[email protected]
> wrote:

> Look carefully at the API documentation.
>
> Context does *not* have startActivityForResult, Activity does.  However,
> Context has startActivity...
>
> You're thinking too far down the inheritance line...
>
> Kris
>
>
> On Thu, May 19, 2011 at 5:40 PM, kypriakos <[email protected]> wrote:
>
>>
>> That's what I said too - huh? ;)
>>
>>        Intent intent = new Intent();
>>        intent.setClass(androidContext,
>> mysnapPic2ServiceImpl.class);
>>        intent.setFlags(intent.FLAG_ACTIVITY_NEW_TASK);
>>        intent.putExtra("from", "1");
>>        final int result=1;
>>        // androidContext.startActivity(intent);
>>        androidContext.startActivityForResult(intent, result);
>>
>> The startActivity method (commented out) is found fine when used - the
>> one below it gives:
>>
>> [ERROR] snapPic2Servlet.java:[89,22] cannot find symbol
>> symbol  : method startActivityForResult(android.content.Intent,int)
>> location: class android.content.Context
>>
>> It has to be something stupid I can't see right now ...
>>
>> On May 19, 2:12 pm, Kostya Vasilyev <[email protected]> wrote:
>> > Huh?
>> >
>> > http://developer.android.com/reference/android/app/Activity.html#star..
>> .,
>> > int)
>> >
>> > Since API level 1 - i.e. Android 1.0.
>> >
>> > Perhaps you could post a code snippet showing the compile error.
>> >
>> > -- Kostya
>> >
>> > 19.05.2011 22:04, kypriakos пишет:
>> >
>> > > So the API level 4 (to which cupcake/1.6 is based on) does not have
>> > > the startActivityForResult -
>> > > which is in line with the fact that the compilation fails.
>> >
>> > --
>> > Kostya Vasilyev --http://kmansoft.wordpress.com
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to