Hi!
The EMDK API have several inner classes that are passed to callbacks. For instance, com.symbol.emdk.barcode.ScanDataCollection.ScanData when scanning barcodes.
The problem is that this class is an inner non-static class, which means it needs a parent instance in order to be instantiated. This makes writing unit tests difficult as well risk leaking memory as it retains a referens to the containing instance. I suggest that you make all inner classes static wherever possible, at least when they are public.
Thanks!
// Erik
Make inner public classes static? |
1 Replies
Thanks for the feedback Erik, I'll raise with the EMDK team.
Out of interest, which test framework(s) are you using? We haven't seen many questions on automated testing with our devices which I think is a bit surprising.