
com.path.android.jobqueue.network.NetworkEventProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of android-priority-jobqueue Show documentation
Show all versions of android-priority-jobqueue Show documentation
a Job Queue specifically written for Android to easily schedule jobs (tasks) that run in the background, improving UX and application stability.
package com.path.android.jobqueue.network;
/**
* An interface that NetworkUtil can implement if it supports a callback method when network state is changed
* This is not mandatory but highly suggested so that {@link com.path.android.jobqueue.JobManager} can avoid
* busy loops when there is a job waiting for network and there is no network available
*/
public interface NetworkEventProvider {
public void setListener(Listener listener);
public static interface Listener {
/**
* @param isConnected can be as simple as having an internet connect or can also be customized. (e.g. if your servers are down)
*/
public void onNetworkChange(boolean isConnected);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy