Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get a file from CamScanner or Office Lens in a web app running on Android?

I have an Angular web app that I access via Chrome on Android. I can use:

<input type='file' accept='image/*' capture>

(or a similar accept attribute with ng-file-upload) to upload images to the server directly from the camera app. Very cool. But I'd like the user to be able to choose, say, CamScanner or Office Lens instead of the camera app so they can format documents prior to uploading.

I've played around with the accept attribute but can't seem to get those apps to show up on Android's "Complete action using" app list.

Ideas?

like image 269
Thomas Mueller Avatar asked Jun 24 '15 18:06

Thomas Mueller


People also ask

Is Microsoft lens better than CamScanner?

If you want to export in PDF format, you should go with Office Lens as it won't leave any watermark. If you want the document in the image format, then CamScanner will probably be the best choice, as it automatically applies the filter, and you also get a few options to modify the colour a bit.

Which is better Google lens or Microsoft lens?

Both Microsoft Lens and Google are targeted to a different set of audience. Microsoft Lens helps users to save and share pieces of information with a quick snap. On the other hand, Google Lens is more like a friendly companion, which helps users to explore things around them in an entirely new way.


2 Answers

At this point, there's no way to do that, unless you are working on a standalone APP.

The browser behavior for an element <input type="file"/> relies only on the default APP for handling Photos and Videos.

like image 165
tin Avatar answered Sep 20 '22 09:09

tin


Have you had a look at this?

https://developer.chrome.com/multidevice/android/intents

Relevant example from the link:

Here's an intent that launches the Zxing barcode scanner app. It follows the syntax thus:

intent:
   //scan/
   #Intent; 
   package=com.google.zxing.client.android; 
   scheme=zxing; 
end;

To launch the Zxing barcode scanner app, you encode your href on the anchor as follows:

 <a href="intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;end"> Take a QR code </a>

So for camscanner, the package is

com.intsig.camscanner

So use that instead of com.google.zxing.client.android in the above example.

like image 31
UtsavShah Avatar answered Sep 20 '22 09:09

UtsavShah