Allow other apps to call FairScan to scan a document to PDF (#81)

* Intent for external calls

* External calls: start on camera screen

* Isolate captured images for each scan session

* Remove access to settings when called externally
This commit is contained in:
pynicolas
2025-12-22 10:03:38 +01:00
committed by GitHub
parent 8d87a8a430
commit b5bf93b7ec
15 changed files with 254 additions and 60 deletions

View File

@@ -62,6 +62,29 @@ FairScan works on any device that:
---
## Experimental: Scan to PDF via intent
FairScan can be invoked by other Android applications to perform a document scan and return a generated PDF.
This feature is **experimental** and intended for developers who want to rely on FairScan as a
simple, privacy-respecting scanning tool.
The intent contract and behavior may change between versions, and backward compatibility
is not guaranteed at this stage.
Intent action: `org.fairscan.app.action.SCAN_TO_PDF`
This is an **implicit intent** that launches FairScan in a dedicated external mode.
When started via this intent:
- FairScan opens directly in scan mode
- the user scans one or more pages
- FairScan generates a single PDF
- the resulting PDF is returned to the calling application as a URI with a limited lifetime
- the calling application should immediately copy the content of the URI as FairScan deletes it later
---
## Technical details
FairScan uses: