AR library to detect pedestrian proximity walking near by
- Add the
JitPack
repository to your rootbuild.gradle
at the end of repositoriesallprojects { repositories { ... maven { url 'https://jitpack.io' } } }
- Add the gradle dependency to you app
build.gradle
insidedependencies
dependencies { implementation 'com.github.Grappus:android-ar-keep-distance:<version>' }
- In your app
build.gradle
, addjava
compatibility & enabledata binding
compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } aaptOptions { noCompress "tflite" } viewBinding { enabled = true } dataBinding { enabled = true }
- Start the
ARActivity
from wherever you want to launch theAR
flowclass 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() } }
ARActivity
should handle the rest of the flow