Mobile App Conditional Download
April 17th, 2021 / By Andrew Currie
April 17th, 2021 / By Andrew Currie
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 and provide the appropriate mobile app download link.
Below are PHP and WordPress shortcode examples for downloading the Binance mobile app. The WordPress version requires the Mobile Detect Plugin.