Closed bradleyuk closed 7 years ago
Looks like I need to set batteryMonitoringEnabled
property to YES
to be able to read battery status.
Simple solution is:
-(double) batteryLevel
{
UIDevice *myDevice = [UIDevice currentDevice];
[myDevice setBatteryMonitoringEnabled:YES];
double batteryLeft = (float)[myDevice batteryLevel] * 100;
return batteryLeft;
}
I will try to include in the next release.
I did like it in my branch. Work fine but mistake near +/- 5-10%
Hi, used the latest Traccar-iOS codes but still getting the "zero battery". Any further ideas in fixing this? thanks.
It means that your device doesn't provide this information.
Sorry for my ignorance, but how do I make the iPhone/iPad provide such battery information. I've seen it sending a battery percentage before. Thanks!
The issue should be fixed now. We need to wait a bit till Apple approves the new version.
Hi
Not sure if this a defect or future proofed but the latest iOS client always seems to send batt=0 at the end of the query string.
Is this a placeholder for when battery level is supported or is this a defect?
Also quick question - if i increase the interval will it save battery? or is the GPS always on (and therefore draining) and just transmits at the interval provided?
Thanks
And great app btw!