Need to disable start up workflow in mobile viewer
We have a start up Workflow that is working fine in our desktop and tablet viewers but there are some issues in the mobile viewer. I am trying to figure out a way to disable the mobile viewer from starting the workflow at start up and will wire it to a button in the mobile viewer. Any thoughts would be appreicated. Thanks, Bobby Jo
0
-
You'll probably have to handle this in the workflow itself, since I don't think that you'll be abe to do anything in manager.
I suspect that the easiest thing to do is to get the height/width of the map in pixels from the GetMapIfno Activity, set a cutoff (somewhat arbitrarily) that you're comfortable defining anything smaller than as "mobile"... trouble is that you can have big, older screens with few pixels and little modern screens with lots of pixels. You may be able to take advantage of the "scale" output from the same activity here to handle the issue.
Otherwise, you can look at the UserAgent of the browser making requests from your app with the GetRequestInfo activity. Unfortunately, there is no standard way of defining a userAgent for a mobile browser so you'll need to look through a library such as the one at detectmobilebrowsers.com (http://detectmobilebrowsers.com/) to get a list of current UserAgents. For examples, look at Tom's answers to the thread "How can I run a workflow on startup, but only if the device is tablet or mobile? (https://support.geocortex.com/essentialsGSCForum?sub-nav=forum&main-nav=essentials&#!/feedtype=SINGLE_QUESTION_DETAIL&criteria=ALLQUESTIONS&id=90660000000XbL8AAK) "0 -
Zach,
Thank you for the information and resources!!
Bobby Jo0 -
Maybe I'm missing something, but wouldn't the simplest solution just be to remove the workflow from the startupWorkflows array in the Handheld.json.js file? The viewer already has the required logic to determine the type of device (as best as it can) and will load the handheld.json.js if it's a mobile device. Remove the startup workflow from that file and your problem is solved. 0 -
Peter, I had no idea that this was here. Always assumed that the startup configuration lived in the Site alone, based on the RestManager. Bobby Jo, Peter here has the answer. 0 -
Configuration of a startup workflow in the viewer configuration is deprecated (it's not documented anymore), but indeed as far as I know still working. 0 -
Thanks all. Yes, I asked the question because the default configuration lives in the Site. I saw the placeholder in the viewer files but wasn't sure if I could configure them separately. 0
Please sign in to leave a comment.
Comments
6 comments