百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

PDF-Doc-Scan

> 编程语言
开源

Android PDF 文档扫描应用程序

185 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Android PDF 文档扫描应用程序

PDF-Doc-Scan

Android PDF document scanning app

Main point of this app is to scan or select existing PDF documents simply using intent or chooser. Other apps require payment to access their api/sdk or simply don't have a possible way to do it. So they rely on switching between an app ,file chooser and a scanner.

Usage Example

Create ActivityResultLauncher

kotlin
val pdfResultLauncher = registerForActivityResult(StartActivityForResult()) {
    val uri = it.data?.data
    if (it.resultCode == Activity.RESULT_OK && uri != null) {
//        context.contentResolver.openInputStream(uri)
    }
}

Or using Compose

kotlin
val pdfResultLauncher = rememberLauncherForActivityResult(contract = StartActivityForResult()){
    val uri = it.data?.data
    if (it.resultCode == Activity.RESULT_OK && uri != null) {
//        context.contentResolver.openInputStream(uri)
    }
}

If you target Android 11 (API level 30) and up add query to your AndroidManifest.xml to make it visible for your app.

xml

Query and launch directly

kotlin
val intent = Intent()
intent.component = ComponentName("com.littletrickster.scanner", "com.littletrickster.scanner.ScanActivity")
intent.action = Intent.ACTION_PICK
intent.type = "application/pdf"

val pdfInfo = context.packageManager.queryIntentActivities(intent, 0)
if (pdfInfo.firstOrNull()?.activityInfo?.enabled == true) {
    pdfResultLauncher.launch(intent)
}

Comments

Made this as a prototype while learning Compose framework in late 2021

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Javaandroidjetbrains-composekotlinopencv

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言