Visit GitHub Repo

Yeah , Check us on Medium also :-

A simple library that allows you to add a graph in Real world using ARCore.




Add following dependency to your root project build.gradle file:

allprojects {
    repositories {
        maven { url "" }

Add following dependency to your app module build.gradle file:

dependencies {
   implementation 'com.github.the-losers:ARGraphLibrary:x.y.z'


  • Manifest File

    • Permissions, you need two permissions , 1. Camera so you can add a graph in real world, 2. Storage to record and save the added graph video.
       <uses-permission android:name="android.permission.CAMERA"/>
       <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    • Enable ARCore in Android studio, There are two types of AR apps: AR Required and AR Optional.

      • AR Required apps
         <application><!-- Indicates that app requires ARCore ("AR Required"). Causes Google
         Play Store to download and install ARCore when the app is installed.
         <meta-data android:name="" android:value="required" />
      • AR Optional apps
        <application><!-- Indicates that app supports, but does not require ARCore ("AR Optional").
        Unlike "AR Required" apps, Google Play Store will not automatically
        download and install ARCore when the app is installed.
       <meta-data android:name="" android:value="optional" />

      Read more about it here - Enable ARCore

  • build.gradle

    • This library is using java 8 language features , so to enable them you will have to add below lines otherwise it will throw an error during compile time.
     compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
  • AndroidX

    • ARGraph is using androidx library, So You will have to migrate your project to AndroidX. Read more about it here - Migrating to AndroidX


  • Create the GraphConfig builder,

     GraphConfig mGraphConfig = GraphConfig.newBuilder()
        .setGraphList(getList()) //pass the list that you want to add in real world
  • Call the function loadGraph,

  • You can also check wheather a device support the arcore or not by simple calling the below method,

    //Do stuffs
    } else{
    //hide button or whatever you wants to do

App using ARGraph

My Run Tracker - The Run Tracking App


Deepak Kumar


ARGraphLibrary is available under the BSD license. See the LICENSE file.

The End : Happy Coding :D

Learners From Our Courses Work At