<fragment android:name="blog.creativetech.arfaces.arface.AugmentedFaceFragment"
android:id="@+id/face_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="top" />
Use AugmentedFaceFragment
in your main_activity
layout
Implement interface in MainActivity
class MainActivity : AppCompatActivity(), AugmentedFaceListener {
override fun onFaceAdded(face: AugmentedFaceNode) {}
override fun onFaceUpdate(face: AugmentedFaceNode) {}
}
Check out the codelab -> https://arcore.how/posts/arcore-try-on-makeup/lab/#0