Conditional Plugin to work only access from Mobile Device

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
1 year ago
Hi All,

I'm looking for solution to prevent plugin display in Web.
The plugin is only work if it is browsing from Mobile App such Flutter or React native?

This solution to apply deeplink integration in Flutter or React native.

Thanks,
Mick
1 year ago
You can try filtering it out by using user agent from your web/razor page.
For example, var x = navigator.userAgent; will print Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36
So this way you can filter by OS/Browser etc.

Another way is adding up extra Http headers while requesting resources and handle the logic based on header from backend application, for that you may have to do calculation in web page using javascript (ex Screensize, useragend) then add that particular header based on that logic.
1 year ago
kazirahiv wrote:
You can try filtering it out by using user agent from your web/razor page.
For example, var x = navigator.userAgent; will print Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36
So this way you can filter by OS/Browser etc.

Another way is adding up extra Http headers while requesting resources and handle the logic based on header from backend application, for that you may have to do calculation in web page using javascript (ex Screensize, useragend) then add that particular header based on that logic.


Thank you Kazi.
Let me try this solution.

Thanks,
Mick
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.