title: Ionic 5 / Capacitor: How to find out if app is running in browser or compiled as native app?
body: <p>I just want to know, if my Ionic 5 app is running in a browser, or in the webview of a compiled app.</p>
  <p><strong>Platform</strong> does not work: <a href="https://ionicframework.com/docs/angular/platform" rel="nofollow noreferrer">https://ionicframework.com/docs/angular/platform</a><br />
  It just tells about the device. But when I run it in chrome on an android device, it returns the same platforms as when I run it compiled.</p>
  <p><strong>Analysing the URL</strong> to check if it the webview url works, but not when using capacitor live reload. Because than it is the same URL like locally in the browser. And by the way, analysing the URL feels like an ugly solution.</p>
  <p>Is it really that hard to get this simple and important information, or do I just miss something?</p>
  <p><strong>Edit:</strong><br />
  Platform output<br />
  Chrome in Ubuntu with ionic serve: <strong>[&quot;desktop&quot;]</strong><br />
  Chrome in Android: <strong>[&quot;android&quot;, &quot;mobile&quot;, &quot;mobileweb&quot;]</strong><br />
  Android with capacitor livereload: <strong>[&quot;android&quot;, &quot;phablet&quot;, &quot;mobile&quot;, &quot;mobileweb&quot;]</strong><br />
  Android compiled: <strong>[&quot;android&quot;, &quot;phablet&quot;, &quot;cordova&quot;, &quot;capacitor&quot;, &quot;mobile&quot;, &quot;hybrid&quot;]</strong></p>