I was my assignment code on different emulator devices and I noticed that if I change emulator devices, the data I added to my Room db no longer exist. If I go back to the original emulator I used to insert the data, the data appears. How do I make the data be available using on multiple emulator devices.
One problem could be that one of the devices is not API 26+.
Another problem could be that the App is not running in which case if you try to swap you you get No Debuggable process detected e.g.:
If both are running are you swapping to the other? e.g.
And then when swapped :-
(note the different created_at values between the first screen shot on the API 28 device and the last screen shot on the API 29 device)
Related
every since I updated macOS to macOS 12, I have trouble using CoreBluetooth.
In one of my apps, I will list all BLE devices using the CGCentralManager class.
This has worked for years. But now, when I start my app, the following output appears in Xcode:
[CoreBluetooth] No name or address
[CoreBluetooth] No name or address
[CoreBluetooth] No name or address
[CoreBluetooth] No name or address
[CoreBluetooth] No name or address
The macOS Console app has many messages like this (I don't know if this is related, the process is bluetoothd instead of my app):
Destroying pairing agent for session <appname>
Erasing session 0x7f795824af00 from SessionMap for "appname-2890-84"
Received 'stop scan' request from session "com.apple.bluetoothd-central-143-2" updateScanParams:YES shouldUpdateState:YES
Stopping scan as there are no remaining scan agents permitted to scan
If my app is not running, the bluetoothd process seems to be rather quiet. Once started, the bluetoothd process seems to have some kind of problem. The question is: which one?
Disabling the Sandbox did not change anything, so I don't think that it has something to do with missing permissions.
I also built a very basic example in a new app. I instantiated a new CBCentralManager and started scanning. The devices were discovered.
I my main app, no delegate function is triggered. None at all.
Did anyone encounter the same issue?
UPDATE: It appears that Apple has fixed the bug in macOS 12.3.
Original answer below applies to 12.0, 12.1 and 12.2.
It appears that Apple has updated macOS to behave more like iOS. The docs for scanForPeripheralsWithServices:options: say:
Your app can scan for Bluetooth devices in the background by specifying the bluetooth-central background mode. To do this, your app must explicitly scan for one or more services by specifying them in the serviceUUIDs parameter. The CBCentralManager scan option has no effect while scanning in the background.
Command line programs cannot ever be considered the foreground app since they are not a .app and therefore the background scanning rules apply. (This is conjecture, but I suspect that NSWorkspace.frontmostApplication might be used to determine the "foreground" application).
If background scanning is acceptable and the Bluetooth devices in use include a service UUID in the advertising data, then a list of service UUIDs can be supplied to scanForPeripheralsWithServices:options:.
If not, then you have to create a signed .app to use foreground scanning.
Some additional details and an ugly workaround for running a command line tool without a GUI as a .app (outside of the XCode debugger) can be found at https://github.com/hbldh/bleak/issues/720. This link is Python-specific but one should be able to extrapolate it to other environments.
About every 4 second after I start the emulator device from my Android Studio project an error message is printed into the Run window. It's extremely annoying because it hijacks the focus. If I'm in the Debug window it switches to the Run window every 4 seconds because of this error no matter what I do.
This started a day ago, but I don't know what induced it. I use the same emulator devices for several months now. Maybe an upgrade of some portion of Android SDK? The external SDK Manager is not invokable any more.
The messages start to come right after I boot up this API 25 wear emulator. One workaround is to make that tab float, then it doesn't hijack my focus; I move it to my second monitor.
I also noticed I cannot connect my Android Wear app running on my physical device (I'm running physical phone with the emulated wear) with my emulator.
It is because you are connect to a network which has a auto-redirect in it or it is not encrypted(HTTP). Start by
Disconnecting yourself from the network.
Restarting Android Studio
If the problem continues try posting a more detailed description of the error
If the problem doesn't continue contact your network administrator.
Maybe this can help:
Please make sure that you are connected to internet
Explanation: At startup, the emulator reads the list of DNS servers that your system is currently using. It then stores the IP addresses of up to four servers on this list and set up aliases to them on the emulated addresses 10.0.2.3, 10.0.2.4, 10.0.2.5 and 10.0.2.6 as needed. So, it needs internet connection to deal with them.
When starting the emulator at the command line, you can also use the -dns-server option to manually specify the addresses of DNS servers to use, where serverList is a comma-separated list of server names or IP addresses.
I acquired a batch of WT0490 wearable pdas with detachable scan head, so converted an application originally made for Windows Mobile (which has been running perfectly for several years) to run on the WT4090s. The devices use these versions:
Windows CE 5.0
EMDK 2.6
ASP.net CF 2.0
Since rollout I've seen some very frustrating behaviour, which seems to start happening after the devices have been operating a few days. Users are reporting the following error:
Unexpected error in application
SCAN_Enable
There doesnt seem to be any noticeable pattern, several devices will be working perfectly for a few days then suddenly this error will show. THen a few days and a few reboots later they work again.
All devices were taken right back to stock settings then our cabs deployed to them. All identical models. We've tried altering memory allocation, swapping scanner headers etc but there is no pattern.
The error seems to occur on load of the first form after login, the login screen displays a list of users in a dropdown with a password box so that part of the app works ok, it seems to be when the scanner is initialised that this failure happens.
I had 40 devices, now 30+ have gone down with this same issue so my gut is telling me its a software issue but as yet ive not been able to find out why.
We've tried warm boots, cold boots, complete reprovisionings as well. We have a couple of dev units that don't show the problem although they are not in regular use so maybe we just haven't seen the problem 'yet'.
I hope someone out there has had this issue and knows how to fix it.
Thanks in advance.
WT4090 was built by Motorola Solution enterprise business, now part of Zebra Technologies. The WT4090 is currently in EOS (End Of Sales) but is still supported by Zebra if you've a maintenance contract.
You can check if you've the latest OS version and fixes installed on the device looking on Zebra Technologies support website.
For question on how to develop for Zebra Technologies devices you can take a look at Launchpad, Zebra's developer community website.
It's Worth noting that these devices have detachable barcode scanners - so if the scanner is not correctly attached, you get a SCAN_Enable error.
If you don't release the scanner, you can also see this error as a previous form could have the scanner blocked.
You may also find you have the ScanWedge app running - this will also block the scanner so you cannot get it enabled. The EMDK needs exclusive access to the scanner to enable it.
I'm using the Bluetooth Low Energy (BLE) API introduced by Microsoft with Windows 8, the BluetoothGATTxxx functions.
My code is working fine on Windows 8.1, but I have observed a difference in the behavior of BluetoothGATTSetDescriptorValue between 8.1 and Windows 10.
The scenario is the following:
Pair the device with the Windows interface.
Find it and enable data notifications with a call to BluetoothGATTSetDescriptorValue to set the field 'IsSubscribeToNotification' of ClientCharacteristicConfiguration to true.
Register a callback to receive the new values (I tried to register the callback first, didn't work well).
The callback gets called every time new data is sent from the device.
All is good. Now, if I turn the device off and on, then repeat steps 2 to 4 it will work fine on Windows 8.1, but not on Windows 10:
BluetoothGATTSetDescriptorValue returns 0x80070572 i.e.
HRESULT_FROM_WIN32(ERROR_NO_USER_SESSION_KEY).
In practice, this means the user has to remove the pairing and redo it every time the device is turned off.
The problem is made worse by the fact that the device has some power management feature and will turn off automatically if it stays idle too long. It seems I need to keep it alive if I don't want the user to delete/redo the pairing every time they want to use the device!
Is anyone else running into this issue too? I tried several searches here and on the net but with no luck. A solution would be to force a new pairing programmatically, and since there is no API for this it would be an ugly hack. I definitely don't want to take that path...
My laptop's processor doesn't support SLAT so I can't run the WP8 emulator on my laptop and use that to take screenshots.
I have a Lumia 920 and I can take screenshots with it, but only for one of the three screen sizes available on Windows Phone.
Is there any way to take screenshots for all the different screen sizes in this case?
I had the same problem. There is not a way to have your Lumia 920 render in a different resolution if that's what you're asking. This makes verifying those resolutions pretty tough. It really makes you have to trust in your layout that your application can scale correctly.
To get the screenshots, I used my Lumia 920 to take screenshots, then I used paint.net to resize the images to the correct sizes for the store requirements. It's a little misleading to the user but it's all you can do without having the devices you need to test.
Other options would be to reach out to your local Microsoft developer evangelist to see if you can get a device to test those resolutions. Then if all else fails and you're still not comfortable shipping your app without testing on those resolutions you can always find a developer friend that is willing to run your app on their emulator.
If you're using a Windows Phone 8, you can just press the Power and Start buttons simultaneously to take a screenshot.