Native Android
Embedding TutAR 3D viewer in a native Android app
Prerequisites
This guide expects basic Android development knowledge with kotlin
Get a Connect3D Vendor Account from TutAR by sending a mail at <[email protected]>.
Generate an API key from the Connect3D dashboard
Getting User Permissions
The AR functionality in the viewer requires Camera access, Make sure to take camera permission from the user.
<manifest>
<!--
rest of the code
-->
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.webkit.PermissionRequest" />
<uses-permission android:name="android.permission.INTERNET" />
<manifest>override fun onCreate(savedInstanceState: Bundle?) {
// rest of the code
if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.CAMERA), MY_PERMISSIONS_CAMERA)
}
}Embedding the Viewer
Refer the below example implementation using the native webkit.WebView
Last updated