
Getting Started with ARCore development using Java and ViroCore
Last year, Google released a developer preview of ARCore, their AR SDK for Android. In that announcement, Google stated they would be targeting a 100M devices for support. With thousands of ARKit apps available on iOS, consumer adoption of AR applications will only increase with the launch of ARCore. This post will guide you through development of an ARCore app using samples and demos built using ViroCore.
General AR and ARCore Overview
If this is your first time developing for AR or need some background information on how AR/ARCore works, read through the following posts:
Once you are ready to start developing, you can get setup with ViroCore. ViroCore is SceneKit for Android. With ViroCore you describe scenes at a high level in Java, without having to implement rendering algorithms yourself in OpenGL. It has built-in integration with ARCore, and its rendering feature-set is equivalent to SceneKit. The Viro platform is open source.
PREREQUISITES
- Android Studio
- An ARCore supported Android Device
- Clone the Viro samples from our github page
- ViroCore -> Getting Started guide for setting up ViroCore
There are 3 demos/code samples included in the github repository that you can open easily with Android Studio. For more information on ViroCore features and functionality, read our documentation:
AR Hello World Android
First, open AR Hello World Android. This sample is modeled after ARCore’s Hello World example. It is a simple AR app that allows you to place a 3D Droid into your AR Scene.

Compare the ViroCore code below with the sample provided by Google. With ViroCore you describe scenes at a high level in Java, without having to implement rendering algorithms yourself in OpenGL. This makes ARCore development much simpler with ViroCore and allows developers to focus on building their user experience. The ARHelloWorld sample app is composed of 3 primary sections:
- Creating an AR scene that tracks planes. Then clicking on a plane to place a 3D Object on that spot.
2. Loading a 3D android model (andy.obj), adding it to the ARScene at the given position and making the 3D object draggable.
3. Tracking planes and rendering a surface on them using TrackedPlanesController (ARScene.Listener interface implementation). onAnchorFound is an interface method implemented by TrackedPlanesController
AR Placing Objects
The second sample app, ARPlacingObjects, should look familiar if you have created an iOS ARKit app or are familiar with SceneKit. This demo was modeled after ARKit’s sample demo and allows the user to place various objects into the scene using list overlay.

The AR Placing Objects demo is a good place to start if you are interested in bring your ARKit app over to ARCore. The API’s for the scene graph should look familiar making migration of your ARKit app to ARCore much simpler.
AR Retail
The final demo is the best starting point to start building an ARCore app. This demo is modeled after Amazon’s AR View which allows users to place furniture and other objects into the real world to see how they might look in a room.

Within this example, there are 3 main activities:
- ProductSelectionActivity — Users select the desired furniture to look at in this Android Gallery / ListView.
- ProductARActivity — Users use ViroCore AR to place the 3D model of the selected furniture in AR.
- ProductDetailActivity — User can view detailed information of the selected furniture in a WebView (For example Amazon.com).
These 3 activities give you a solid base from which to build your own ARCore app. If you want to add AR as a feature into your existing Android app, For an in depth tutorial on this code, read our previous post, How to build Amazon’s AR View for ARCore/Android using Java.
Start Building Your Own AR App
By this point, you should be comfortable with the basics of AR and ARCore app development. You can start building your own ARCore app by expanding upon the sample apps provided. Refer to our ViroCore Documentation to learn more about AR app development and other features like 3D Objects, Videos, Sounds, Physics, Particle Effects and more. Look forward to seeing the great AR apps you build with Viro.