I think that You would need to bind() these two classes. This probably is preferrable way to send data from BroadcastReceiver to Activity
Alternatively You might also want to read this: http://stackoverflow.com/questions/2616859/how-do-i-pass-data-from-a-broadcastreceiver-through-to-an-activity-being-started W dniu wtorek, 30 października 2012 16:54:02 UTC+1 użytkownik Krzysztof K napisał: > > 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

