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.
<!-- declare customized Initializer -->
<provider
android:name="vn.hunghd.flutterdownloader.FlutterDownloaderInitializer"
android:authorities="${applicationId}.flutter-downloader-init"
android:exported="false">
<!-- changes this number to configure the maximum number of concurrent tasks -->
<meta-data
android:name="vn.hunghd.flutterdownloader.MAX_CONCURRENT_TASKS"
android:value="3" />
</provider>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
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: <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.example.igb"
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];
}
@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]); }