From bdbde402149693e46a8fbd3e52e6c0ad7d9a78f6 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 3 Dec 2019 11:10:25 +0800 Subject: [PATCH] up --- .../io/legado/app/service/help/Download.kt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 app/src/main/java/io/legado/app/service/help/Download.kt 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