EnterpriseHomeScreen and WFC service at startup interfere with my app

M Mattia Durli 2 years 3 months ago
6 0 0

Hello,
I'm developing an app on a TC52AX using Xamarin.
The app is auto started by Enterprise Home Screen when the device is turned on or restarts, and is used in kiosk mode.
The first image in attachment shows the display when the app is started, the camera is in autofocus mode.
In second image, approximately after 32 seconds from reboot, an icon appears in the notification bar, and the camera goes out of focus (I haven't switched to any other app or pressed any button, just the notification appears)
In third image, the notification icon, WFC Manager Service.
From this point, I'm unable to regain focus on the camera, even reconfiguring it while the app is working. I have to exit the app, and restart it manually, then it works (no interference from the WFC Manager Service anymore.
I workarounded it this way, by waiting 40s before actually initializing the camera, waiting the WFC service to start.

internal class AndroidInitializer : IPlatformInitializer
{
private IScanner _scanner = null;

public void RegisterTypes(IContainerRegistry containerRegistry)
{
Thread.Sleep(40000);
_scanner = new Scanner_Android();
containerRegistry.RegisterInstance(_scanner);
}
}

I had another 2 issues similar to this:
before the camera issue, I had a scanner issue, where I had to wait 3s at startup before initializing the scanner, and the same with EMDK
Thread.Sleep(3000);
_scanner = new Scanner_Android();

At startup, Enterprise Home Screen launches my app before the emdk or datawedge services are started, and if I initialize the scanner before that, I receive no errors, but the scanner doesn't work.
I'd love a way to be able to let EHS to start my app ONLY when all services are running.

But my main problem is with the camera and with the WFC service, what can I do that is not waiting 40s? Why it interferes with the camera? how can I disable that service?
Thanks

CONTACT
Can’t find what you’re looking for?