Android Open Source - NoteZap Network State Change Receiver






From Project

Back to project page NoteZap.

License

The source code is released under:

MIT License

If you think the Android project NoteZap listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.outerthoughts.notezap;
//from w ww .  ja  va  2s . c  om
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class NetworkStateChangeReceiver extends BroadcastReceiver {

  @Override
  public void onReceive(Context context, Intent intent) {
    Log.i("NoteZap", "Network state changed. Thread id: " + Thread.currentThread().getId() + ". Network is: " + (NetworkChecker.isNetworkAvailable(context)?"available":"not available"));
    Intent sendZap = new Intent(context, BatchedSendService.class);
    sendZap.setAction(BatchedSendService.ACTION_CHECK_NETWORK);
    context.startService(sendZap);

  }


}




Java Source Code List

com.outerthoughts.notezap.BatchedSendService.java
com.outerthoughts.notezap.EnterZapActivity.java
com.outerthoughts.notezap.NetworkChecker.java
com.outerthoughts.notezap.NetworkStateChangeReceiver.java
com.outerthoughts.notezap.PreferencesMainActivity.java
com.outerthoughts.notezap.SendIntentService.java
com.outerthoughts.notezap.WidgetProvider.java