Is there a way to return true if a user is on the native mobile app or if they are logged in on the web app? I am using the Webview Element to display my webapp in the Native Bubble Mobile App.
Hi @ncat , how are you?
First thing that comes to mind would be if page width is less than 600px but there might be a better way than that
Hi - Unfortunately that wont work for my use case because I still want my users to be able to use the web version on their phones through any internet browser. I want to set certain conditions only if they are on the mobile app regardless of screen size.
@ncat i think as a workaround for now maybe you could add a attribute in the users table mobile signed in with boolean value or so and add in your mobile workflow on sign in to update this value to yes or not boolean but static yes
I thought about this solution, but the problem is that my customers could also be logged in on their desktop computers at the same time, which would make this not work.
One workaround I can think of, you can use visibility detector plugin seperately for web and mobile. There are free ones in the market. Add this on your main pages on mobile and web. Then add events seperately like "when visibility detector on web enter screen, you can save this info to your database. Same for mobile
You can detect if a user is on mobile or web by checking the user-agent string or using responsive design techniques like window.innerWidth
. Many platforms also log device type in analytics or access logs.