This repository has been archived by the owner on May 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 505
Fixes #512 - Implement the new ConnectivityManager.NetworkCallback for N+ #1568
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mattleibow
approved these changes
Dec 3, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice
@@ -11,22 +11,46 @@ namespace Xamarin.Essentials | |||
public partial class Connectivity | |||
{ | |||
static ConnectivityBroadcastReceiver conectivityReceiver; | |||
static Intent connectivityIntent = new Intent(Platform.EssentialsConnectivityChanged); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this safe to reuse? I think it is mostly immutable, but any other info on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmmmm we could probably create a new Intent each time....?
jamesmontemagno
added
awaiting-review
This PR needs to have a set of eyes on it
ready-to-merge
Review completed, Ready for API review and merge
labels
Apr 13, 2021
jamesmontemagno
added a commit
to jamesmontemagno/maui
that referenced
this pull request
Oct 7, 2021
Redth
pushed a commit
to dotnet/maui
that referenced
this pull request
Oct 14, 2021
jfversluis
approved these changes
Jan 18, 2022
1 task
1 task
1 task
maxkatz6
pushed a commit
to AvaloniaUI/Avalonia.Essentials
that referenced
this pull request
May 15, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
android
This issue impacts Android
awaiting-review
This PR needs to have a set of eyes on it
ready-to-merge
Review completed, Ready for API review and merge
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
Implement the new ConnectivityManager.NetworkCallback for N+
Inspired by : https://stackoverflow.com/questions/27144026/how-can-i-receive-a-notification-when-the-device-loses-network-connectivity-in-a
Bugs Fixed
Provide links to issues here. Ensure that a GitHub issue was created for your feature or bug fix before sending PR.
API Changes
No API changes, just some core under the hood work. Tested on my Pixel 2Xl running Android 10
Behavioral Changes
Describe any non-bug related behavioral changes that may change how users app behaves when upgrading to this version of the codebase.
PR Checklist
main
at time of PR