You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently testing the abilities with the example app and I'm noticing something strange with the NetworkTypes.
When I set NetworkType.notRequired , the task is not executing until I enable the WiFi and connect to the router, like is set NetworkType.unmetered.
If I set NetworkType.unmetered , the task is executing even if the WiFi is off and I'm connected on the mobile network only, like should be for NetworkType.connected.
If I set NetworkType.connected, the task is executing even if the WiFi and Mobile data are off, like should be for NetworkType.notRequired.
I'm testing with the example app on Pixel XL 3a - Android 11
/// Enqueues a work request to update the counter.
void _increaseCounter(int counter) {
enqueueWorkIntent(WorkIntent(
identifier: kTagCounterWork,
constraints: WorkConstraints(networkType: NetworkType.connected),
input: <String, dynamic>{
'counter': counter,
},
isProcessingTask: true,
));
}
[√] Flutter (Channel dev, 1.26.0-1.0.pre, on Microsoft Windows [Version 10.0.19041.985], locale bg-BG)
• Flutter version 1.26.0-1.0.pre at C:\code\soft\flutter_sdk\flutter
• Framework revision 63062a6443 (5 months ago), 2020-12-13 23:19:13 +0800
• Engine revision 4797b06652
• Dart version 2.12.0 (build 2.12.0-141.0.dev)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:/Users/x/AppData/Local/Android/Sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = C:/Users/x/AppData/Local/Android/Sdk
• Java binary at: C:\code\soft\android-studio-ide-4.1.3\android-studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
The order is different btw Dart and Java enums and currently the order position is sent
Here is the Dart enum
enum NetworkType {
/// Any working network connection is required for this work.
connected,
/// A metered network connection is required for this work.
metered,
/// A network is not required for this work.
notRequired,
/// A non-roaming network connection is required for this work.
notRoaming,
/// An unmetered network connection is required for this work.
unmetered,
}
Hi, thanks for this great plugin!
I'm currently testing the abilities with the example app and I'm noticing something strange with the NetworkTypes.
When I set NetworkType.notRequired , the task is not executing until I enable the WiFi and connect to the router, like is set NetworkType.unmetered.
If I set NetworkType.unmetered , the task is executing even if the WiFi is off and I'm connected on the mobile network only, like should be for NetworkType.connected.
If I set NetworkType.connected, the task is executing even if the WiFi and Mobile data are off, like should be for NetworkType.notRequired.
I'm testing with the example app on Pixel XL 3a - Android 11
/// Enqueues a work request to update the counter.
void _increaseCounter(int counter) {
enqueueWorkIntent(WorkIntent(
identifier: kTagCounterWork,
constraints: WorkConstraints(networkType: NetworkType.connected),
input: <String, dynamic>{
'counter': counter,
},
isProcessingTask: true,
));
}
[√] Flutter (Channel dev, 1.26.0-1.0.pre, on Microsoft Windows [Version 10.0.19041.985], locale bg-BG)
• Flutter version 1.26.0-1.0.pre at C:\code\soft\flutter_sdk\flutter
• Framework revision 63062a6443 (5 months ago), 2020-12-13 23:19:13 +0800
• Engine revision 4797b06652
• Dart version 2.12.0 (build 2.12.0-141.0.dev)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:/Users/x/AppData/Local/Android/Sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = C:/Users/x/AppData/Local/Android/Sdk
• Java binary at: C:\code\soft\android-studio-ide-4.1.3\android-studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 4.1.0)
• Android Studio at C:\code\soft\android-studio-ide-4.1.3\android-studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] Connected device (3 available)
• Pixel 3a XL (mobile) • 94DAX0DRW1 • android-arm64 • Android 11 (API 30)
• Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.212
• Edge (web) • edge • web-javascript • Microsoft Edge 90.0.818.62
• No issues found!
The text was updated successfully, but these errors were encountered: