For that you need to add one more Receiver to check Internet Connection is Enable/Disable, When its enable you can start your bootReceiver or Any Activity you want to run.
public class NetworkInfoReceiver extends BroadcastReceiver {
@Override
public void onReceive(final Context context, final Intent intent) {
try {
/***
* Here we need to check its running perfectly means this receiver
* call when net is off/on. You should have to check
* */
final ConnectivityManager conMngr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
// Check if we are connected to an active data network.
final NetworkInfo activeNetwork = conMngr.getActiveNetworkInfo();
final boolean isConnected = activeNetwork != null && activeNetwork.isConnectedOrConnecting();
if (isConnected) {
/**
* Start service/receiver/activity here.
* */
} else {
/**
* Stop service/receiver/activity here.
* */
}
} catch (final Exception e) {
}
}
}
And you add this receiver into AndroidManifest.xml file.
<receiver
android:name=".NetworkInfoReceiver"
android:enabled="true" >
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
</receiver>