Skip to content

Broadcastreciever on intent Wifi_State_Changed doesn't receive "Enabling" state change #1349

@MBuenter

Description

@MBuenter

Steps to Reproduce

  1. Register broadcast receiver on intent WifiManager.WifiStateChangedAction
  2. In the OnReceive handler of the broadcast receiver check additonally the lookup key ExtraWifiState:
    intent.GetIntExtra(WifiManager.ExtraWifiState, (int)WifiState.Unknown);
  3. Start the app on device. Enable respectively disable the Wifi manually on device. Check the OnReceive handler respectively the lookup key.

Expected Behavior

Enabling Wifi (if previously disabled): The wifi state changes to enabling then to enabled, so the OnReceive handler gets called two times.
Disabling Wifi (if previously enabled): The wifi state changes to disabling then to disabled, so the OnReceive handler gets called two times.

Actual Behavior

Enabling Wifi (if previously disabled): The wifi state changes to enabled, the OnReceive handler gets called one time and the Wifi is not yet enabled. The state changes immediately from disabled to enabled.
Disabling Wifi (if previously enabled): The wifi state changes to disabling then to disabled, the OnReceive handler gets called two times.

Version Information

Microsoft Visual Studio Professional 2017
Version 15.5.3
VisualStudio.15.Release/15.5.3+27130.2020
Microsoft .NET Framework
Version 4.7.02556

Installed Version: Professional

Visual Basic 2017 00370-20003-88521-AA935
Microsoft Visual Basic 2017

Visual C# 2017 00370-20003-88521-AA935
Microsoft Visual C# 2017

Visual F# 4.1 00370-20003-88521-AA935
Microsoft Visual F# 4.1

ASP.NET and Web Tools 2017 15.0.31127.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services 1.0
Provides languages services for ASP.NET Core Razor.

ASP.NET Web Frameworks and Tools 2017 5.2.51007.0
For additional information, visit https://www.asp.net/

AssetsToolWindow Extension 1.0
AssetsToolWindow Visual Studio Extension Detailed Info

Azure App Service Tools v3.0.0 15.0.31106.0
Azure App Service Tools v3.0.0

Azure Data Lake Node 1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio 2.2.9000.1
Microsoft Azure Data Lake Tools for Visual Studio

Azure Data Lake Tools for Visual Studio 2.2.9000.1
Microsoft Azure Data Lake Tools for Visual Studio

Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Fabric.DiagnosticEvents 1.0
Fabric Diagnostic Events

GitFlow.VS.Extension 1.0
Visual Studio extension that integrates GitFlow

GitHub.VisualStudio 2.2.0.10
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service 2.0
JavaScript Language Service

JavaScript Project System 2.0
JavaScript Project System

JavaScript UWP Project System 2.0
JavaScript UWP Project System

Merq 1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Azure HDInsight Azure Node 2.2.9000.1
HDInsight Node under Azure Node

Microsoft Azure Hive Query Language Service 2.2.9000.1
Language service for Hive query

Microsoft Azure Service Fabric Tools for Visual Studio 1.8
Microsoft Azure Service Fabric Tools for Visual Studio

Microsoft Azure Stream Analytics Language Service 2.2.9000.1
Language service for Azure Stream Analytics

Microsoft Azure Stream Analytics Node 1.0
Azure Stream Analytics Node under Azure Node

Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.51120.3

Microsoft Continuous Delivery Tools for Visual Studio 0.3
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio Tools for Containers 1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio 4.8.4-pre (3fe64e3)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager 4.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

ResXManager 1.11.893.0
Manage localization of all ResX-Based resources in one place. Shows all resources of a solution and let's you edit the strings and their localizations in a well-arranged data grid.

SQL Server Data Tools 15.1.61710.120
Microsoft SQL Server Data Tools

SvgConverterToolWindow Extension 1.0
SvgConverterToolWindow Visual Studio Extension Detailed Info

ToolWindowHostedEditor 1.0
Hosting json editor into a tool window

TypeScript Tools 15.5.11025.1
TypeScript Tools for Microsoft Visual Studio

Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for Universal Windows Apps 15.0.27130.2020
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

VisualStudio.Mac 1.0
Mac Extension for Visual Studio

Web Extension Pack 2017 15.0.4
The easiest way to set up Visual Studio for the ultimate web development experience.

WebJobs Tools v1.0.0 15.0.31106.0
WebJobs Tools v1.0.0

Xamarin 4.8.0.757 (7f9ec2a)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 4.8.188 (c5813fa34)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin.Android SDK 8.1.3.0 (HEAD/ef47226b7)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK 11.6.1.2 (6857dfc)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    need-infoIssues that need more information from the author.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions