On 25 February 2011 01:23, dashman <[email protected]> wrote:
> i've studied that class and still haven't figured out how to get
> notifications.
Add this to your manifest:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
and this:
<receiver android:name=".MyReceiver">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>
then create receiver:
public class MyReceiver extends BroadcastReceiver
{
@Override
public void onReceive(Context context, Intent intent)
{
// do what you want to do here
}
}
and you shall be done.
--
Regards,
Marcin
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en