fluttercommunity / fluttercommunity/flutter_downloader
Downloading not Starting on OPPO with android 11
- Dominant language
- Kotlin
- Stars
- 940
- Forks
- 561
- Avg merge
- 1h 18m
- Merged PRs (30d)
- 1
Description
I've been debugging it for a day but the issue persists, when I start downloading it prints "set process for client: com.example.igb" and nothing happens.
I've tested it on several Android 11 phones such as One Plus and it worked fine, but on Oppo, it didn't.
My AndroidManifest.xml:
My code:
@override
void initState() {
super.initState();
FeedbackController feedbackController =
Provider.of(context, listen: false);
IsolateNameServer.registerPortWithName(
port.sendPort, "downloader_send_port");
port.listen((dynamic data) {
printError("here");
String id = data[0];
DownloadTaskStatus status = DownloadTaskStatus.values[data[1]];
double progress = data[2] / 100;
printWarning(
"Received download update - id: $id, status: $status, progress: $progress%");
feedbackController.updateStatus(id, status, progress);
setState(() {});
});
FlutterDownloader.registerCallback(downloadCallback);
}
@override
void dispose() {
IsolateNameServer.removePortNameMapping("downloader_send_port");
super.dispose();
}
@pragma('vm:entry-point')
static void downloadCallback(String id, int status, int progress) {
// printWarning("Download callback - progress: $progress");
IsolateNameServer.lookupPortByName('downloader_send_port')
?.send([id, status, progress]);
}
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the download on an OPPO device running Android 11 and inspect the AndroidManifest.xml configuration alongside the initState and downloadCallback code. Compare logs and task status updates with a working Android 11 device; done means the download starts and callback progress reaches the Flutter app.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, dart
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100