Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 715 Bytes

README.md

File metadata and controls

17 lines (11 loc) · 715 Bytes

Activity-Contract-Example

This is a sample registerForActivityResult that replaces startActivityForResult.

From androidx.fragment:fragment-ktx:1.3.0-alpha04, the following method is deprecated: androidx.fragment:fragment-ktx:1.3.0-alpha04.

  • startActivityForResult
  • onActivityResult
  • requestPermissions
  • onRequestPermissionsResult

official source

The announcement says to use registerForActivityResult of ActivityResultContract instead.

Registering a callback for an Activity Result

Then, I summarized the usage of registerForActivityResult.