Witam
Czy ktos moglby sprawdzic na swoim iphonie ponizszy kod i podeslac mi wynik z konsoli?
UIDevice *myDevice = [UIDevice currentDevice];
[myDevice setBatteryMonitoringEnabled:YES];
float batLeft = myDevice.batteryLevel;
NSLog(@"level: %d",batLeft);
Niestety ja mam ciagle -1
Bylbym wdzieczny za informacje
Sprawdzanie poziomu baterii
Started by
BartMax
, 01 Sep 2009 15:35
2 replies to this topic
#1
Posted 01 September 2009 - 15:35
#2
Posted 05 September 2009 - 16:16
Sat Sep 5 17:14:09 unknown test[745] : Battery level: -1610612736
Cokolwiek to oznacza
#3
Posted 27 September 2009 - 01:00
UIDevice *device = [UIDevice currentDevice];
device.batteryMonitoringEnabled = YES;
int level=(int)(device.batteryLevel * 100);
NSLog(@"level: %d",level);
Teraz jest zakres od 1-100 i dziala jak powinno
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users