28 Replies Latest reply on Sep 2, 2016 11:58 AM by daron rice

    Kiosk mode

    Mohit Raheja

      Hi All,

       

      I am developing a application on ET1 and i want to open that application in kiosk mode.

      I haven't found anything related to this on docs.rhomobile.com even.

      I want home button should be disabled when my application launches so that it will not go to background.

       

      Can anyone suggest me how to do that.

       

      Please reply as in urgent need!!!

       

      Thanks in advance....

       

      Regards,

      Mohit Raheja

        • Re: Kiosk mode
          Peter Arcuri

          Not sure if this would help but there is a full_screen setting in Rhoconfig.txt:

           

          # open rhodes app in full screen mode

          # default 1 for Android up to Rhodes 2.2.5.

          # on all other platforms and on Android from Rhodes >2.2.5 default 0

          full_screen = 1

           

          You may also want to investigate the Enterprise Home Screen software which locks down the ET1 from end-users navigating through the device. This is at no cost and can be downloaded from Motorola support site.

          http://support.symbol.com/support/search.do?cmd=displayKC&docType=kc&externalId=13779&sliceId=&dialogID=558090313&stateId=1 0 558076555

          1 of 1 people found this helpful
            • Re: Kiosk mode
              Mohit Raheja

              Hi Peter,

               

              Thanks for the reply...

              My problem is solved using Enterprise Home Screen kiosk mode, but now the issue is i am not able to disable the kiosk mode

              in my application. Can you please help me on this issue.

               

              Regards,

              Mohit Raheja

                • Re: Kiosk mode
                  Peter Arcuri

                  Mohit, I'm not sure I follow... unable to disable the kiosk mode in your app. Please elaborate on the kiosk mode in you app. Are you referring to the "Full_Screen" attribute from within Rhoconfig.txt?

                    • Re: Kiosk mode
                      Mohit Raheja

                      Hey Peter,

                       

                      Thanks for the reply!!!!

                      I have installed the EHS apk on my device & then i have changed the option for kiosk mode in .xml file for EHS.

                      Now my application is running in kiosk mode and on startup of the device even.

                      Its mentioned in the pdf document of the EHS that we have to broadcast a intent to disable the kiosk mode.

                      The issue is now i am trying this with native android code but its giving me error on constant passing in intent.

                      So i am unable to do that. So if possible please let me know how should i disable kiosk mode now.

                       

                      Regards,

                      Mohit Raheja

                        • Re: Kiosk mode
                          Billie Hecox

                          What is the error that you are getting while passing the modify kiosk mode intent?

                            • Re: Kiosk mode
                              Mohit Raheja

                              Hi Billie,

                               

                              Thanks for your reply...

                               

                              It was giving the on sendBroadcast(intent);

                              To remove that issue I have created Context reference variable and i am broadcasting the intent with the help of that reference variable.

                              Now it's not giving me any error but it's also not disabling the kiosk mode.

                              Can you please tell me how to disable the kiosk mode through intent.

                               

                              Regards,

                              Mohit Raheja

                                • Re: Kiosk mode
                                  Billie Hecox

                                  A kiosk app must be specified in /enterprise/usr/enterprisehomescreen.xml

                                   

                                  This intent will modify kiosk mode in EHS:

                                   

                                  Intent intent = new Intent("enterprisehomescreen.MODIFY_KIOSK_MODE");

                                  intent.putExtra("enable", true); // True to turn it on

                                  intent.putExtra("enable", false); // False to turn it off

                                  sendBroadcast(intent);

                                    • Re: Kiosk mode
                                      Mohit Raheja

                                      Hi Billie

                                       

                                      Thanks for your precious reply!!!!

                                       

                                      I have tried this. My intent is getting called successfully but it's not modifying the kiosk mode value in EHS.

                                      If you have used this before, then can you please share out your working code with me...

                                       

                                      Really need this to work a.s.a.p.

                                       

                                      Regards,

                                      Mohit Raheja

                                        • Re: Kiosk mode
                                          Billie Hecox

                                          After the intent is sent. What happens when you manually press the HOME button?

                                           

                                          EHS uses its own android life-cycle method ( OnResume ) to force the specified kiosk application back to the foreground if kiosk mode is enabled.

                                          When the intent is received, the kiosk mode is disabled, but will not force the specified kiosk application to exit.

                                          If the HOME or BACK button is pressed, EHS will no longer force the specified kiosk app to the foreground.

                          • Re: Kiosk mode
                            daron rice

                            my issue is that it will not exist kiosk mode...here is my code

                             

                            C#:

                             

                                 disableButton.Click += delegate

                                        {

                                            Intent intent = new Intent("enterprisehomescreen.MODIFY_KIOSK_MODE");

                                            intent.PutExtra("enable", false); // False to turn it off

                                            SendBroadcast(intent);

                                       

                                            Intent myintent = new Intent();

                                            myintent.SetClassName("com.motorolasolutions.enterprisehomescreen", "com.motorolasolutions.enterprisehomescreen.HomeScreenActivity");

                                            StartActivity(myintent);

                             

                             

                             

                             

                                            statusBox.Text = "Disabling....Disabled";

                                        };

                             

                             

                             

                            manifest:

                             

                            <?xml version="1.0" encoding="utf-8"?>

                            <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="TestingKioskMode.TestingKioskMode" android:versionCode="1" android:versionName="1.0">

                              <uses-sdk android:minSdkVersion="16" />

                              <application android:label="TestingKioskMode">

                                <activity name=".MainActivity">

                                  <intent-filter>

                                    <category android:name="enterprisehomescreen.actions.MODIFY_KIOSK_MODE" />

                                  </intent-filter>

                                </activity>

                              </application>

                            </manifest>

                             

                             

                             

                            here is the exception i am getting:

                             

                             

                             

                            Android.Content.ActivityNotFoundException: Unable to find explicit activity class {com.motorolasolutions.enterprisehomescreen/com.motorolasolutions.enterprisehomescreen.HomeScreenActivity}; have you declared this activity in your AndroidManifest.xml?

                              • Re: Kiosk mode
                                Billie Hecox

                                Ah ok, i do see some issues with what you have here.  First, this thread is from 2013, and there have been some changes to EHS since then. We have recently published a new set of documentation for EHS and it can be found here.  Have a look at the Kiosk Mode section, our package names have been rebranded since our purchase by Zebra. a few years back.

                                 

                                Also, I'm not clear on why you are implementing a filter in your manifest.  The intent you send will be received by EHS, which is where that intent filter is implemented.

                                 

                                The way you have the Intents firing sequentially in that button callback may introduce a race condition. EHS will need a bit of time to receive the first intent and make the appropriate changes before you call it back to the foreground with the second Intent.

                                  • Re: Kiosk mode
                                    daron rice

                                    Still no luck. i have remove the intent filter from the manifest file and removed the call to bring the homescreen to the foreground.

                                     

                                    My manifest now looks like this:

                                     

                                    <?xml version="1.0" encoding="utf-8"?>

                                    <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="TestingKioskMode.TestingKioskMode" android:versionCode="1" android:versionName="1.0">

                                      <uses-sdk android:minSdkVersion="16" />

                                      <application android:label="TestingKioskMode">

                                        <activity name=".MainActivity" />

                                      </application>

                                    </manifest>

                                     

                                     

                                    my C:

                                     

                                     

                                         protected override void OnCreate(Bundle bundle)

                                            {

                                                base.OnCreate(bundle);

                                     

                                     

                                                // Set our view from the "main" layout resource

                                                SetContentView(Resource.Layout.Main);

                                                TextView statusBox = FindViewById<TextView>(Resource.Id.kiosModeStatus);

                                                // Get our button from the layout resource,

                                                // and attach an event to it

                                                Button enableButton = FindViewById<Button>(Resource.Id.EnableButton);

                                     

                                     

                                                enableButton.Click += delegate

                                                {

                                                    Intent intent = new Intent("com.symbol.enterprisehomescreen.actions.MODIFY_KIOSK_MODE");

                                                    Intent.PutExtra("enable", true);

                                                    SendBroadcast(intent);

                                                    statusBox.Text = "Enabling....Enable";

                                                };

                                     

                                     

                                                Button disableButton = FindViewById<Button>(Resource.Id.DisableButton);

                                     

                                     

                                                disableButton.Click += delegate

                                                {

                                                    Intent intent = new Intent("com.symbol.enterprisehomescreen.actions.MODIFY_KIOSK_MODE");

                                                    Intent.PutExtra("enable", false);

                                                    SendBroadcast(intent);

                                     

                                     

                                                    statusBox.Text = "Disabling....Disabled";

                                                };

                                            }

                                     

                                     

                                     

                                     

                                    enterprisehomescreen.xml:

                                     

                                    <?xml version="1.0" encoding="UTF-8"?><config>

                                      <kiosk app_launch_flags="FLAG_ACTIVITY_RESET_TASK_IF_NEEDED;FLAG_ACTIVITY_NEW_TASK">

                                        <application label="Test Kiosk Mode" package="TestingKioskMode.TestingKioskMode" activity=""/>

                                      </kiosk>

                                    <!-- <auto_launch app_launch_flags="FLAG_ACTIVITY_RESET_TASK_IF_NEEDED;FLAG_ACTIVITY_NEW_TASK">

                                      <application label="Test Kiosk Mode" package="TestingKioskMode.TestingKioskMode" activity=""/>

                                      </auto_launch>-->

                                      <applications app_launch_flags="FLAG_ACTIVITY_RESET_TASK_IF_NEEDED;FLAG_ACTIVITY_NEW_TASK">

                                        <application label="Test Kiosk Mode" package="TestingKioskMode.TestingKioskMode" activity=""/>

                                      </applications>

                                      <tools app_launch_flags="FLAG_ACTIVITY_RESET_TASK_IF_NEEDED;FLAG_ACTIVITY_NEW_TASK">

                                        <application label="Test Kiosk Mode" package="TestingKioskMode.TestingKioskMode" activity=""/>

                                      </tools>

                                      <passwords>

                                        <admin attempts="3"/>

                                      </passwords>

                                      <user_options/>

                                      <preferences>

                                        <install_shortcuts>0</install_shortcuts>

                                        <orientation/>

                                        <exit_instead_of_reboot>0</exit_instead_of_reboot>

                                        <auto_launch_enable>1</auto_launch_enable>

                                        <usb_debugging_disabled>0</usb_debugging_disabled>

                                        <keyguard_search_disabled>1</keyguard_search_disabled>

                                        <wallpaper/>

                                        <airplane_option_disabled>1</airplane_option_disabled>

                                        <keyguard_camera_disabled>1</keyguard_camera_disabled>

                                        <disable_status_bar_settings_icon>1</disable_status_bar_settings_icon>

                                        <bypass_keyguard>1</bypass_keyguard>

                                        <system_settings_restricted>1</system_settings_restricted>

                                        <fullscreen>0</fullscreen>

                                        <kiosk_mode_enabled>1</kiosk_mode_enabled>

                                        <title>Helios Barcode Scanner </title>

                                        <disable_statusbar_pulldown>1</disable_statusbar_pulldown>

                                        <icon_label_text_color>#FFFFFFFF</icon_label_text_color>

                                        <icon_label_background_color>#00FFFFFF</icon_label_background_color>

                                        <service_auto_launch_enable>1</service_auto_launch_enable>

                                        <title_bar_icon>

                                          <title_bar_icon_disabled>1</title_bar_icon_disabled>

                                        </title_bar_icon>

                                        <configurable_user_options>

                                          <app_icon_settings_disabled>1</app_icon_settings_disabled>

                                        </configurable_user_options>

                                        <apps_disabled>

                                          <application package="com.android.settings"/>

                                          <application package="com.android.quicksearchbox"/>

                                          <application package="com.android.browser"/>

                                          <application package="com.android.calculator2"/>

                                          <application package="com.android.deskclock"/>

                                        </apps_disabled>

                                        <apps_enabled>

                                       <application label="Test Kiosk Mode" package="TestingKioskMode.TestingKioskMode" activity=""/>

                                        </apps_enabled>

                                      </preferences>

                                    </config>

                                     

                                     

                                    what should i try next?

                                • Re: Kiosk mode
                                  daron rice

                                  just send version information along with source code

                                    • Re: Kiosk mode
                                      Billie Hecox

                                      Hey Daron,

                                           I believe I found the issue, It looks as though we have a bug in the EHS documentation sample.  The sample should be the following.  Notice the "i" in intent should be lowercase in the putExtra call. I modified that line in the code you sent me,and it now works as expected. I will update the documentation with this fix.

                                       

                                      Intent intent = new Intent("com.symbol.enterprisehomescreen.actions.MODIFY_KIOSK_MODE");
                                      i
                                      ntent.putExtra("enable",false);
                                      sendBroadcast
                                      (intent);