Skip to content

Instantly share code, notes, and snippets.

@shakalaca
Created December 27, 2012 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save shakalaca/4389020 to your computer and use it in GitHub Desktop.
Save shakalaca/4389020 to your computer and use it in GitHub Desktop.
透過瀏覽 URL 的方式開啟特定 app, 如果 user 沒有安裝該 app, 則導引到 Play Store 提示使用者安裝.
Redirect /path_to_redirect market://details?id=com.example.package
<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:host="server.to.redirect"
android:path="/path_to_redirect"
android:scheme="http" />
</intent-filter>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment