Digital PCI Fast Hosting & Custom Design
Hosting Development
Custom Web Development WordPress Development SEO Services
Domains Dedicated Servers
Virtual Private Servers Semi-Dedicated Server Dedicated Servers
Member Login Tools
Version Control System Code Unminifier DNS Lookup Digital PCI Radio
About
About Digital PCI Developer Blog Data Centers Contact Us
Digital PCI
Hosting Development
Custom Web Development WordPress Development SEO Services
Domains Dedicated Servers
Virtual Private Servers Semi-Dedicated Server Dedicated Servers
Tools
Version Control System Code Unminifier DNS Lookup Digital PCI Radio
About
About Digital PCI Developer Blog Data Centers Contact Us

Mobile App Conditional Download

April 17th, 2021   /   By Andrew Currie

Learn more about Mobile App Conditional Download

So you’re a mover and shaker, you have both iOS and Android applications for your business, bravo! Wouldn’t it be nice to detect which type of device is accessing your website and provide the appropriate download link for your mobile app, instead of always displaying both links? This can be especially useful when working with the portrait view on mobile and other smaller viewports.

Using the Mobile Detect library for PHP, you can set up dynamic download links that accommodate the devices accessing your site. Follow the instructions below to set up a working mobile detection demo with conditional mobile app download links:

  • Download the Mobile Detect library. You can copy the Mobile_Detect.php file from our version control server here or download the entire release from their website here.

  • Copy the Mobile Detect library to your webserver.

  • Copy and paste the demo web page below to a new file on your site (i.e. demo.php)

If you’ve set it up correctly, the demo web page should look like the screenshot below and the button will take you to the download page for the Binance mobile app. If you’re visiting the page using an iOS device, the button will take you to the Apple App Store link. If you visit the page using an Android-based device, the button will take you to the Google Play Store.

Mobile App Conditional Links Demo

Digital PCI What is Digital PCI? Website Development Digital PCI Radio
Tools Version Control System Code Unminifier DNS Lookup
QuickLinks Member Login Contact Us

© 2023