Nikola Despotoski

google: lint

Repeatedly, I made few mistakes while using the new registerForActivityResultAPI, resulting in error:

Fatal Exception: java.lang.IllegalStateException: Fragment MyFragment{e964a6} (573498bb-7d87–4d58–9e84–59223f13f14c) id=0x7f0a00b3} is attempting to registerForActivityResult after being created. Fragments must call registerForActivityResult() before they are created (i.e. initialization, onAttach(), or onCreate()). at androidx.fragment.app.Fragment.prepareCallInternal(Fragment.java:3) …