TYPE ON THE FIELD BELOW AND PRESS ENTER TO SEARCH FOR BLOG POSTS

What is Augmented Reality (AR)?

Augmented reality (AR) is an interactive experience of a real-world environment where the objects that reside in the real-world are “augmented” by computer-generated perceptual information, sometimes across multiple sensory modalities, including visual, auditory, haptic, somatosensory, and olfactory. The overlaid sensory information can be constructive (i.e. additive to the natural environment) or destructive (i.e. masking of the natural environment) and seamlessly interwoven with the physical world such that it is perceived as an immersive aspect of the real environment.


Uses of Augmented Reality (AR)


It enhances the natural environment/ situation, offering perceptually enriched experiences. With the help of advanced AR technology (e.g. adding computer vision and object recognition), the information about the surrounding real world of the user becomes interactive and digitally manipulable. Information about the environment and its objects is overlaid on the real world. This information can be virtual or real, e.g. seeing other real sensed or measured information such as electromagnetic radio waves overlaid in exact alignment with where they actually are in space.


Hardware


The hardware components for augmented reality are the processor, display, sensors, and input devices. Modern mobile computing devices like smartphones and tablet computers contain these elements which often include a camera and MEMS sensors such as an accelerometer, GPS, and solid state compass, making them suitable AR platforms.


ARCore Android


ARCore is Google’s platform for building augmented reality experiences. Using different APIs, ARCore enables your phone to sense its environment, understand the world, and interact with information. Some of the APIs are available across Android and iOS to enable shared AR experiences.

ARCore does two things – tracking the position of the mobile device as it moves and building its own understanding of the real world. ARCore uses three key capabilities to integrate virtual content with the real world as seen through your smartphone’s camera.

  • Motion Tracking allows the phone to understand and track its position relative to the world.
  • Environmental understanding allows the phone to detect the size and location of all types of surfaces – horizontal, vertical and angled like the ground, a coffee table or walls.
  • Light estimation allows the phone to estimate the environment’s current lighting conditions

Check ARCore Support in Android


AR Optional apps can use ArCoreApk.checkAvailability() to determine if the current device supports ARCore. On devices that do not support ARCore, AR Optional apps should disable AR related functionality and hide associated UI elements. “checkAvailability()” may need to query network resources to determine whether the device supports ARCore. Both AR Optional and AR Required apps must ensure that the camera permission has been granted before creating an AR Session.


void checkARCoreAvailability() {
ArCoreApk.Availability availability = ArCoreApk.getInstance().checkAvailability(this);
if (availability.isTransient()) {
// Re-query at 5Hz while compatibility is checked in the background.
if (availability.isSupported()) {
//Supports ARCore
} else {
// Unsupported or unknown.
}
}

Check Camera Permission


Both AR Optional and AR Required apps must ensure that the camera permission has been granted before creating an AR Session.


// ARCore requires camera permission to operate.
if (!CameraPermissionHelper.hasCameraPermission(this)) {
CameraPermissionHelper.requestCameraPermission(this);
return;
}

Check AR Installation


Apps must also call ArCoreApk.requestInstall() before creating an ARCore session, to check whether a compatible version of ARCore is installed. This will prompt the user to install or update ARCore if needed.


// Make sure ARCore is installed and up to date.
try {
if (mSession == null) {
switch (ArCoreApk.getInstance().requestInstall(this, mUserRequestedInstall)) {
case INSTALLED:
// Success, create the AR session.
mSession = new Session(this);
break;
case INSTALL_REQUESTED:
// Ensures next invocation of requestInstall() will either return
// INSTALLED or throw an exception.
mUserRequestedInstall = false;
return;
}
}
}


catch (UnavailableUserDeclinedInstallationException e) {
// Display an appropriate message to the user and return gracefully.
Toast.makeText(this, "TODO: handle exception " + e, Toast.LENGTH_LONG)
.show();
return;
} catch (Exception message) { // Current catch statements.
message.printStackTrace();
return; // mSession is still null.
}

Conclusion


While ARCore is impressive in its own right, it can be beneficial to developers as well as general consumers. It is a public source, so any developer can call upon its APIs to use in their apps to enjoy benefits like motion tracking and environmental understanding. The app saves time and money. In a broader aspect, Ikea and Amazon have AR built into their apps, allowing the user to simulate what an object looks like in their home. This list is pretty exhaustive and satisfies most of the developers out there. Google has a quick start guide for each of them which can be referred to in order to get up and running with ARCore apps.


Ready to Build Your Projects?

The best companies and startups hire our top dev teams, and so can you.
Start a Project
GSM Plus Infotech