Skip to content

AR project to detect pedestrian proximity walking near by

Notifications You must be signed in to change notification settings

Grappus/android-ar-keep-distance

Repository files navigation

android-ar-keep-distance

AR library to detect pedestrian proximity walking near by

How to add the gradle dependency

  1. Add the JitPack repository to your root build.gradle at the end of repositories
    allprojects {
    		repositories {
    			...
    			maven { url 'https://jitpack.io' }
    		}
    	}
    
  2. Add the gradle dependency to you app build.gradle inside dependencies
    dependencies {
    	    implementation 'com.github.Grappus:android-ar-keep-distance:<version>'
    }
    

How to integrate

  1. In your app build.gradle, add java compatibility & enable data binding
    compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
    }
    
    aaptOptions {
            noCompress "tflite"
        }
    
    viewBinding {
         enabled = true
    }
    
    dataBinding {
         enabled = true
    }
    
  2. Start the ARActivity from wherever you want to launch the AR flow
    class SampleActivity : FragmentActivity() {
    
      override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         setContentView(R.layout.activity_sample)
         initComponents()
      }
    
      private fun initComponents() {
         startActivity(Intent(this, ARActivity::class.java))
         finish()
      }
    }
    
  3. ARActivity should handle the rest of the flow

About

AR project to detect pedestrian proximity walking near by

Resources

Stars

Watchers

Forks

Packages

No packages published