Add intent icon into lockdown

Solved

Hi there,

I'm trying to create an icon in the lockdown screen to automatically enable Zebra Datawedge.

I found the following intent that works correctly if I send it via "send script" feature:

sendintent -b "intent:#Intent;action=com.symbol.datawedge.api.ACTION;S.com.symbol.datawedge.api.ENABLE_DATAWEDGE=true;end"

but when I configure the lockdown profile adding an intent: item, the icon has been added to the lockdown but, when I press it, the popup "Activity not fiound" is showed.

I'm using Zebra TC21 Android 11 device.

Any suggestion?

Thank you,

2 years ago
Android
ANSWERS
RC
Raymond Chan Diamond Contributor
2 years ago

For your test, you can put the script 

   sendintent -b "intent:#Intent;action=com.symbol.datawedge.api.ACTION;S.com.symbol.datawedge.api.ENABLE_DATAWEDGE=true;end"

in a file ("abc.cmd" say), and have it deployed to a device directory ( %sdcard%/Download/test say, or any desired folder in which your/your agent has write permission) via  .pcg package, file-sync rule, etc.

Edit your kiosk item to reference to this file e.g.

    script:// %sdcard%/Download/test/abc.cmd

with custom image and item name of your choice.

Solution
RS
Rafael Schäfer
2 years ago

The question more likely is "why do you need that"?

You can just add a Task profile to the device that activates datawedge after enrollment automatically using following:

enable_system_app com.symbol.datawedge

(the bundle id can be different on later Android versions, took this from Android 8 Zebra TC51)

Hi Rafael,

the reason is that customer is using two apps in lockdown:

App1 - that automatically disable Datawedge (via API) everytime it is opened

App2 - that needs Datawedge in order to work (scan barcodes)

I figured out to create an icon on lockdown screen that user can click before using App2.

Just as clarification: with "Enable Datawedge" I'm referring to flag into Datawedge application:

and not to the enable_system_app com.symbol.datawedge feature.

Thank you for your support.

RS
Rafael Schäfer
2 years ago

Why disabling it and reenabling it sounds very like datawedge needs to be configured correctly instead?

R
Robert
2 years ago

Also think it sounds like an good idea to look at the datawedge configuration.

I dont have any TC21 and think it has some limitations in MX. But it is possible to control which apps that is allowed to access the datawedge service with AccessMgr, so maby you can use that to prevent App1 from disable datawedge.

And then set up an datawedge profile for App2 that is only accociated with that app.

we have no control on App1 that was developed by another company.

We need to find a solution (aka workaround) to ensure coexistence of both apps.

MD
Matt Dermody Diamond Contributor
2 years ago

Disablement of DataWedge without graceful re-enablement by that 3rd party app is rather reckless development on their part. I've never encountered an app that did that programatically without having better graceful handing to re-enable it in case other applications need it. I don't understand why they would ever need to do that and if were me I would be putting pressure on that app developer to come up with a more graceful solution to allow other apps to coexist on the device. 

RC
Raymond Chan Diamond Contributor
2 years ago

I do not have any Zebra TC21 to do any tests.

Since you can successfully run the script when lockdown is not active, the simple lockdown profile payload set-up will be to just put the script in a script file and include a  lockdown item script:// that points to the device directory where the script file is located.

If sending the script while lockdown is active results in the same "Activity not found" error, then make sure you find out ALL the app/activity which is/are initiated when the script is successfully executed while lockdown is disabled, and then whitelist such app/activity either in the lockdown menu or in an application-run-control policy.

Hi Raymond, could you please specify how to use a script file?
Isn't it possible to send the script directly using an icon on lockdown?

Thank you.

ZC
Zafer Cigdem
2 years ago

Hi Nicolo,

Here is a similar process: SOTI Discussion Forum with Screenshots. 
You can use what Raymond said as a content of a .cmd/.bat file above. And you can trigger enable option from the lockdown via a user click on a lockdown item. 
Zafer
M
MPMOD@SOTI
2 years ago
M
MPMOD@SOTI
2 years ago

Hi Nicolò,

I am glad to see that your issue was resolved. 

Please feel free to reach out to us if you have any further questions in the future.

Kind regards,

Technical Support Specialist | SOTI | +1 905.624.9828 | SOTI.net lDiscussion Forum | Log a Case OnlineLinkedIn