Using Google ARCore on Android: Key Things to Know

The latest range of flagship phones is able to run augmented reality (AR) apps. Ever since the phenomenal success of the Pokémon Go as the first viral AR game the Android ecosystem thanks to Google’s Project Tango and more recent AR Core embraced augmented reality apps as something irreplaceable and must-haves for smartphones. The AR Core gave Google all the power to build a healthy and all-powerful Augmented Reality ecosystem of apps

 

f:id:capermint:20180607124421j:plain

 

The devices that work with ARCore 

ARCore was first introduced with the Pixel phones of Google. But soon it became commonplace with other Android flagships. Almost every high-end smartphone launched within a span of last two years have been equipped with ARCore. As Augmented Reality is going to be a common offering with many apps, for most devices, this will be a common reality now. Android app developers can be particularly delighted with ARCore opening a vista of new opportunities for them. 

ARCore support for apps 

ARCore now supports all types of apps across niches. From complex AR gaming apps with high-end graphics to an app guiding you placing furniture within the interior to an app for learning human anatomy, this new toolkit supports building all types of augmented reality apps. The ARCore platform is capable of delivering virtual objects and visually makes them appear in the real world through the camera of your device. You can create virtual furniture and then place it in the photograph of your room interior. It is a refreshingly new platform to create sophisticated augmented reality apps for Android. 

Making ARCore work on your phone 

Google designed this ARCore platform as something very easy to install and integrate with your Android app ecosystem. Now after the release of the latest
ARCore 1.0, you can just get it on your device screen with a single click from the Google Play Store. Yes, it is just an app but by downloading it, you ensure that other ARCore supported apps will work smoothly. On its own, it opens only a code library, but just by having it you can make other AR apps work. 

How does ARCore work to support other AR apps automatically? 

Are you an augmented reality enthusiast? Are you an aspiring developer to find your footing with a unique AR app for Android platform? Well, let us explain to you how the ARCore actually works. 

  • Motion tracking: ARCore is equipped to track real-world objects and their spatial position.
  • Tracking the surface: ARCore is also equipped to understand the surface of the objects as flat or curved. It can automatically detect flat surfaces like tables.
  • Evaluating light: Based upon the presence of light ARCore can adjust the colour of the objects and thus can make objects appear more real.

Five key concepts ARCore works with 

To understand explicitly how ARCore works it is also important to understand the key concepts of augmented reality that this toolset works with.

  • Distinct object features: ARCore utilised the device camera to keep note of “distinct object features” when an image is captured. in each captured image.
  • Pose: ARCore to detect the position and orientation of the camera as a reference use an attribute called Pose. Basically, the Pose helps to build the right perspective of an object.
  • Plane: ARCore detects plane and horizontal surfaces like floor, tables, etc and uses these surfaces to integrate virtual object within the scene.
  • Anchor: The anchor refers to a fixed location and a particular real-world orientation which is used by ARCore to track the virtual object’s position.
  • HIT TEST: Hit Test refers to some collections of poses and planes to incorporate real-world interactions in moving the virtual object within an AR app.

Deciphering the classes you need to understand 

By understanding the classes you finally have a grasp of ARCore development. The first and foremost class you need to understand is Session. At the very beginning, you create a new Session. 

Here are other classes and activities that go like this. 

You need to update the ARCore data. You have the session.update() frame and the frame.getCamera() for further uses. 

  1. Now, you need to view the matrices and calculate the projection time.
  2. By taking the frame you created at first you need to create the background now. The background is mainly created by the image we receive from the camera.
  3. Now you need to draw the feature points of the tracked objects. This will be done on the frame by asking for 3D points of the real-world objects.
  4. Now, you need to draw plane surface by asking for tracking objects with a plane surface.
  5. At the last step, you need to draw models based on the hit point on the plane.

What about testing ARCore apps?

ARCore has just been launched and there is hope for tech support with detailed documentation over the web. But, that hardly prevents one from testing the ARCore apps. 

ARCore apps are no different from other apps in applying a Unit Testing methodology for them. At the very basic level which is referred by unit testing, there would be hardly any difference the code is principally Java. But when it comes to UI testing which is at the very surface level of any app testing process, there is still not any clear direction or proven methodology. Of course, there have been many effective strategies and purposeful tools for this.