The Mobile Diary: Experimentation with ARCore v1.9.0 (Pt. 1)

Here, we will try out ARCore’s augmented image tracking capabilities and see how it stacks up to ARKit.

From one of their developer sessions, Google claims ARCore’s augmented images have been improved with 30% better tracking precision and 15% better detection recall.

To test these claims, we will make a simple augmented image marker for our app.

It will find an image marker and render a video on top of it.

From there, I will move the image marker all around to see how well the video stays attached to its marker.

Additionally I will be trying out the new image tracking modes for augmented images.

Now that we have planned out the blueprint for the app, lets get started and make some sweet AR content!Getting StartedNOTE: I just want to quickly mention that I will be developing using the ARCore Android SDK and not the ARCore Unity SDK.

If you get stuck in setup you can refer to the “Getting started with Sceneform and ARCore” section of Sceneform documentation.

Click here to View.

Let’s open up Android Studio and create a new project!.I am going to select “Add No Activity” because I will create my own empty activity later.

Next, we have to name our project.

Just go ahead and name it whatever you want.

This is not really that important of a step.

After that, you can select your programming language (Java or Kotlin) and the minimum API level.

I am going to be using Kotlin for my programming language and API 27: Android 8.

1 (Oreo) for my minimum API level.

Also I am going to be checking the “use androidx.

* artifacts” box.

It’s important to note that ARCore can support a minimum API level of API 24: Android 7.

0 (Nougat).

Next up, we will make sure we have the Sceneform Tools plugin installed in Android Studio.

For macOS go to the top bar and click: Android Studio > Preferences > Plugins.

For windows go to: File > Settings > Plugins.

Next we want to click Marketplace, search for and install the Google Sceneform Tools (Beta).

This will allow us to import 3D models into Android Studio.

From here we will have to import all the required libraries and APIs that ARCore and Sceneform require.

Let’s open up our project level build.

gradle file.

We need to make sure that our project includes Google’s Maven repository (Usually it does by default).

It can be found under allprojects > repositories > google()Next I am just going to add some extensions to make it easier to read and enter version numbers for our imports.

Feel free to copy my full project level build.

gradle file below:That should be all we have to do with the project level build.

gradle file.

Now we need to open the app level build.

gradle file and make some changes.

First off, we need to import our ARCore and Sceneform dependencies.

If you set your Target SDK Version to anything above API 26 we need to add some compile options to let Sceneform libraries use language constructs from Java 8.

To do this lets add this right below buildTypesIt’s also important to make sure we have our minSDKVersion set to 24 or higher.

Now if you copied my project level build.

gradle file make sure you set the version numbers from the versions extension I created.

Here is how my app level build.

gradle file looks fully completed:We should be finished with all of our gradle files now.

Android Studio should be asking you to sync your gradle files.

Go ahead and do that now.

After it finishes syncing, open up our AndroidManifest.

xml file.

We need to add permissions to use the camera and ar functionality.

Now that we have the required permissions and have told Google that this is an AR application we should be ready to start programming!This will conclude the first part of this series.

I will update this article with a link to part 2 when its available.

Thanks for reading!NOTE: I would like to point out that I am requiring ARCore for this app.

This is to make the article as simple as possible.

If you would like to see a tutorial on handling optional AR functionality, let me know and I can write one!.

. More details

Leave a Reply