diff --git a/app/src/main/java/io/legado/app/service/help/Download.kt b/app/src/main/java/io/legado/app/service/help/Download.kt new file mode 100644 index 000000000..b439e4c82 --- /dev/null +++ b/app/src/main/java/io/legado/app/service/help/Download.kt @@ -0,0 +1,18 @@ +package io.legado.app.service.help + +import android.content.Context +import android.content.Intent +import io.legado.app.service.DownloadService + +object Download { + + fun start(context: Context, bookUrl: String, start: Int, end: Int) { + Intent(context, DownloadService::class.java).let { + it.putExtra("bookUrl", bookUrl) + it.putExtra("start", start) + it.putExtra("end", end) + context.startService(it) + } + } + +} \ No newline at end of file