QR code to local file

Asked by Mirmo19 on 2013-06-25

Hi,

I'm trying to create a QR code that link to a local file on an android tablet : the URL should be file:///mnt/sdcard/external_sd/dossier/index.hml
Indeed, it is to use these tablets with kids on geological "outing" or treasure hunting using QR codes. The purpose is to use QR codes to call local multimedia documents (those will be mini-website) without a 3G or wifi connection.
If i generate a QR code with a local URL, a QR code reader like QRdroid show me this URL as text, and i have to copy the text, launch the navigator and paste the url and it works.
Is it possible to create a QR code that launch directly the navigator with a local URL, like it does with "normal" URL starting with http or https ?

It would be nice for educational uses because it would let us use QRcodes in many new ways, wirelessly.

Thanks for your help, and sorry for my bad english

Romain

Question information

Language:
English Edit question
Status:
Answered
For:
Qreator Edit question
Assignee:
No assignee Edit question
Last query:
2013-07-04
Last reply:
2015-01-13

Dear Romain,

thank you for your question and for using Qreator!

If I understand your question correctly, then you are already able to create the QR code you want (which contains: " file:///mnt/sdcard/external_sd/dossier/index.hml" as the encoded data) and you only want to change the way the reader reacts?

If this is the case, then I'm sorry to have to tell you that Qreator or any other QR code creation software can not help you!

It is soley the responsability of the scanner (in your case QRdroid) to handle the data correctly. It is often the case that scanners are not very good at handling the data sensibly, sometimes because there is no standard for the data in QR codes, sometimes because the OS does not allow certain actions (e.g. create a wireless connection on iOS), and sometimes because the scanner is simply not very good.

There are two ways that I can think of at the moment that might help you (both do not involve qreator):

1) search for a scanner on android that can handle local urls and let the kids install that scanner

2) let the kids install a local webserver (from a short google search, this [1] might be one you can use), and then use a "global" url like "http://localhost:8080/mnt/sdcard/external_sd/dossier/index.hml"

Sorry that I can not help you more directly,
best regards,
Stefan

[1] http://code.google.com/p/free-android-apps/wiki/Project_LocalHTTPD

Mirmo19 (gillieromain) said : #2

Thank you very much for helping me !

 Number 2 solution worked for me, but my "embed" website do not appears with the CSS and all frames it contains : it is only static html pages.

I don't understand because it opens android navigator and if i copy/paste the file:/// adress into the adress bar it works very well.

It seems the html://localhost:8080.... adress make the local web server rendering the html files ?

However, according to solution 1, i have send an email to qr droid team developpement. If you know any other qr code reader

Sorry for my bad english again

Romain

Hi Romain,

Good to hear that number 2 did get you a little closer to your solution...
As for the rendering of the website: the web server does not render a website, only the browser does. If the css and js do not show up, you might have used the the wrong address? Make sure that you use relative addresses to the css and js files (that means something like "/css/mycssfile.css" instead of "file:///mnt/sdcard/external_sd/dossier/css/mycssfile.css")

I'm sorry that I can't help you with solution 1: Our software (qreator) only runs on Ubuntu at the moment and I do not have any access to android devices. I can tell you that I once installed 20 QR code scanners on iOS and the way they handled QR data was very different. So maybe you can test a number of scanners and find the right one :-)

The email to the qrdroid team might have been a good idea: if they think that your use-case is a good one, they will very easily be able to add the desired functionality.

Good luck,
Stefan

P.S. no need to apologize for your English, we are both not native speakers and no one can expect us to be perfect :-)

Koos (koos-roozemond) said : #4

With QuickMark QR code scanner also method 1 can be followed, but if and only if your web browser accept file:///..., so you need for example FireFox web browser combined with Quickmark scanner.

Can you help with this problem?

Provide an answer of your own, or ask Mirmo19 for more information if necessary.

To post a message you must log in.