Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"IntentReceiver cannot be resolved to a type". Why?

I'm building a small app that requieres the IntentReceiver.

Actually, I am a newb at Android development and am doing the switch after iOS development. I have the following code:

package com.TheIntent;

import android.content.*; //I added this AFTER I got the error message

public class ReceiveSMS extends IntentReceiver {

}

But is giving me the error I put in the title. I'm following the code as it is written in the book I'm reading about Android development, and after googling for a while I found I have to include android.content.IntentReceiver. But like you can see, it's not working.

I am working with the SDK 2.3.3.

Thanks for any help you may provide!

like image 954
Andy Ibanez Avatar asked Jul 08 '26 02:07

Andy Ibanez


1 Answers

Read this thread - basically IntentReceiver has been removed (a long time ago), and replaced with BroadcastReceiver.

(If you're following a tutorial or book which refers to IntentReceiver, it sounds like you may want to get a more recent one.)

like image 63
Jon Skeet Avatar answered Jul 09 '26 15:07

Jon Skeet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!