Share This Article
Augmented Reality is currently one of the most trending technologies having a wide variety of applications in various sectors. The usage can be dynamic as per how we can imagine, whether it may be useful in industries, simulations, for fun, etc.. You may have seen and perhaps used one of the AR filters and lenses of Snapchat or Instagram. Don’t you get a feeling about how these cool filters/lenses are built? or ‘Can I also build one of the AR lenses of my own?’ or even ‘Can I make an application for Augmented reality?’
If you have those questions in mind let me tell you that the people behind these awesome and trending lenses are not all professionals, young minds are coming forward and democratizing AR so can you too. To get you motivated, go through the blog article published recently where we, four of the community lens creators were interviewed by MoneyControl.
What do you mean by Augmented Reality?
Augmented Reality(AR) is quite often confused with Virtual Reality(VR) just like the term ‘AI’ which is mixed up with other related topics. The fact is that AR and VR are not the same at all. AR is a blended projection of a virtual entity in the physical world, while VR is a projection of a virtual world to our eyes.
Getting Started with Building the First AR App
ViroReact was the only obvious framework after several hours of research. This platform is built on two APIs: ARKit for iOS and ARCore for Android, which is the most prominent in the field of Augmented and Virtual Reality for mobile phones.
ARKit is the most popular AR platform currently available. It enables the development of rich interactive experiences on Apple devices with an A9 processor and iOS.
ARCore is similar to ARKit, with the exception that it only supports a small number of devices that are deemed efficient enough to run the API to its full potential.
Viro is a free and popular AR/VR development framework that lets you create cross-platform apps with React Native and fully native Android apps with Java. It works with ARKit, ARCore, Cardboard, Daydream, and GearVR, among other platforms and APIs.
Installation
- Download nodejs. Go to the site Download and download the latest version of node for your OS. Here, I’m using windows for reference.
- Run the installer package and click on next, leaving the default settings and accepting the terms and conditions, and at last click Install.
- Having node installed, npm by default gets installed. You can check the node and npm versions using the commands node –version and npm –version in your command prompt.
- We need to install some npm dependencies before we can use Viro. As global packages, Viro includes react-native-cli and react-viro-cli . Execute the following commands.
npm install -g react-native-cli
npm install -g react-viro-cli
Initializing the project
- We can now use the react-viro init command, followed by the project name, to start a Viro project. After that, a folder with the same name is created.
react-viro init my_first_arapp
- We simply need to use the npm start command to start the project once it has been initialised. Viro will automatically create a ngrok tunnel that can be used by any phone with an internet connection anywhere around the world.
Testing the app
- Now, we just need to use the Viro TestBed application with the required tunnel or local ip (if you’re connected locally) to access the application.
Note: We do not require Android Studio for our testbed application. Using Viromedia, we can easily access and see our application by following the steps:
Click ‘Enter testbed’
[Enter Your IP]
Hit ‘Go’