I'm trying to port the below android/java statements into JavaScript while using the EB Intent API but must admit to have not yet figured it out [1]
Intent intent = new Intent("com.symbol.enterprisehomescreen.actions.MODIFY_KIOSK_MODE");
intent.putExtra("enable",false);
sendBroadcast(intent);
Has anyone got sample(s) that could help?
--
[1] So far, I got...
function enableKioskMode() {
var params = {
intentType: 'Intent.BROADCAST',
action: 'com.symbol.enterprisehomescreen.actions.MODIFY_KIOSK_MODE',
data: { ???? }
}
EB.Intent.send(params);
}
but as you can see I'm not sure how to populate params.
Thanks in advance!
HI Jacques,
Which version of EB are you using?
Regards,
Joydeep
Points: 0
You voted ‘up’
Hi Joydepp,
I am currently using EB v1.2.9.0.
Regards,
Jacques
Points: 0
You voted ‘up’
Hi Jacques,
Intent APIs are not officially supported on EB 1.2.9.
We are providing official support on upcoming release(EB 1.3)
Points: 1
You voted ‘up’
Thanks for the prompt follow up Joydeep!
I will wait for EB release 1.3, then.
Meanwhile, may I push my luck and ask what the syntax would look like?
Points: 0
You voted ‘up’
Sure,will try to provide some sample.Give us some time.
And if your luck is good,that may work as well in 1.2 although official support is not there.
Points: 0
You voted ‘up’
Excellent!
I look forward to reading more from you
Points: 0
You voted ‘up’
Hi Jacques,
Can you please try the following.
function enableKioskMode() {
var params = {
intentType: 'Intent.BROADCAST',
action: 'com.symbol.enterprisehomescreen.actions.MODIFY_KIOSK_MODE',
data: {"enable":"false"} }
EB.Intent.send(params);
}
Regards,
Joydeep
Points: 0
You voted ‘up’
Good afternoon Joydeep,
Although, the below alert statement is indeed reached, the following function has unfortunately zero effect from my end
function enableKioskMode() {
var params = {
intentType: 'Intent.BROADCAST',
action: 'com.symbol.enterprisehomescreen.actions.MODIFY_KIOSK_MODE',
data: { 'enable': 'false' }
};
EB.Intent.send(params);
alert('Enable OK!');
}
I am using
» EB v1.2.9.0
» EHS v2.1.4
» MC18 K.K. Rev A (01-12-04-4AJ22-K-00-M1-080615)
--
Note:
I quickly putted together an Android project and validated that calling the below does indeed set the EHS Kiosk mode as expected:
void SetEhsKioskMode(boolean bEnable){
Intent intent = new Intent("com.symbol.enterprisehomescreen.actions.MODIFY_KIOSK_MODE");
intent.putExtra("enable", bEnable);
sendBroadcast(intent);
}
Kind regards,
Jacques
Points: 0
You voted ‘up’
This is a bug and that is why it did not work for you.
This bug will be planned to be resolved in EB 1.3 release.
Points: 1
You voted ‘up’
Thanks for the follow up and update Joydeep.
Until release 1.3 is ready, I will use the below java approach
void SetEhsKioskMode(boolean bEnable){
Intent intent = new Intent("com.symbol.enterprisehomescreen.actions.MODIFY_KIOSK_MODE");
intent.putExtra("enable", bEnable);
sendBroadcast(intent);
}
or alter the /enterprise/usr/enterprisehomescreen.xml file to configure the kiosk mode:
E.g.
<?xml version="1.0" encoding="UTF-8"?>
<config>
[...]
<preferences>
[...]
<kiosk_mode_enabled>1</kiosk_mode_enabled>
[...]
</preferences>
</config>
Kind regards,
Jacques
Points: 0
You voted ‘up’
FYI-
Enterprise Browser 1.3 was released in December.
EB 1.3 documentation
Points: 1
You voted ‘up’