Detect native app based on file:// vs http(s)://

This is not tested - revert if not working.