App Store redirect

Overview:

Often customers are interested in providing end users with a single, device agnostic URL that they can use to forward them to the appropriate App Store based on the device type.  Below are two approaches to implement this:

 

Approach #1: Verivo application server web.config

The web.config file on the Verivo application server contains re-direct keys for iPhone, Android, and Blackberry.  The keys are as follows:

BB:

key=” DeployRedirectBBAppWorld” value=”<AppID>=<URL>”
Example:  <add key="DeployRedirectBBAppWorld" value="1015=http://appworld.blackberry.com/webstore/content/14292" />

Android:

key=”DeployRedirectAndroid” value=”<AppID>=<URL>”
Example: <add key="DeployRedirectAndroid" value="1015=http://market.android.com/details?id=com.pyxismobile.myFPA.ui.activity" />

iPhone:

key=”DeployRedirectiPhone” value=”<AppID>=<URL>”
Example: <add key="DeployRedirectiPhone" value="1015=http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=393146881&amp;mt=8" />

The user browses to the http://<appserver>/<virtualdirectory>/deploy/ from the device and is presented with a link to the appropriate App Store.

 

Approach #2: Custom ASPX script

Below is a custom ASPX script that can be hosted anywhere (also attached to the article).  The user browses to the .aspx file and is redirected to the appropriate App Store.

 

<%@ Language=C# %><%

       String userAgent = HttpContext.Current.Request.UserAgent.ToLower();

       if(userAgent.Contains("android")){

                       Response.Redirect("https://play.google.com/store?hl=en");

       }

       else if (userAgent.Contains("ipad") || userAgent.Contains("iphone") || userAgent.Contains("ipod")){

                       Response.Redirect("http://itunes.apple.com/us/genre/ios/id36?mt=8");

       }

       else if (userAgent.Contains("blackberry")){

                       Response.Redirect("http://appworld.blackberry.com/webstore/");

       }

      

       else {

%>

 

We were unable to determine your device type.  Please select:

 

<br/><br/>If you have an Android device: <a href="https://play.google.com/store?hl=en">Download the android application</a>.

<br/><br/>If you have an iPhone, iPad, or iPod device:  <a href="http://itunes.apple.com/us/genre/ios/id36?mt=8">Download the iOS application</a>.

<br/><br/>If you have a Blackberry device:  <a href="http://appworld.blackberry.com/webstore/">Download the Blackberry application</a>.

 

<%

       }

%>

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk