Launch SOTI surf from script on device

Solved Locked
MH
Michael Hancock
United Supermarkets, L.L.C.

I'm trying to launch SOTI surf from a script on the device. Device is a Datalogic Memor 10. I'm needing to use an intent to change scanner settings then launch SOTI surf directly to a webpage with top and bottom hidden.

I can do something like 'start net.soti.surf' in the script but am not sure, and can't find, how to start on a certain webpage. I'm sure it's something simple but thought I'd ask the question instead of spending an hour doing trial and error.

5 years ago
SOTI surf
ANSWERS
EG
Edgar Gomez
5 years ago

Hello

Perhaps the following script may help you:

sendintent -a "intent://URL#Intent;scheme=https;action=android.intent.action.VIEW;component=net.soti.surf;end"

Solution
MD
Matt Dermody Diamond Contributor
5 years ago

Are you using the SOTI Lockdown? You can just use surf:// in order to launch into a specific website. 

MH
Michael Hancock
5 years ago

Yeah using lockdown but having to run a script on the device to change scanner settings (Datalogic don't do mulitple scanner profiles like Zebra...) so doing script:// to run it, and that's the snag.

Here's the script as it is now:

sendIntent -b "intent:#Intent;component=com.datalogic.dxu/.plugin.EnterpriseReceiver;action=com.datalogic.dxu.action.APPLY_SETTINGS;S.path=/sdcard/ScannerSettings.dxu;end;"
sleep 2
start net.soti.surf

MD
Matt Dermody Diamond Contributor
5 years ago

Do you need to launch into different URLs in SOTI surf or just one? You could set your Surf homepage to a specific URL or add the catalog view in Surf to offer multiple shortcuts within the context of that app.

Alternative to Surf you can open a webview to a specific URL with an Intent. Not sure if you can launch Surf and pass through a URL in the same way. Perhaps you could observe the ADB logcat view when the surf:// launch option is being used to see how the Agent is launching the browser?

sendintent -a https://google.com;action=android.intent.action.VIEW;end

MH
Michael Hancock
5 years ago

I'd like the lock screen to have links to the most commonly used webapps, but that's not really a requirement. The big thing for us is to keep the users in work apps on the device. Because of this we don't want them being able to enter a url.

MD
Matt Dermody Diamond Contributor
5 years ago

That's easy. You can restrict SOTI Surf so that the URL bar is not displayed. If full screen is the primary reason for using SOTI Surf then you can just use the intent call within your script to launch the full screen webview directly to whatever site you are accessing. 

MH
Michael Hancock
5 years ago (edited 5 years ago)

Cool that works pretty well.

Side question related to that: That intent prompts the user to choose a browser. Is there a way to force choose that browser perhaps through an intent? We've got about a hundred of these in the field and I'd rather not have users in Chrome if I can avoid it.

MH
Michael Hancock
5 years ago

Sweet! That's exactly what I was looking for! Thanks!