How to check platform "android" & "browser"?

I developed an application that can be run through the browser & It published also on Google Play
So, If users open my app by browser of android phone, i want to check this case to move them to the Google play to download it to use the full features.
Any helps please ?

This is what i found in this forum and use in v4:

this.isApp = (!document.URL.startsWith(‘http’) || document.URL.startsWith(‘http://localhost:8080’));

1 Like

Hi @_Ali94 :wave:

I think the easiest way is to import the Platform service from @ionic/angular, inject it in the constructor and then checking for a specific platform like if ('android')) or if (!'cordova')) for the browser.

You can find all the platform names here:


1 Like

In IONIC v5 If you use'android') returns true if you are using the web app version in an android device. There is a way to know if the user are usign the webApp or the native app?