Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Yu-Core committed Sep 11, 2024
1 parent 9ceaebb commit 6ad28bc
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,35 @@ The appId is the package name of the app in Android
```csharp
AppStoreLauncher.TryOpenAsync(appId);
```

## MediaFilePicker(Media file picker)
`MediaFilePicker` Allow you to select one or multiple media files
Note that it can only be used on Android and iOS.

#### Using

```csharp
using MauiBlazorToolkit.Essentials

#if Android || iOS
FileResult? photoFileResult = await MediaFilePicker.Default.PickPhotoAsync();
FileResult? videoFileResult = await MediaFilePicker.Default.PickVideoAsync();
IEnumerable<FileResult>? photoFileResults = await MediaFilePicker.Default.PickMultiplePhotoAsync();
IEnumerable<FileResult>? videoFileResults = await MediaFilePicker.Default.PickMultipleVideoAsync();
#endif
```

## AndroidFilePicker(Android file picker)
`AndroidFilePicker` Improvement of FilePicker in MAUI Essentials with more options for selection
Note that it can only be used in Android and may be deleted in the future

#### Using

```csharp
using MauiBlazorToolkit.Essentials

#if Android
FileResult? fileResult = await AndroidFilePicker.Default.PickAsync();
IEnumerable<FileResult>? fileResults = await AndroidFilePicker.Default.PickMultipleAsync();
#endif
```
32 changes: 32 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,35 @@ appId
```csharp
AppStoreLauncher.TryOpenAsync(appId);
```

## MediaFilePicker(媒体文件选择器)
`MediaFilePicker` 允许你单选或多选媒体文件
注意,只能在Android和iOS中使用。

#### 使用

```csharp
using MauiBlazorToolkit.Essentials

#if Android || iOS
FileResult? photoFileResult = await MediaFilePicker.Default.PickPhotoAsync();
FileResult? videoFileResult = await MediaFilePicker.Default.PickVideoAsync();
IEnumerable<FileResult>? photoFileResults = await MediaFilePicker.Default.PickMultiplePhotoAsync();
IEnumerable<FileResult>? videoFileResults = await MediaFilePicker.Default.PickMultipleVideoAsync();
#endif
```

## AndroidFilePicker(安卓文件选择器)
`AndroidFilePicker` MAUI Essentials中的FilePicker的改进,选择时有更多的选项
注意,只能在Android中使用,并且未来可能删除

#### 使用

```csharp
using MauiBlazorToolkit.Essentials

#if Android
FileResult? fileResult = await AndroidFilePicker.Default.PickAsync();
IEnumerable<FileResult>? fileResults = await AndroidFilePicker.Default.PickMultipleAsync();
#endif
```

0 comments on commit 6ad28bc

Please sign in to comment.