Does anyone know of an appsheet function to c...

Does anyone know of an appsheet function to check whether the user is accessing the app from a mobile device or a desktop device?

0 17 346
17 REPLIES 17

Iโ€™m afraid we donโ€™t have tools for that.

Your only option is to have a user setting that they can choose, the first time they open the app, mobile/desktopโ€ฆ Then base views on thisโ€ฆ But itโ€™s a little clunky

@Jesse_Prud_Homme it would conditionally show only one action or the other based on that users device preference that they already selected in the user settingsโ€ฆ (You would need to set up the user settings)

@Grant_Stead Ok. I suppose the issue is the user could alternate between using a mobile device or desktop. Wouldnโ€™t want to have to go back have the user change their settings each time they switch devices. If there was a way to know which devices they were accessing from in real-time, we could design our app to be a little more accommodating and dynamic that way. This is a pretty minor issue though.

@Jesse_Prud_Homme Agreedโ€ฆ However, that is why iโ€™m recommending you use USERSETTINGS (user settings lives local to the device, so they can set mobile on their phone, and desktop on their computers, and the setting will stick unless they re-install the appโ€ฆ)

You can even make the settings the starting view (until theyโ€™ve made the required selection) Itโ€™s actually pretty good. (and they would only need to make the selection once during app installโ€ฆ)

@Grant_Stead Ah! Very resourceful - I didnโ€™t know that about usersettings - thatโ€™s definitely the solution! Thank you Grant!

Because we keep having this kind of question, Iโ€™ve started to provide this kind of contextual information via a new CONTEXT() function. At the moment, it only provides a meaningful result for CONTEXT(โ€œHostโ€) โ€” which may be exactly what you asked for in this thread. Please see the documentation here. https://help.appsheet.com/expressions/expression-types/other-functions

@praveen that is precisely what I need. Thank you!

@praveen what! Are you just allowed to sneak in epic operations whenever you want?!?!?! Must be great!

Thanks guys. Reason I ask: I have a link to โ€˜email customerโ€™ which opens gmail (instead of mail) and prefills the compose fields on a mobile device. Itโ€™s very convenient on mobile, especially on iOS when the only option is typically to use the native mail app (Iโ€™m mostly Gsuite). Issue is that on desktop the link doesnโ€™t work. You guys have any ideas?

Can you give a different link for the desktop user?

Yes, I could give a desktop friendly link - but Iโ€™d need to know if the user is on desktop or mobile.

@Jesse_Prud_Homme sounds like something the user should setup anywayโ€ฆ Iโ€™d provide a few options and have the user make their selections in usersettings since those are device specific

Why canโ€™t you give them both?

Good suggestions. I suppose I could make it a selection and provide a mobile link beside a desktop link.

@Jesse_Prud_Homme I meant they could set it up one time, choose what option they want per device via the user settings

@Grant_Stead Ah, I see - then appsheet would show two action buttons for that user:

โ€ข E-mail Customer from Mobile Device (link to mail app of their choice) โ€ข E-mail Customer from Desktop (link to email service of their choice)

Correct?

Top Labels in this Space