Detect mobile devices and attach to window for usage in the app