Reputation: 116150
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?
Upvotes: 4
Views: 1352
Reputation: 33809
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.
Upvotes: 3