Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Can you explain your use case?
jb...@google.com <jb...@google.com> #3
I am using Safe Args from Navigation and also using SavedStateHandle to pass in arguments from the args bundle to my ViewModel. This gives me access to them through the constructor. Unfortunately I then have to use string keys to get values out of the SavedStateHandle instead of using the generated SafeArgs.
Description
When using the ActivityResultAPIs with fragment, the latest possible time that
registerForActivityResult()
should be called is inonCreate()
. Any calls made toregisterForActivityResult()
made afteronCreate()
will be ignored.Instead of ignoring these calls and allowing developers to assume that their callback is registered, we should throw an exception notifying that they are attempting to register too late.