Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] One-time scan via the GET_CONTENT intent #390

Open
thornySoap opened this issue Jan 8, 2025 · 3 comments
Open

[FEATURE REQUEST] One-time scan via the GET_CONTENT intent #390

thornySoap opened this issue Jan 8, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@thornySoap
Copy link

Is your feature request related to a problem? Please describe.
Often I just need to upload a document. Right now the process is to open the (very nice) document scanner app, scanning and exporting the document to a directory, then switching back to the upload app, choosing the exported file and lastly deleting both the exported and the in-app document. This could theoretically be simplified.

Describe the solution you'd like
When in the default file chooser, some external apps are listed in the navigation drawer to let the file be choosen from. I think for that to happen, an app needs to register for the android.intent.action.GET_CONTENT intent. Then I could just click on the app in this list instead of extra opening from the homescreen. After scanning and editing there should be a confirm button to return the document to the uploader application. For that the document might be stored in the cache and be deleted after a day or so.

Describe alternatives you've considered
I'm not exactly sure, when it is broadcasted, but the android.intent.action.PICK intent could be registered for as well.

Additional context
Another open source scanning app has this feature, although the document is kept in storage after it is picked:

@thornySoap thornySoap added the enhancement New feature or request label Jan 8, 2025
@farfromrefug
Copy link
Collaborator

@thornySoap will be in next version. However might rethink that in the future. The reason is that you should be using "share" from your file chooser. There you can do the same but also you can add multiple files at once!
I think Open With is really made for apps that are made to "view" the element. We are not viewing it, we are importing it.
But for now i ll let the feature in unless i get complains

@thornySoap
Copy link
Author

I'm not sure if I really understand you correctly, but I think what I meant is something else. I want to export, not import.

What I think, how you understanded me but what I don't exactly requested as a feature:

  • I open the file manager from the home screen
  • I open some image using "Open with"
  • I want OSS document scanner to appear there and click on it
  • The image is added to a new document in the app

What I instead think might be a useful feature:

  • I open a third-party app or a website which requires uploading some document
  • I click "Pick file" and the default file picker appears
  • I choose OSS document scanner from "Open from" (not "Open with")
  • The app opens just like when opening from home screen, i.e. camera shows up and I can scan my papers
  • I scan them and edit them accordingly
  • I click on a new "Confirm" button
  • OSS document scanner closes and the third-party app or website shows up again, indicating that I have picked a file

In the the newest commit you added the VIEW intent filter in the manifest which indeed corresponds to "Open with". I think using GET_CONTENT and the application/pdf MIME-type instead you could achieve such "Open from" functionality.

Here is a screen recording from another scanner app:

ScreenRecording_20250109_162500_720_1600.1.mp4

Regardless, thank you for the quick answer!

@farfromrefug
Copy link
Collaborator

@thornySoap yes i totally got it the wrong way :D GET_CONTENT is then a great idea! Will try to see how hard it is to implement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants