0

How can I start my app by scanning a qr code?

I found this: Android start application from QR Code with params

The answer is not all clear to me.

<data android:scheme="myApp" android:host="org.hardartcore.myApp" android:path="/"/>

I suppose myApp has to ve replaced by the name of my app, and org.hardartcore is the package name? After creating a qr-code of either of these strings and scan it (using xzing's scanner), the only sensible option is to open to scanned string with a web browser. The webbrowser on it's turn simply can't find the string.

What am I missing here?

Community
  • 1
  • 1
user3432724
  • 11
  • 1
  • 5

1 Answers1

0

No, in this case you are trying to declare that the following URI will open your app:

myApp://org.hardartcore.myApp/

Then you VIEW that URI from another app using an Intent. You could put this in a QR code, and hopefully a reader will do that bit for you when it's scanned.

Sean Owen
  • 66,182
  • 23
  • 141
  • 173
  • You are right, it is the QR scanner which doesn't support launching the app directly. When entering in a browser it works. I created a workaround in which the qr code contains a web url and the webpage redirects to myApp:// which launches the app. – user3432724 Apr 24 '14 at 12:49