Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I invoke a custom application with a QR code?

This QR code contains a link to an app in the android market. When scanning it I get the option to "open browser" which then redirects me to the android market (market://details?id=tv.justin.android). What I'm wondering is if I can encode a specific url that would allow me to invoke my own app?

like image 833
Micah Avatar asked Oct 27 '25 18:10

Micah


1 Answers

You can create an Activity for your app and specify that it can handle a custom URI scheme:

<activity android:name=".MyCoolActivity">
    <intent-filter>
        <action android:name="android.intent.action.VIEW"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <category android:name="android.intent.category.BROWSABLE"/>
        <data android:scheme="myScheme"/>
    </intent-filter>
</activity>

Then you can create a QR code that uses that URI scheme.

like image 90
John Flatness Avatar answered Oct 29 '25 08:10

John Flatness