Augmented Reality
Do you ever wanted to play with AR a little but didn't want to dive deep into whole ARCore experience? 
In our company as a part of R&D research we developed a little library that provides you with a view showing labels of the destinations provided by you. It's an open source project so you can contribute or write suggestions of new features at our repo https://github.com/netguru/ar-localizer-view-android
You can easily use it in your projects:
Using library
- 
Add repository in you projects build.gradle file 
 repositories { maven { url 'https://dl.bintray.com/netguru/maven/' } ... }
- 
Add library dependency 
 dependencies { implementation 'com.netguru.arlocalizerview:arlocalizerview:0.1.0' }
- 
Add view to your layout 
 <co.netguru.arlocalizer.arview.ARLocalizerView android:id="@+id/arLocalizer" android:layout_width="match_parent" android:layout_height="match_parent" />
- 
In in arLocalizerView onCreate method you need to provide 
 interface ARLocalizerDependencyProvider { fun getSensorsContext(): Context fun getARViewLifecycleOwner(): LifecycleOwner fun getPermissionActivity(): Activity } fun arLocalizerView.onCreate(arLocalizerDependencyProvider: ARLocalizerDependencyProvider)
- 
In order to process the permission request you need to provide permission results to the view. 
 fun onRequestPermissionResult( requestCode: Int, permissions: Array<out String>, grantResults: IntArray )
- 
Finally in order to display the destination labels on the camera preview use 
 arLocalizerView.setDestinations(destinations: List<LocationData>)
 
 
              
 
                      


 
    
Top comments (0)