@Override public void onResume() { super.onResume(); /** observer download change * */ if (downloadObserver == null) downloadObserver = new DownloadChangeObserver(); getContentResolver() .registerContentObserver(DownloadManagerPro.CONTENT_URI, true, downloadObserver); updateView(); }
@Override protected void onDestroy() { super.onDestroy(); unregisterReceiver(completeReceiver); }
@Override public void onPause() { super.onPause(); getContentResolver().unregisterContentObserver(downloadObserver); }