marcglasberg / async_redux

Flutter Package: A Redux version tailored for Flutter, which is easy to learn, to use, to test, and has no boilerplate. Allows for both sync and async reducers.
Other
226 stars 40 forks source link

CheckInternet/AbortWhenNoInternet does not abort with only bluetooth connection #156

Open kuhnroyal opened 1 month ago

kuhnroyal commented 1 month ago

The mixins only check for ConnectivityResult.none. If the result list for example contains only ConnectivityResult.bluetooth then there is effectively no internet available.

Does it make sense to invert the check and verify if the result contains one of wifi, mobile, vpn, ethernet? Not sure about other.

marcglasberg commented 1 month ago

Can internet be provided by Bluetooth?

marcglasberg commented 1 month ago

Bluetooth technology itself does not provide Internet access. Bluetooth is primarily designed for connecting devices over short distances, typically up to about 10 meters (30 feet), to allow them to communicate or exchange data. Common uses include connecting peripherals like keyboards, mice, headphones, and speakers to computers or smartphones.

However, you can use Bluetooth to share an Internet connection between devices in a process called tethering. For instance, if your smartphone has an active Internet connection, you can enable Bluetooth tethering to share that connection with another device, like a laptop or tablet. Here’s how it typically works:

  1. Enable Internet Connection: The primary device (like a smartphone) must have a cellular data connection or another form of Internet access.
  2. Enable Bluetooth on Both Devices: Turn on Bluetooth on both the device with the Internet connection and the device you want to connect to the Internet.
  3. Pair the Devices: Follow the instructions on each device to pair them via Bluetooth.
  4. Enable Tethering: On the device with the Internet connection, go to the Bluetooth settings and enable the option for Internet sharing or tethering.

While Bluetooth can be used in this way, it is not the most efficient method for sharing Internet access compared to options like Wi-Fi tethering, which is faster and supports connections from greater distances and multiple devices simultaneously. Bluetooth tethering is generally slower and might be suitable for basic browsing when no other options are available.

kuhnroyal commented 1 month ago

I don't think internet over bluetooth should be a use-case that needs to be considered here.

marcglasberg commented 1 month ago

Why? If someone is using internet over bluetooth then the app doesn't work because it will keep saying there is no internet. Anyway, I think I will make it configurable, and leave this decision to each developer.

kuhnroyal commented 1 month ago

Configurable would be best!