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

(Jesse Prud'Homme) #1

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

(Aleksi Alkio) #2

I’m afraid we don’t have tools for that.

(Grant Stead) #3

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

(Grant Stead) #4

@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)

(Jesse Prud'Homme) #5

@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.

(Grant Stead) #6

@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…)

(Jesse Prud'Homme) #7

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

(Praveen Seshadri (AppSheet)) #8

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

(Jesse Prud'Homme) #9

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

(Grant Stead) #10

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

:stuck_out_tongue:

(Jesse Prud'Homme) #11

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?

(Aleksi Alkio) #12

Can you give a different link for the desktop user?

(Jesse Prud'Homme) #13

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

(Grant Stead) #14

@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

(Aleksi Alkio) #15

Why can’t you give them both?

(Jesse Prud'Homme) #16

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

(Grant Stead) #17

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

(Jesse Prud'Homme) #18

@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?