File: example.html

Recommend this page to a friend!
  Classes of Arturs Sosins   JavaScript Mobile App Detection   example.html   Download  
File: example.html
Role: Example script
Content type: text/plain
Description: Example file
Class: JavaScript Mobile App Detection
Detect of mobile app is installed and open it
Author: By
Last change: formating
Date: 8 years ago
Size: 1,393 bytes
 

Contents

Class file image Download
<!DOCTYPE html> <!-- /************************************************************* * This script is developed by Arturs Sosins aka ar2rsawseen, http://webcodingeasy.com * Feel free to distribute and modify code, but keep reference to its creator * * This library allows to detect if your app is installed * by using cutom url scheme on Android and iOS phones. * It can open an app if it is installed or * redirect to app store link if app is not installed * * For more information, examples and online documentation visit: * http://webcodingeasy.com/JS-classes/AppDetector **************************************************************/ --> <html> <head> </head> <body> <h2>Redirecting...</h2> <p><a href="https://play.google.com/store/apps/details?id=com.waterbreadinternet.sushifish">Click here if your browser is not redirecting</a></p> <script src='AppDetector.js'></script> <script> //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"} }) </script> </body> </html>