sharathg.satya -10 Posting Whiz in Training

this is my broadcastreceiver which will be invoked on receiving a message.
<code>
package com.dummies.castsBroad;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;

public class BroadcastsActivity extends BroadcastReceiver {
/** Called when the activity is first created. */

@Override
public void onReceive(Context arg0, Intent arg1) {
    // TODO Auto-generated method stub

System.out.println("message is received ");
Toast.makeText(arg0, "text", 888).show();
Log.i("message","message is reveived and reveiver is invoked");
}
}
</code>

and the following is my manifest file.

<code>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dummies.castsBroad"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk android:minSdkVersion="8" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >
    <receiver
        android:name=".BroadcastsActivity">

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

        </intent-filter>
    </receiver>
</application>

</manifest>
</code>
i am not getting any toast message or console message or the logcat information.
Can any one help me in finding out what exactly the problem is.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.