The Intent constructor you want is Intent(Context, Class<>). I usually call 
this as Intent(this, MainActivity.class);

On Tuesday, October 30, 2012 8:54:02 AM UTC-7, Krzysztof K wrote:
>
> I've a two classes;  MainActivity.java which is Activity extented and 
> CallRec.java which extends BroadcastReceiver (so I can't extend this with 
> Activity class). One of the CallRec.java methods is triggered by system 
> broadcast intent (TelephonyManager.EXTRA_STATE) . All I want to do is send 
> back some data from CallRec to MainActivity to display it. I've tried to 
> send intent from CallRec to MainActivity but Eclipse throws an error: 
> "The constructor error Intent(CallReceiver, Class<MainActivity>) is 
> undefinied.
>
> Please help, I'm stuck with it.
>

-- 
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