Search in sources :

Example 1 with QuranDownloadNotifier

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);
}
Also used : Context(android.content.Context) QuranDownloadNotifier(com.quran.labs.androidquran.service.util.QuranDownloadNotifier) HandlerThread(android.os.HandlerThread)

Aggregations

Context (android.content.Context)1 HandlerThread (android.os.HandlerThread)1 QuranDownloadNotifier (com.quran.labs.androidquran.service.util.QuranDownloadNotifier)1