Package 

Class ActivityResultKtxKt

    • Method Summary

      Modifier and Type Method Description
      final static ActivityResultLauncher<Intent> registerForActivityResult(ComponentActivity $self, ActivityResultCallback<ActivityResult> callback) 打开activity
      final static ActivityResultLauncher<Intent> registerForActivityResult(Fragment $self, ActivityResultCallback<ActivityResult> callback) 打开activity
      final static ActivityResultLauncher<String> registerForPermissionsResult(ComponentActivity $self, ActivityResultCallback<Boolean> callback) 申请单个权限
      final static ActivityResultLauncher<String> registerForPermissionsResult(Fragment $self, ActivityResultCallback<Boolean> callback) 申请单个权限
      final static ActivityResultLauncher<Array<String>> registerForMultiplePermissionsResult(ComponentActivity $self, ActivityResultCallback<Map<String, Boolean>> callback) 申请多个权限
      final static ActivityResultLauncher<Array<String>> registerForMultiplePermissionsResult(Fragment $self, ActivityResultCallback<Map<String, Boolean>> callback) 申请多个权限
      final static ActivityResultLauncher<Uri> registerForTakePictureResult(ComponentActivity $self, ActivityResultCallback<Boolean> callback) 调用系统相机拍照
      final static ActivityResultLauncher<Uri> registerForTakePictureResult(Fragment $self, ActivityResultCallback<Boolean> callback) 调用系统相机拍照
      final static ActivityResultLauncher<Uri> registerForTakeVideoResult(ComponentActivity $self, ActivityResultCallback<Boolean> callback) 调用系统相机录像
      final static ActivityResultLauncher<Uri> registerForTakeVideoResult(Fragment $self, ActivityResultCallback<Boolean> callback) 调用系统相机录像
      final static ActivityResultLauncher<String> registerForGetContentResult(ComponentActivity $self, ActivityResultCallback<Uri> callback) 选择一条内容 图片:launcher.launch("image/\*") 视频:launcher.launch("video/\*") 音频:launcher.
      final static ActivityResultLauncher<String> registerForGetContentResult(Fragment $self, ActivityResultCallback<Uri> callback) 选择一条内容 图片:launcher.launch("image/\*") 视频:launcher.launch("video/\*") 音频:launcher.
      final static ActivityResultLauncher<Void> registerForPickContactResult(ComponentActivity $self, ActivityResultCallback<Uri> callback) 从通讯录获取联系人
      final static ActivityResultLauncher<Void> registerForPickContactResult(Fragment $self, ActivityResultCallback<Uri> callback) 从通讯录获取联系人
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • registerForActivityResult

         final static ActivityResultLauncher<Intent> registerForActivityResult(ComponentActivity $self, ActivityResultCallback<ActivityResult> callback)

        打开activity

      • registerForActivityResult

         final static ActivityResultLauncher<Intent> registerForActivityResult(Fragment $self, ActivityResultCallback<ActivityResult> callback)

        打开activity

      • registerForTakePictureResult

         final static ActivityResultLauncher<Uri> registerForTakePictureResult(ComponentActivity $self, ActivityResultCallback<Boolean> callback)

        调用系统相机拍照

      • registerForTakePictureResult

         final static ActivityResultLauncher<Uri> registerForTakePictureResult(Fragment $self, ActivityResultCallback<Boolean> callback)

        调用系统相机拍照

      • registerForTakeVideoResult

         final static ActivityResultLauncher<Uri> registerForTakeVideoResult(ComponentActivity $self, ActivityResultCallback<Boolean> callback)

        调用系统相机录像

      • registerForTakeVideoResult

         final static ActivityResultLauncher<Uri> registerForTakeVideoResult(Fragment $self, ActivityResultCallback<Boolean> callback)

        调用系统相机录像

      • registerForGetContentResult

         final static ActivityResultLauncher<String> registerForGetContentResult(ComponentActivity $self, ActivityResultCallback<Uri> callback)

        选择一条内容 图片:launcher.launch("image/\*") 视频:launcher.launch("video/\*") 音频:launcher.launch("audio/\*")

      • registerForGetContentResult

         final static ActivityResultLauncher<String> registerForGetContentResult(Fragment $self, ActivityResultCallback<Uri> callback)

        选择一条内容 图片:launcher.launch("image/\*") 视频:launcher.launch("video/\*") 音频:launcher.launch("audio/\*")

      • registerForPickContactResult

         final static ActivityResultLauncher<Void> registerForPickContactResult(ComponentActivity $self, ActivityResultCallback<Uri> callback)

        从通讯录获取联系人

      • registerForPickContactResult

         final static ActivityResultLauncher<Void> registerForPickContactResult(Fragment $self, ActivityResultCallback<Uri> callback)

        从通讯录获取联系人