RECEIVE_SMS does work in Android 2.2 Froyo

I had a bit of trouble with getting my application "SMS Sports Organiser" to receive SMS messages. I read a lot of message boards on the internet with people saying it doesn't work in Android 2.2 Froyo.

This is incorrect. It does in fact work properly.

You need to make sure you have the following permission in your manifest.

<uses-permission android:name="android.permission.RECEIVE_SMS"></uses-permission>


Then you need to make sure that your application that will deal with the incoming SMS messages is a BroadcastReceiver

public class SMSReceiver extends BroadcastReceiver


You also need to specify this class as a receiver in the manifest

<receiver android:name=".SMSReceiver"> 
     <intent-filter>
        <action android:name="android.provider.Telephony.SMS_RECEIVED" />
     </intent-filter>
</receiver>

Thats it!