Launch a scanner app and attach a PDF from Collect

1. What is the problem? Be very detailed.
I want to lauch HP Smart app to allow to scan some document and after use the file option to put the result in my form
I do not want to use the image question beacuse I prefere to obtain all my scan in one PDF file (I dont know how much documents I will have to scan I depend on the situation.

2. What app or server are you using and on what device and operating system? Include version numbers.
I Use 1.20 ans XlsForm

3. What you have you tried to fix the problem?
I put this lines in my excel file :

type |name |image | label | hint |appearance
text |Scan_Doc | | Lancer HPSCAN | Scanner les documents |ex:HP Smart
file |copie_doc | | fichier |

But The scan app do not apear
I try with this alternative:
ex:com.hp.printercontrol

4. What steps can we take to reproduce the problem?

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.
My problem is to understand how I can find the path to a specific app

I don't think this is possible. The HP app you are launching has to know about Collect and know what to return. See https://docs.opendatakit.org/launch-apps-from-collect for more.

Bonjour Fabienne,

The file type only lets you pick a file from your device. It can't also launch an external application. Currently, there's only support for external applications that send back simple values like numbers or text, not binary files so even what @yanokwa links to wouldn't be enough to both launch the app and get the file.

I'd do two separate questions. The first question would use the technique from @yanokwa's documentation and ask the user to launch the application and scan the document. You could make it a text or number question, it doesn't matter because no value will be provided by the app. You are correct that you should launch ex:com.hp.printercontrol. In general, you can find out an application's package name from a Play Store URL like https://play.google.com/store/apps/details?id=com.hp.printercontrol. The second question would be a file question just like the one you wrote and ask the user to attach the file.

Hi LN

I try your tips but I did not succeed

ODK always tell my "this application do not exist"

I try with the all widget form, and I have the same issue with counter apps

I think I must have a wrong parameter somewhere but I didn't catch what to check.

Here is my xls form :
https://drive.google.com/file/d/1E83Fh1OwozeAF04p8mXKdMSh7DIHILDr/view?usp=sharing

And the xml form :
https://drive.google.com/open?id=10_WxFelRE51PO57IgDX37OxeKCDi1hZr

I try to understand something
the package is
change.uw.breathcount
And I have to enter in apparence column
ex:change.uw.android.BREATHCOUNT

How can I find what to use for the following package :
com.hp.printercontrol
or
es.rcti.printerplus

I ask the development of es.rcti.printerplus app for help
Here is his answer

Hello dear user,

I was trying to use this app to send data to Printer+. But i think this intent is not working well on this app, because we have another apps that use intents and it works.

For launching Printer+ on any app you only must set es.rcti.printerplus. But in ODK Collect is not working, i tried using also android.intent.action.SENDTO(uri_data='printerplus://text') is not launching our app.

I'm sorry but we can't do nothing, only developers of this app can fix his bugs.

What a great and kind message from the developer!

I tried it as well and agree it doesn't work. @mmarciniak90, could you please see if it's an issue just with this app or if there's a broader problem?

I think it's the same case like here: Launching External app from ODK Collect - "requested application is missing" - #7 by Grzesiek2010

1 Like

I am facing the same issue with odk collect v1.26.2.

I am facing the same issue here. It keeps on reporting "requested application missing"

Hi @awaafo_donald
what eternal app you want to use? As I said above (in the link I attached) we don't support running any external app from ODK Collect. It must be an app that is specially prepared and knows what data we expect in response.

Ok. Thank you for your response

We recently came back to external application code and realized that certain apps including com.hp.printercontrol and es.rcti.printerplus which @Fabienne35 mentioned above were not being correctly launched from Collect. As @Grzesiek2010 states, not all applications will be able to return a meaningful value to Collect but it should be possible to start any application.

We believe this is now fixed in v1.29. @awaafo_donald please try the beta with the application you need to launch and let us know how it goes.

1 Like

Ok, noted. I will give you feedback soon

1 Like