Since iOS 11, the native camera app can decode QR codes. QR codes are the default serialization tag for the ADIs of Thngs and products in our platform.
We believe native QR code support allows for a fundamental change in the way people interact with real-world objects. Until now, a user could interact with a QR code Thng only through a web app that uses scanthng.js or by downloading a native app that supports QR codes. With iOS 11, over a billion iPhone and iPad users can directly interact with Thngs by scanning a QR code directly from the camera app with no third-party app.
A powerful feature of the EVRYTHNG platform is the Redirector. The Redirector allows you to write simple context-aware rules that are fired when the QR code of a product or Thng is scanned. The Redirector supports redirection to web pages and native apps.
Here's example of how EVRYTHNG can help you drive a native user experience on an iOS 11 device. In this use case, you use a Thng, its QR code, and the Redirector to build a campaign that opens a song on iTunes based on where the QR code on a Thng or product was scanned.
Create a project. Be sure to set "Current Project" to your QR code project, otherwise resources (such as applications or Thngs) will be unscoped and accessible to every project in your account.
In the newly created project, create an application, "Songs of London."
Create a Thng using the 'Thngs' section. The newly created Thng doesn't have a QR code yet. You add that after the redirector is set up.
- Go to the account Redirector using the left navigation panel.
- Add a rule to the account Redirector to defer the redirection result to the previously created application, "Songs of London."
In the "Songs of London" application, scroll down and add an application Redirector rule by selecting Create Rule.
To create a rule that plays "Streets of London" when someone scans a QR code near the EVRYTHNG office, set the name to "Streets of London" and the Redirect URL to
https://itun.es/gb/et8st?i=323732789. Because iOS apps can be bound to URLs, this opens the native iTunes app with the selected song. With this mechanism, you can drive native experiences through the web.
- Declare this rule to trigger when the QR code is scanned in or near London by adding two conditions:
- Location latitude between 50.0 and 51.0.
- Location longitude between 0.0 and 1.0.
- Click Create rule.
Add more songs as desired, change the coordinates to your location, or add other context-based rules. The example above shows an additional song for when the QR code is scanned in New York.
Go back the Thng you created and click Setup redirection.
- For the application, select "Songs of London," add a default URL, and click Create Redirect to create the rule.
A QR code is created to enable devices to follow the redirection.
Now that your Redirector is set up and working properly, open the camera app on your iPhone or iPad and target the QR code on your screen. You don't need to take a picture. You see a notification when the QR code is decoded. If you don't have iOS 11 installed yet, try the QR code scanner that comes with another app, such as Twitter or Chrome. When you scan the code, the Redirector returns the URL of the song in iTunes based on your location.
The Redirector is synchronous and returns a valid URI based on simple rules. The Redirector can redirect to the URL of a web app or to a URI launching an app on iOS or Android.
The Reactor is an asynchronous rules engine that can implement complex rules.
The Redirector is best when you want to drive tailored user experiences from the web as a direct response to an action. For example:
- Present personalized information to users after a product scan.
- Open native apps and web apps based on the product the user scanned.
- Launch the control application of a connected device.
Don't use the Redirector to:
- Change incoming events.
- Send incoming events to third party systems.
- Trigger background services and execute complex instructions.
Updated 11 months ago