Surround any link to an Android app in the Google Play Store/Web Market with “qr” “/qr” in brackets and this plugin will create a clickable QR code for that app. AppBrain links are supported as well. You can also just supply the name of the app, but the first two methods are recommended. The appearance of the QR codes can be customized from WP Admin > Settings > Android Market QR Codes.
The plugin can even show the app’s current rating, file size and number of downloads along with its title and official icon. When scanned, the QR codes naturally take you to the Play Store on your phone. The QR codes are also clickable, and if you click on the codes using a computer, you will be taken to the Google Play Store on the web, but if you tap on them from an Android device, it will open the Play Store app on your mobile.
Latest version: v1.25 – March 12, 2012.
- Version 1.25 – March 12, 2012
- Version 1.2 – February 10, 2012
- Version 1.1 – February 07, 2012
- Version 1.02 – April 12, 2011
Installation: upload the folder in the ZIP-archive to the “wp-content/plugins” directory on your server, and activate the plugin in WordPress.
Tested with: WordPress 3.3.1 and earlier versions
= 1.25 =
* The plugin will now accept links to the new Google Play Store. The old Market links still work.
* Update released (but not uploaded to WordPress.org) March 12, 2012.
= 1.2 =
* Added an option to display a “fancy” app information box. It shows the app’s title, rating, number of downloads and file size.
* Fixed a bug that made the app rating display the word “stars” in various languages, depending on where the server was located.
* Update released (but not uploaded to WordPress.org) February 10, 2012. The method for uploading plugins to the WordPress directory is way too much Web 0.1 and not worth the hassle.
= 1.1 =
* The plugin can now grab and display app ratings from the web Market again (Google changed the code).
* Added the option to remove the actual QR code when a page is viewed with a mobile device.
* Made the Settings screen easier to understand or more confusing, depending on your politics.
* Update released (but not uploaded to WordPress.org) February 07, 2012.
= 1.02 =
* Fixed a minor bug (redundant info in the Web Market links didn’t get properly erased).
* Update released April 12, 2011.
= 1.01 =
* Minor fix: the default settings would only appear in the setup screen if the plugin already had been used once.
* Update released April 02, 2011.
= 1.0 =
* Added a feature that shows the app’s title, current rating and official icon.
* Added more options.
* Optimized and streamlined the code.
* Update released April 02, 2011.
= 0.8 =
* Added an option to display a custom download icon on Android devices instead of a QR code.
* Redesigned the Settings screen in WordPress a bit.
* Made the default border color more similar to white.
* Update released March 31, 2011.
= 0.7 =
The first release of the Android Market QR Codes WP Plugin. March 30, 2011.
How to use the Android Market QR codes WP plugin
- Visit either the Android Market on the web or the popular third-party site AppBrain.com, and locate the app you want to create a QR code for.
- In your web browser, copy the entire URL from the address bar and paste it into a WordPress post or page. Paste the link where you want the QR code to appear.
- Simply surround the link with “qr” “/qr” in brackets, and a QR code will be generated automatically by the plugin. You don’t have to use WordPress HTML mode. The appearance of the QR codes can be customized from WP Admin > Settings > Android Market QR Codes. Here are a few examples.
A regular link to an app in the Android Market on the web:
Sometimes the web Market adds redundant info at the end of the links. The WordPress plugin automatically excludes this info, so you don’t have to remove it yourself. Thus, this type of link will work as well.
AppBrain links are also supported:
The QR code generator even accepts just the name of the app, but the first two methods are definitely preferable since they extract the package name.
How the Android Market QR code generator plugin works
- The WordPress plugin will display a QR code whenever you surround a link to an app in the Android Web Market or AppBrain with “qr” and “/qr” in brackets, like illustrated in the examples above. You don’t need to use WordPress HTML mode for this to work.
- Adding this to a WordPress post or page will automatically create a QR code that points to the specified app. By default, the QR code is right aligned and its size is 130x130px. Those values can easily be customized in the settings.
- The QR code is clickable: if you click it while using a computer, the link will open the app in the Web Market. If you browse the page with an Android device, pressing the QR code will take you to the app in the Market on your mobile instead.
- The plugin can also display the title and rating of the app along with its Android Market icon, next to the actual QR code. This feature is a bit experimental and relies on grabbing info directly from the Web Market, so Web Market links are required. If Google changes the structure of the info, this feature might not work until the plugin is updated. If the plugin fails to find the info, a regular QR code will be displayed instead – so it’s safe to use either way.
- If you accidentally add a blank space between “qr” and the actual link, the QR code should work anyway.
- If the link or application title you supply is less than 4 characters, the plugin will not create a QR code.
- The Android Market QR Code WP Plugin can be configured directly from the WordPress admin interface. See instructions below.
- The QR codes have been tested using Google Goggles and Barcode Scanner. More features and options will likely be added later on.
How to configure the QR code plugin in WordPress
Log in to WordPress as an administrator, and from the Dashboard, go to Settings > Android Market QR Codes. There are four options:
QR code alignment
This defines how the QR codes will be aligned. Supported values are “left”, “right”, “top” and “bottom” (without quotation marks). By default, the QR codes will appear to the right of the rest of the post contents, that will fold around it.
QR code size in pixels
This naturally decides the size of the QR codes, in pixels. It must be a square, for example: 150×150
QR code border
This setting lets you customize the border around the QR codes. It must be a valid single line CSS value, for example: 1px solid #dedcdc;. If you don’t want any borders at all, just leave this field blank.
QR code title
The text that is shown when you hover over the QR codes with a mouse cursor. By default, it’s “Scan or click to download”, but you can easily change it to anything you want.
Download icon for Android devices
If you want to display a custom icon on Android devices instead of a QR code, enter the full URL to that image here. All other options except title and alignment will be ignored for that image.
Show Android Market info box
Let the plugin grab the app title, rating and image directly from the Web Market. Requires Web Market links. You can have this option activated and still use AppBrain links and just app titles, although the plugin will then only show the QR code. To activate, simply enter “yes”. Anything else will turn the setting off.
Info box CSS
This setting lets you style the info box with regular CSS. Just enter the CSS like you would do in a normal style sheet, but without class names. For example, to format the text, just enter: “font-size: 12px; font-weight: bold;”. Please note that the box will inherit the alignment and height of the QR codes, but not the border value. Default setting: padding:7px; margin:10px; border:1px dotted #cccccc; text-align:right; font-size:12px; font-weight: bold;
App rating CSS
This is the CSS for the app’s Market rating, and it works just as the info box above. Default setting: float:left;font-size:12px;font-weight:bold;
- Adding a button to the WordPress toolbar that will automatically enclose the selected text in the QR tag (if possible).
- Feature suggestions are appreciated (so are bug reports)! Please leave a comment if there is a feature you’d like to see.
About the plugin
I write about Android on several blogs, and whenever I make a post about an app, I usually just add a text link to the application in the Web Market – after all, Google’s Installation button that pushes apps directly to our phones is very convenient.
However, some people still prefer QR codes for various reasons. If they read the post away from home, for example, they’re probably not logged in to Web Market and thus the push feature won’t work. Another reason for visitors wanting QR codes might be that they rather not leave the page they’re currently viewing, or that they’re simply used to QR codes. And what if they view the page using an Android device instead of a computer?
My point is; I wanted a WordPress plugin that allowed me to easily add Android Market QR codes to a post or page – codes that acted differently depending on if they were viewed with an Android or a computer. I searched for such a plugin, but I couldn’t find one that worked the way I wanted. Hence, I spent a day making the Android Market QR Codes WP Plugin. Since it’s based on WordPress shortcodes feature, it requires WP 2.5 or above (which shouldn’t be a problem unless you don’t believe in updating stuff). If you mention or write about the plugin, please link back to this post.