use of com.quran.labs.androidquran.service.util.QuranDownloadNotifier in project quran_android by quran.
the class QuranDownloadService method onCreate.
@Override
public void onCreate() {
super.onCreate();
HandlerThread thread = new HandlerThread(TAG);
thread.start();
Context appContext = getApplicationContext();
mNotifier = new QuranDownloadNotifier(this);
mWifiLock = ((WifiManager) appContext.getSystemService(Context.WIFI_SERVICE)).createWifiLock(WifiManager.WIFI_MODE_FULL, "downloadLock");
mServiceLooper = thread.getLooper();
mServiceHandler = new ServiceHandler(mServiceLooper);
mIsDownloadCanceled = false;
mSuccessfulZippedDownloads = new HashMap<>();
mRecentlyFailedDownloads = new HashMap<>();
mQuranSettings = QuranSettings.getInstance(this);
((QuranApplication) getApplication()).getApplicationComponent().inject(this);
mBroadcastManager = LocalBroadcastManager.getInstance(appContext);
}
Aggregations