I want to sync the universal clock with the device clock in Flutter. For the universal time, I am calling public API with some latency. I want to remove that latency so that I know what is the time of device at given universal time instance.
Is Android a real time OS?
No, Android is not a Real Time Operating System. An OS should be time deterministic and there by being predictable to become RTOS.
Related
I am working with ibeacon. I created an application for tracking devices. But I am facing a problem with the application. The app works well in the terminated state for iPhone SE whereas it is not working (in the locked state) for iPhone 7+.In the unlocked state it is working for 7+ also but still it is very slow compared to iPhone SE. Is there any specific reason for this problem. If it can be solved, what could be the possible solution to this problem.
I am really helpless and clueless about this issue.Please do help me and assist me with your knowledge Sir. Thank you in advance.
When an iOS app is in the background, it relies on two different mechanisms to detect beacons:
Hardware filters. These are byte patterns stored on the Bluetooth chip that alert the OS when a BLE advertising packet is received that matches your beacon region. This mechanism is very fast and delivers results within a second, but it is a limited resource. Once all slots are full, it will no longer work. There is no documentation about the number of slots available on each iPhone model, but experiments suggest the number is ~30.
Software scans. A full BLE scan is performed to find all beacons even if they are not stored in a hardware filter. In the foreground with ranging active, software scans are constant. In the background they are periodic to save battery, so detections based on software scans are much slower. The rate is undocumented, but experiments suggest software scans are performed every ~10 minutes in the background in the typical phone state. An additiona softwarel scan is also performed when the screen is unlocked.
The problem description is consistent with hardware filters (1) not working on the iPhone 7+. This may not be a problem with the phone model, it could be a problem with the specific device, or more likely the software state on the phone. A typical cause is the installation of multiple beacon apps that use up all the slots. Each beacon app can register up to 20 beacon regions for monitoring, so just two apps could use up all the slots!. The first apps to run and register slots may hold them forever.
A few troubleshooting tips:
Uninstall any other apps you think may. be detecting beacons, then re-install yours.
Restart your device.
If the above does not help, you may have a hardware problem with your device. Try another iPhone 7+ to see if you can reproduce.
I have experience programming in OS X but have never programmed in iOS. I want to create a special iOS apps for my special needs to prevent my kid from spending too much times in my IPhone/IPad. It's a simple app which allows the user to set the time and once the time elapses, the device can be either turned off or its screen will be locked.
May I know whether this is possible and what are the APIs involved? I just need a very brief idea for me to kick start.
Thanks in advance.
Your requirement is really special.
Unfortunately there is no way to lock your iOS device or automatically shut down it, unless you jailbreak the phone.
I would set the device to Kiosk Mode (Guided Access) or Single App Mode (Using Mobile Device Management). This will prevent your kid from exiting the app.
You could then program your app to stop responding after the elapsed time. It can't shut down the device, but should lock the screen after x minutes of inactivity (configured in the settings).
I have an iBeacon device I'm working on and am wondering how often iOS monitors/checks/scans for iBeacons when asked to do so via a CoreLocation app? I'm wondering so I know how long to broadcast for my iBeacon is designed to not always be on.
I'm surprised I haven't been able to find this on the web (and of course Apple won't tell us)
Edit: I mean when the app itself is not running because the phone has been restart or the app is shut down.
There is no Apple documentation for this, but the following is what I have learned from lots of testing on iOS 7 and iOS 8 devices:
If the app gets one of the limited (30) bluetooth hardware detection slots, the Bluetooth chip will always be scanning for the beacon pattern. In theory one packet could trigger the detection, but in practice you may need several seconds of transmission to guarantee detection.
If the app does not get a hardware acceleration slot, the OS will perform a full scan every 15 minutes.
If you want to target phones that have hardware detection slots, the beacon could transmit for 5 seconds at any time appropriate for the use case. If you want to target apps without hardware acceleration slots, the beacon must transmit for 15 minutes to guarantee detection.
I am writing a Core Bluetooth App for IOS. It is connecting to a TI device With custom firmware. The firmware developer developed it to publish data 12 times a second. I am using the Notify Property to get the data, but it seems that we are grabbing the data 30 times per second. This is causing extra power consumption, and for specific reasons, I can't pull at my own rate I need to pull at the rate of the device is publishing.
The firmware developer created a Windows Application that doesn't have this problem without having a hard coded Read Rate. So it is On me to find the issue.
Does anyone have any recommendations?
For what you are describing, on your system the Swift side is just receiving notifications, so there is no control over the rate that your device is using to update that specific characteristic.
But, some devices may have a command on their own high level protocol to set the advertising interval. That's completely up to the manufacturer. If you think that the system is advertising at a different rate with that Windows app that you have mentioned, I would suggest to take a look to see if there is any initialization code that the app may be doing when it starts (thus setting the rate). But for that you will need the Windows app's source code, or at least the manufacturer's documentation about your device's protocol (if any).
Also, are you really sure that the updating rate when the device is connected to the Windows app is really lower than the one you are experimenting when connected your iOS app? How are you measuring that?
We are trying to build a mobile automated testing lab that has 20 or 30 devices and want to capture the utilizations on each device during testing. I'm looking to start with iOS devices. The type of data in Xcode Debug Instruments would be ideal. However, I need to be able to capture and export this data automatically for many devices.
I'm thinking the best way to get that data from so many iOS devices would be to build an app. The app would capture the iOS device's CPU, memory, and battery life, disk usage and running processes (basically, the same statistics as are generated in the Debug Instruments in Xcode), and then send the data to a database.
What frameworks or tools would be helpful for this?
It sounds like you might be best off using a solution such as New Relic's mobile monitoring system. They allow you to monitor performance across devices, memory usage and time profiling and HTTP requests remotely just by dropping their SDK into your apps.