在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
procedure TDeviceInfoForm.btnGetDeviceInfoClick(Sender: TObject); var Device : UIDevice; begin Device := TUIDevice.Wrap(TUIDevice.OCClass.currentDevice); lbOSName.Text := Format('OS Name: %s', [NSStrToStr(Device.systemName)]); lbOSVersion.Text := Format('OS Version: %s', [NSStrToStr(Device.systemVersion)]); lbDeviceType.Text := Format('Device Type: %s', [NSStrToStr(Device.model)]); //code added for detecting battery level Device.setBatteryMonitoringEnabled(True); lblBatteryLevel.Text := Format ('Battery Level: %d', [Round(Device.batteryLevel*100)]); end; https://community.embarcadero.com/blogs?view=entry&id=9356 |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论