EB Intent API - Help needed

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!

Joydeep Chakraborty
HI Jacques,Which version of

HI Jacques,

Which version of EB are you using?

Regards,

Joydeep

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jacques Gourmelen
Hi Joydepp,I am currently

Hi Joydepp,

I am currently using EB v1.2.9.0.

Regards,
Jacques

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Joydeep Chakraborty
Hi Jacques,Intent APIs are

Hi Jacques,

Intent APIs are not officially supported on EB 1.2.9.

We are providing official support on upcoming release(EB 1.3)

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Jacques Gourmelen
Thanks for the prompt follow

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?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Joydeep Chakraborty
Sure,will try to provide some

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.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jacques Gourmelen
Excellent!I look forward to

Excellent!

I look forward to reading more from you

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Joydeep Chakraborty
Hi Jacques,Can you please try

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

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jacques Gourmelen
Good afternoon Joydeep

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

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Joydeep Chakraborty
This is a bug and that is why

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.

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Jacques Gourmelen
Thanks for the follow up and

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

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Edward Correia
FYI-Enterprise Browser 1.3

FYI-

Enterprise Browser 1.3 was released in December.

EB 1.3 documentation

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Log in to post comments