3

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!

Andy Ibanez
  • 12,104
  • 9
  • 65
  • 100

1 Answers1

5

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

Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
  • Yep, that was it. Dang. It's being hard to find an updated Android Development book... Thanks a lot for your answer. Just out of curiosity, why did they do this change? – Andy Ibanez Dec 21 '11 at 06:50
  • @Sergio: No idea, I'm afraid - I've never done any Android development myself. Although I was briefly on the Android team, I was miles away from the SDK - please don't take anything about this answer to be "from a Google spokesman" or anything like that ;) – Jon Skeet Dec 21 '11 at 06:59