Error receiving broadcast Intent android.intent.action.DOWNLOAD_COMPLETE
See original GitHub issueIssue Description
Hi there!
I’m using this plugin as update tool, and when I just about to finish downloading, as logs displayed at 99%, the app shutdown.
My code was almost the same as the example, but not in main.dart
, and using custom event to handle the event change.
static Future<void> tryOtaUpdate() async {
try {
if (Platform.isAndroid) {
OtaUpdate().execute(Api.latestAndroid).listen((OtaEvent event) {
Constants.eventBus.fire(new OTAEvent(event));
});
} else if (Platform.isIOS) {
OtaUpdate().execute(Api.latestIOS).listen((OtaEvent event) {
Constants.eventBus.fire(new OTAEvent(event));
});
}
} catch (e) {
print('Failed to make OTA update. Details: $e');
}
}
class OTAEvent {
OtaEvent otaEvent;
OTAEvent(OtaEvent _otaEvent) {
this.otaEvent = _otaEvent;
}
}
eventBus.on<OTAEvent>().listen((event) {
if (this.mounted) {
setState(() {
this.otaEvent = event.otaEvent;
});
print('OTA status: ${this.otaEvent.status} : ${this.otaEvent.value}');
}
});
I/flutter (27797): OTA status: OtaStatus.DOWNLOADING : 99
E/AndroidRuntime(27797): FATAL EXCEPTION: main
E/AndroidRuntime(27797): Process: cn.xxx.xxx.xxxxxxx, PID: 27797
E/AndroidRuntime(27797): java.lang.RuntimeException: Error receiving broadcast Intent { act=android.intent.action.DOWNLOAD_COMPLETE flg=0x10 pkg=cn.xxx.xxx.xxxxxxx (has extras) } in sk.fourq.otaupdate.OtaUpdatePlugin$1@50892f
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Error receiving broadcast Intent on DownloadManager ...
Error receiving broadcast Intent on DownloadManager DOWNLOAD_COMPLETE Broadcast receiver ; java:751 ; 154) at android.app.ActivityThread.main ...
Read more >Error receiving broadcast Intent act=android.intent.action ...
Here is my stack trace: java.lang.RuntimeException Error receiving broadcast Intent { act=android.intent.action.DOWNLOAD_COMPLETE flg=0x10 pkg=com.
Read more >error receiving broadcast intent
The broadcast message itself is wrapped in an Intent object whose action string identifies the event that occurred (for example android.intent.action.
Read more >java.lang.RuntimeException: Error receiving broadcast Intent ...
java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x4000010 (has extras) } in zl$a@5eda151 · Status ...
Read more >Android BroadcastReceiver Example Tutorial | DigitalOcean
Broadcast receiver is generally implemented to delegate the tasks to services depending on the type of intent data that's received. Following ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Documentation updated.
Thanks for the feedback.
@mHassan20896
Can you please provide full stack trace? Small project to reproduce the error would be also helpful.