The browser opening code is a bit clunky. It needs reworking, or perhaps use this library: https://github.com/Shinmera/open-with
Activity