The number of augmented reality apps in Google Play is growing every day as aspiring and experienced developers from around the world use modern technology to blur the boundaries between the virtual and physical. If you’re thinking about joining their ranks and releasing your own augmented reality application for Android devices, this article is for you.
What Is Augmented Reality?
Augmented reality, commonly referred to simply as AR, is expected to generate $108 billion in revenue by 2021, according to an article published on the Digi-Capital blog. AR makes it possible to overlay computer-generated information, such as text or 3D models,on top of the physical world to create a single seamless experience.
Augmented reality has a number of use cases across a plethora of different industries. For example, CoSpaces Eduis an intuitive educational technology designed for teachers and schools who want to pair traditional teaching methods with augmented reality to improve the learning experiences of students of all ages.
Healthcare professionals use augmented reality in medical diagnosis, treatment, and therapy, and experts forecast the global augmented reality healthcare market to be worth $5.1 billion by 2025. By displaying imaging data and other patient information concurrently, augmented reality can save lives and decrease medical errors. It can also enhance graduate medical training, make it easier for patients to describe their symptoms, or help nurses find veins.
There are also, of course,the gaming and entertainment industries, where augmented reality has already made waves with games likes Pokémon Go and apps like Snapchat. Regardless of which industry you decide to focus on, the opportunities to find success with augmented reality app development are virtually endless.
Marker-Based Augmented Reality
There are two main kinds of augmented reality: marker-based and marker-less. In a marker-based augmented reality application, the images to be recognized are provided beforehand, which significantly simplifies the process of image recognition.
A great example of a marker-based augmented reality application is Google Googles, which allows users to point their mobile devices at a painting, a famous landmark, a barcode or QR code, a product, or a popular image to retrieve more information about it. Another example of a marker-based augmented reality app is Scanbuy, a leading SmartLabel QR Code service provider.
Marker-less Augmented Reality
Unlike marker-based augmented reality applications, marker-less augmented reality applications are capable of recognizing things that were not provided beforehand. As you can probably imagine, it’s much more challenging to create a marker-less augmented reality application since the application must be able to identify patterns, colors, and many other features that may exist in camera frames.
IKEA Place is one of the most popular marker-less augmented reality apps on the market today, allowing its users to place IKEA products in real environments to see how they would fit. The app is able to automatically detect the floor, walls, and ceiling and place true-to-scale models of everything from sofas and armchairs to footstools and coffee tables with a press of a button.
IKEA Place was created using ARCore, and, in the next section of this article, we describe it in greater detail along with several other popular software development kits (SDK)that allow for augmented reality applications to be built for Android devices.
Choosing the Right Augmented Reality SDK for Android
There are several SDKs from which Android developers can choose. An SDKis a set of software development tools that allows the creation of applications for a certain platform, such as Android. A good SDK can significantly simplify the app development process, and this is especially true when it comes to augmented reality.
ARCore is Google’s official SDK for augmented reality development. It was first released in March 2018, and it uses three key technologies to integrate virtual content with the real world: motion tracking, environmental understanding, and light estimation.
To create an augmented reality app with ARCore, all you need is Android Studio version 3.1 or higher with Android SDK Platform version 7.0 (API level 24) or higher and a basic understanding of Android development.
If you meet these requirements, you can follow Google’s excellent tutorial to learn how to create your first augmented reality app for Android devices with ARCore or skip to the next section of this article to learn how to create your first augmented reality app with ARCore in less than 10 minutes. There are also many excellent ARCore tutorials on YouTube, and you should definitely check them out if you’re a visual learner.
Vuforia is a popular augmented reality SDK for mobile devices, enabling the creating of augmented reality apps with its Computer Vision technology capable of recognizing and tracking planar images as well as simple 3D objects.
Unlike ARCore, Vuforia hasn’t been developed with any specific platform in mind, which is why it supports a wide variety of programming languages (including C++, Java, Objective-C++, and the .NET languages) and a broad range of devices running on both iOS and Android.
Vuforia is a commercial product, and the basic edition costs $499 and is intended for companies with revenue under $10 million a year. If you’re just getting started with augmented reality development on Android, Vuforia is most likely overkill for you, and you should start with ARCore instead.
Wikitude is a mature augmented reality SDK for Android, iOS, and smart glasses. It was first released by AR technology provider Wikitude GmbH in 2008, offering image recognition and tracking, 3D model rendering, video overlay, location-based AR, and SLAM technology (Simultaneous Localization and Mapping).
The last feature mentioned is especially important because itenables object recognition and tracking, as well as marker-less instant tracking.Apart from augmented reality, SLAM technology is also used in self-driving cars, unmanned aerial vehicles, and domestic robots, just to give a few examples.
While Wikitude is a commercial product, a free trial version is available to anyone who would like to explore the endless possibilities this augmented reality SDK has to offer.
Create Your First Augmented Reality App in 10 Minutes
Our goal is to create an augmented reality app for Android devices that will detect a plane in a real environment, such a floor or desk, and place the Android mascot on the plane.
- An Android smartphone that supports ARCore
- A USB cable to connect your smartphone to your computer
- The latest version of Unity
- The latest version ARCore for Unity
- Android Studio with the latest version of Android SDK
Step 1: Set Up Your Development Environment
The first step is to set up your development environment. We won’t describe the process in detail here, because Google has create an excellent quickstart tutorial that clearly explains everything you need to do before you can start working on your first augmented reality app with Unity, a cross-platform game engine, and ARCore.
Step 2: Create a New Project in Unity
- Open Unity.
- Click on the New button in the Projects screen.
- Choose an appropriate name from the project.
Step 3: Import the ARCore SDK for Unity
- Open the folder where you downloaded the ARCore SDK for Unity in Windows Explorer.
- Drag and drop the ARCore SDK for Unity file into the Assets folder in Unity.
- Confirm the action by clicking on the Import button.
Step 4: Open the HelloAR Example Scene
- Go to the Assets folder in Unity and navigate to GoogleARCore ? Examples ? HelloAR ? Scenes.
- Drag and drop the HelloAR scene into your Unity Hierarchy.
- Remove the original scene by right-clicking on it and selecting the Remove Scene option.
Step 5: Configure the HelloAR Example Scene
- Go to File -> Build Settings.
- Select Android as your platform and click on Player Settings.
- There, go to Other Settings and disable Multithreaded Rendering.
- Change the Package Name to something more personal.
- Change the Minimum API Level to Android 7.0.
- Change the Target API Level to the version of Android running on your device.
- Go to XR Settings and tick the ARCore Supported option.
Step 6: Build and Run Your First Augmented Reality App
- Go to File -> click on Save Scenes.
- Go to File -> Build Settings.
- Click on Add Open Scenes.
- Make sure Android is selected as the target platform.
- Change your Build System to Internal.
- Tick the Development Build option.
- Make sure your Android device is connected to your computer and is in Development Mode.
- Click Build and Run.
If you’ve followed our instructions, everything should go well and you should now see your first augmented reality Android app running on your smartphone.
Thanks to the availability of multiple excellent augmented reality SDKs for Android, getting started with augmented reality development has never been easier. We hope that this article has helped you pick the right tools for the job, and the next step for you now should be to learn how to use them.