As you'll see, there's a lot of code for this recipe. Start by opening the Android Manifest and following these steps:
- Add the following two permissions:
<uses-permission android:name="android.permission.CAMERA" /><uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- Now, open activity_main.xml and replace the existing TextView with the following views:
<TextureView android:id="@+id/textureView" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toTopOf="@+id/button" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" /><android.support.v7.widget.AppCompatButton android ...