Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Return -1 #4

Closed
Tamer-Gamal opened this issue Mar 6, 2017 · 3 comments
Closed

Return -1 #4

Tamer-Gamal opened this issue Mar 6, 2017 · 3 comments

Comments

@Tamer-Gamal
Copy link

Hi,
i'm using Xamarin to create UWP and Android App using your plugin and it's always return -1, in Emulator and local and on Raspberry Pi3

Bug

Version Number of Plugin: Version=2.1.1.0
Device Tested On: Raspberry Pi3
Simulator Tested On: Mobile Emulator 10.0.14393.0 1080p 6inch 2GB

Expected Behavior

to show 100 value

Actual Behavior

return -1

Steps to reproduce the Behavior

call from PCL

Feature Request:

is there something missing i didn't do?

@jamesmontemagno
Copy link
Owner

I have no way of testing this out , perhaps the device doesn't support it. Can you copy the code into your UWP app and test it there and see what happens?

https://github.com/jamesmontemagno/BatteryPlugin/blob/master/src/Battery.Plugin.UWP/BatteryImplementation.cs#L68-L76

a -1 means that it isn't reporting anythnig. does it have a battey?

@Tamer-Gamal
Copy link
Author

Hi, sorry for the late reply,
i tested it on the VS Emulator and Raspberry Pi3 (No Battery).
it's working in Android but not in UWP

@jamesmontemagno
Copy link
Owner

I am pretty sure it is not supported in Raspberry Pi3 which is why it is returning -1, your code needs to check for this and essentially means a batter can't be detected of some sort.

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

No branches or pull requests

2 participants