Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Home › Forums › Ask the Flomies › Restart Scanning (ProSDK)
Hello,
I have another problem with the ProSDK.
The first time I start the the scanner, it works fine.
But once I suspended the scanner I can’t get it to poll tags again.
I sleep and suspend the reader with:
// sleep the reader
readerManager.reader.sleep()
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1), dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), {() -> Void in
// Need delay before suspendScan in order to let reader respond to sleep request.
self.readerManager.reader.suspendScan()
If I start the reader again with “startScan()” nothing happens.
Even though the Log says:
2016-01-06 15:29:22.162 myApp[3691:1489415] Started scan loop with reader 0x145c54130
this doesn’t start a new polling process.
Is there a known bug or is my code wrong?
Best regards
Dennis
Hi Dennis,
Thanks for your detailed query, I am looking into your solution. I would recommend using the default implementation found in the README.txt file.
“8. Add a Switch control and link it to this callback to manually reset the reader
`objectivec
-(IBAction)resetReader:(id)sender {
UISwitch *onOffSwitch = (UISwitch *) sender;
if (onOffSwitch.on) {
[_readerManager.reader startScan]; // wake the reader
} else {
[_readerManager.reader sleep]; // sleep the reader
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC), dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0), ^{
// Need delay before suspendScan in order to let reader respond to sleep request.
[_readerManager.reader suspendScan];
});
}
}
”
-Scott
You must be logged in to reply to this topic.