• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help needed for Broadcast Receiver (Urgent !!)

gaurang4

Lurker
I want to receive notification when Mobile network connection is lost or received. Through following code, I can receive notification for Wi-Fi (Data) connection but not for Mobile (Voice) connection.

Menifest :

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

<application android:icon="@drawable/icon" android:label="@string/app_name">

<receiver android:name=".notifier">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>

</application>

Java :

public class notifier extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {

Toast toast = Toast.makeText(context, "Network Changed !!", Toast.LENGTH_LONG);
toast.show();
}
}

Please tell me, how can I receive notification for Mobile Network (Voice).
 
Hi,
About which developer's forum you are talking ? Please give me link.
I also asked in google groups but didn't get any reply.

Thank you very much for interest !!
 
Back
Top Bottom