In kotlin, in .kt file make changes:
edit_text.filters = edit_text.filters + InputFilter.AllCaps()
Use synthetic property for direct access of widget with id. And in XML, for your edit text add a couple of more flag as:
<EditText
android:id="@+id/edit_text_qr_code"
android:layout_width="match_parent"
android:layout_height="wrap_content"
...other attributes...
android:textAllCaps="true"
android:inputType="textCapCharacters"
/>
This will update the keyboard as upper case enabled.