Only one application can have access to the scanner at a time. One of the common reasons you will get this is if another application has the scanner and either crashed or is running in the background and did not properly release the scanner when this happened. It will hold on to the scanner and you cannot enable it in your app. Make sure also it is not because your app is not releasing the scanner when it crashes or goes to the background OR that you don't have multiple instances of your app running. Make sure you wire up to the lifecycle events for background, sleep, terminate, etc... to release the scanner. If other apps on the device did not do this, they will certainly cause problems for you.
I have seen when it gets in this state, you sometimes have to restart the device as well.
1 Replies
Only one application can have access to the scanner at a time. One of the common reasons you will get this is if another application has the scanner and either crashed or is running in the background and did not properly release the scanner when this happened. It will hold on to the scanner and you cannot enable it in your app. Make sure also it is not because your app is not releasing the scanner when it crashes or goes to the background OR that you don't have multiple instances of your app running. Make sure you wire up to the lifecycle events for background, sleep, terminate, etc... to release the scanner. If other apps on the device did not do this, they will certainly cause problems for you.
I have seen when it gets in this state, you sometimes have to restart the device as well.