Recommended:

  • phpclasses.org
  • jsclasses.org
  • jsmag.com
  • siteapps.com
  • View our reviews on Hot Scripts
  • JS Tutorial
  • scripts.com
  • securesignup.com




Recent Comments

Powered by Disqus




Back to articles

AppDetector

Imagine situation where you have a webstie and a corresponding app. Sometimes you would like to provide a link from your website to specific section of your app. Using custom url scheme and deeplinking you will be able to achieve that.

Only problem is, if user will not have your app, your custom url will error, potentially losing your visitor/user.

This class solves exactly this problem. It will attempt to open your provided custom url (thus opening your app) or fallback to your provided link (where you can provide appstore link to download your app for example).

Usage is simple, provide url scheme and urls for each supported platform and default link for other platform. Additionally for android, you would also need to provide a package id.

//open app if it is already installed or redirect to appstore
AppDetector("myapp://value?param1=value", {
    android: {
        url:"https://play.google.com/store/apps/details?id=com.waterbreadinternet.sushifish", 
        pack:"com.waterbreadinternet.sushifish"
    },
    ios: {url:"https://itunes.apple.com/us/app/sushi-the-fish/id980892350?ls=1&mt=8"},
    other: {url:"http://waterbreadinternet.com/games/sushi-the-fish"}
});

Get it Now


You may also be interested in:

Powered by BlogAlike.com

blog comments powered by Disqus