Move document opening to ApplicationController
For Android we have to route this through a FileProvider, which requires C++ code.