How do I request that the user activate the l...

(wanderson guilherme) #1

How do I request that the user activate the location before using the app?

(Levent KULAÇOĞLU) #2

@wanderson_guilherme you can’t control mobile device accelerometers like GPS. Even if you have it, there are a lot of native apps which can create fake GPS locations.

(wanderson guilherme) #3

yes but I want to make a notification appear asking you to activate the location of your device, is it possible?

(Levent KULAÇOĞLU) #4

@wanderson_guilherme You can do this: 1.) Construct a simple table and name it like NOTICE with only 1 column and 2 rows, including the header. Name the column as INFO/NOTICE/IMPORTANT whatever you like. 2.) Bring this table to AppSheet and set this column as Show type and set its Category as text 3.) Create a Virtual column, name it as DISTANCE and set this AppFormula: =DISTANCE(HERE(), LATLONG(0.00, 0.00) 4.) Open your NOTICE column and type this expression to Show_if property =[DISTANCE]=0.00 5.) In the Content property of the same column, type a message to show i.e. “Your Device Location is turned off. Please turn it on” etc. 6.) Construct a UX view; Detail type and display mode as Ref type and choose your NOTICE column in Column Order property. If you want to add any color or appearance to the info text, you can add a Formatting Rule as well. Give this view a proper name. 7.) Go to UX >> Options and enable expression toggle in the Starting view option. Set below expression: IFS(ANY(SELECT(NoticeTableName[Distance],TRUE))=0.00,LINKTOVIEW(“NoticeDetailViewName”),TRUE,LINKTOVIEW(“AnotherViewNameToShow”))

(wanderson guilherme) #5

Thank you very much, it was a great help.

(Levent KULAÇOĞLU) #6

@wanderson_guilherme you’re welcome…Glad to be helped of