startDownloadService(intent);
}
<<<<<<< HEAD
class ProgressBarUpdateTask extends AsyncTask {
private boolean callOnFinish = false;
=======
protected void downloadPage(int readerId, Integer[] integers){
Intent intent = new Intent(this, QuranDataService.class);
intent.putExtra(QuranDataService.DWONLOAD_TYPE_KEY, QuranDataService.DOWNLOAD_SURA_AUDIO);
intent.putExtra(QuranDataService.SOURA_KEY, integers[0]);
intent.putExtra(QuranDataService.AYAH_KEY, integers[1]);
intent.putExtra(QuranDataService.END_SOURA_KEY, integers[2]);
intent.putExtra(QuranDataService.END_AYAH_KEY, integers[3]);
intent.putExtra(QuranDataService.READER_KEY, readerId);
startDownloadService(intent);
}
protected void downloadJuza(int readerId, Integer juza){
downloadPage(readerId, QuranInfo.getJuzBounds(juza));
}
private void initServiceConnection() {
serviceConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName name, IBinder service){
downloadService = ((QuranDataService.QuranDownloadBinder)service).getService();
starting = false;
}
public void onServiceDisconnected(ComponentName className) {
downloadService = null;
}
};
}
class ProgressBarUpdateTask extends AsyncTask {
>>>>>>> 55d55105464a177fcf9b47e567c6b069ee88bded
@Override
protected Void doInBackground(Void... params) {
while (starting || QuranDataService.isRunning){ |