Android 中检查网络连接并添加警告提示
public void run() { if (!isNetworkAvailable()) { LogHelper.d(TAG, 'Network is not available.'); // TODO: Show a warning to the user that network is not available. return; } }
原文地址: https://www.cveoy.top/t/topic/oOcA 著作权归作者所有。请勿转载和采集!