ionic-team / ionic-team/capacitor-filesystem

[Android] build warning about deprecated APIs

Open Beginner friendly
#85 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
6
Forks
15
Avg merge
14m
Merged PRs (30d)
1

Description

## Bug Report

### Plugin(s)

@capacitor/filesystem

### Capacitor Version
```
Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 8.5.0
@capacitor/core: 8.5.0
@capacitor/android: 8.5.0
@capacitor/ios: 8.5.0

Installed Dependencies:

@capacitor/cli: 8.5.0
@capacitor/core: 8.5.0
@capacitor/android: 8.5.0
@capacitor/ios: 8.5.0

[success] iOS looking great! 👌
[success] Android looking great! 👌
```

### Platform(s)
Android

### Current Behavior

There are some build warnings:

```

[08:51:58]: ▸ > Task :capacitor-filesystem:compileReleaseKotlin
[08:51:58]: ▸ w: file:///home/runner/work/Site/Site/IsraelHiking.Web/node_modules/@capacitor/filesystem/android/src/main/kotlin/com/capacitorjs/plugins/filesystem/FilesystemPlugin.kt:335:31 'fun downloadFile(call: PluginCall): Unit' is deprecated. Use @capacitor/file-transfer plugin instead.
[08:51:58]: ▸ w: file:///home/runner/work/Site/Site/IsraelHiking.Web/node_modules/@capacitor/filesystem/android/src/main/kotlin/com/capacitorjs/plugins/filesystem/LegacyFilesystemImplementation.kt:66:29 Java type mismatch: inferred type is 'String?', but 'String' was expected.
[08:52:02]: ▸ Note: Recompile with -Xlint:unchecked for details.

```

### Expected Behavior
No build warnings

### Code Reproduction
I would assume any code that build Android with these plugins...

### Other Technical Details
Should probably be easy to solve using AI. I can open a PR if that would help move things along.

### Additional Context

Contributor guide

Open the contributing guide

Research direction

Start with android/src/main/kotlin/com/capacitorjs/plugins/filesystem/FilesystemPlugin.kt around line 335 and LegacyFilesystemImplementation.kt around line 66, then run the Android release build that produced the warnings. Check the deprecated downloadFile call and nullable String warning against the current plugin APIs. Done means the filesystem plugin builds without these warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.