Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(android) Connectivity reporting none on resume#9915

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

jcassidyav
Copy link
Contributor

PR Checklist

What is the current behavior?

On some android phones, (Google Pixel 5 & Galaxy s20+ running android 12) the final state reported when subscribing toConnectivity.startMonitoring would report incorrectly report no connectivity.

This happened when the app was in the foreground, and the phone was locked and then unlocked ( i.e. hit power button)
This was because the call to the methods on ConnectivityManager.getActiveNetwork returned null, the documentation seems to suggest that calling any of the syncronus methods on ConnectivityManager is not advised during these callbacks.
https://developer.android.com/reference/android/net/ConnectivityManager.NetworkCallback

What is the new behavior?

The new behaviour is to rely on the network capabilities passed to the callback to determine the status, or to report no connectivity when lost is triggered.

Fixes/Implements/Closes #[Issue Number].

@cla-botcla-botbot added the cla: yes labelMay 19, 2022
onCapabilitiesChanged(network: android.net.Network, networkCapabilities: android.net.NetworkCapabilities) {
console.log('NetworkCallbackImpl.onCapabilitiesChanged');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

could you remove the console.log ?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Don't know how I missed that, gone now.

@NathanWalkerNathanWalker changed the base branch frommaster toalphaMay 19, 2022 22:12
@NathanWalkerNathanWalker merged commit8dad6ed intoNativeScript:alphaMay 19, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@farfromrefugfarfromrefugfarfromrefug left review comments

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@jcassidyav@farfromrefug@NathanWalker

[8]ページ先頭

©2009-2025 Movatter.jp