Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CB-8929 Use PowerManager to get battery state on Win 10 #42

Closed
wants to merge 2 commits into from

Conversation

vladimir-kotikov
Copy link
Member

Platforms affected

Windows (specifically Windows 10)

What does this PR do?

Adds support for Windows 10

What testing has been done on this change?

Manual testing

Checklist

  • Reported an issue in the JIRA database
  • Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
  • Added automated test coverage as appropriate for this change.

@vladimir-kotikov
Copy link
Member Author

This PR is an alternative to #41, made using feature detection and new PowerManager API available in Windows 10

@daserge. please take a look when you have a chance

@cordova-qa
Copy link

Cordova CI Build has completed successfully.

Commit - Link
Dashboard - Link

Builder Name Console Output Test Report Device Logs
Windows 8.1 Store Link Link Link
Windows 10 Store Link Link Link
Windows 8.1 Phone Link Link Link
iOS Link Link Link
Android Link Link Link

}, { keepCallback: true });
}

PowerManager.onremainingchargepercentchanged = reportStatus;
Copy link
Contributor

Choose a reason for hiding this comment

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

Would not it be better to use add/remove event listener here instead to avoid overriding a listener which might be set in an app code?

Copy link
Contributor

@daserge daserge left a comment

Choose a reason for hiding this comment

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

Should we also enable the tests for Windows 10?

@daserge
Copy link
Contributor

daserge commented Nov 8, 2016

Tested and it works good on all targets (Win 10 desktop, Win 10 Mobile, Windows Phone 8.1).
LGTM apart the comments.

@vladimir-kotikov
Copy link
Member Author

@daserge, addressed your notes

@daserge
Copy link
Contributor

daserge commented Nov 8, 2016

@vladimir-kotikov LGTM, thanks!

@asfgit asfgit closed this in 85c6f50 Nov 8, 2016
@vladimir-kotikov vladimir-kotikov deleted the CB-8929 branch November 8, 2016 14:10
@cordova-qa
Copy link

Cordova CI Build has one or more failures.

Commit - Link
Dashboard - Link

Builder Name Console Output Test Report Device Logs
Windows 8.1 Store Link Link Link
Windows 10 Store Link Link Link
Windows 8.1 Phone Link Link Link
iOS Link Link Link
Android Link Link Link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants