Augmented reality Android app

Published on . Written by

Augmented reality Android app

Augmented reality has gained huge popularity since its inception. It is widely used for gaming, eCommerce, healthcare, sports, etc. Augmented reality is the introduction of artificial things into the real world based on the environment. In this AR project, we will develop an Augmented reality android application which will replace the original card with a different one and will play a video on a static image.


Skyfi Labs Projects
Following are the tools used to develop this Augmented reality project:

Read more..

SLNOTE
  • Unity - It is a cross-platform game development engine
  • Vuforia plugin for unity - It is an Augmented Reality SDK which uses computer vision technology to detect and follow 3D images and planar objects in real-time.

SLLATEST
Project Implementation

First, download and install unity along with the packages like iOS or Android, based on the platform which you want to work. Now you need Vuforia plugin for unity. Create a Vuforia account. Click on develop and add a license key. Copy the license key and paste in a notepad for future use. 

In Vuforia Go to target manager and create two databases then upload the image files by clicking on add target. Give the width and click add. Then download the target database and keep it on your desktop.

If you not yet installed the Vuforia plugin download and install that also. Now it is time to add the license key Click on AR camera on right side bottom of the screen click on open Vuforia configuration and paste the license key. Open the downloaded target database files and import them to unity.

Now we will start the actual project go to Game Object > Vuforia > AR camera it will import the necessary assets for the project.

Next, we need an image target where the augmented content will be displayed in the real world. For that go to Game object > Vuforia > image it will import a sample image. On the Inspector pan (right side of the workplace) you can add your custom target image by clicking on add target button.

First, we will start with the video - After importing the image right click on the image target >3D object > Quad. Now adjust the size of the quad then add the video component by dragging into the unity. Also, add the card image which you want to replace.

Now you can look into the preview before that check the “Load AR_Demo Database” and activate it. Then click on the play button and place the target image, you can observe that when the image is shown the loaded video started playing over the target image. 

Let’s do the same procedure for the card, add the image- now create a material then drag the material and place it on albedo.

To track both the images simultaneously go to Vuphoria configurations and change the max simultaneous track to 2. Check whether it is working or not by clicking on the play button.

Now save the file then goto file>build settings select android and click on switch platform. Now click player settings >XR settings then enable Vuforia Augmented reality. In other settings change API compatibility level to .NET 2.0 and give a package name. After click on “Build” to save the application.

That’s all now your AR (Augmented Reality) android application is ready. Install it on your mobile and run the application.


SLDYK
Kit required to develop Augmented reality Android app:
Technologies you will learn by working on Augmented reality Android app:


Any Questions?


Subscribe for more project ideas