12 Replies Latest reply on Jun 11, 2015 11:12 AM by Jon-Luke West

    What is the recommended way for locking an Android device?

    Jon-Luke West

      In the enterprise environment, there are situations in which it is necessary to "lock-down" an Android device through an application or service.  If I would like to restrict the use of an Android device to a single application package what is the best way to accomplish this?  If I wanted to then switch application packages and then restrict use to the newly started application how should I?  I stumbled onto AppLock, which might accomplish what I am looking for, but I have been unable to find much about it.  Is there some reference material I can look at?

       

      Thank you very much.

        • Re: What is the recommended way for locking an Android device?
          Billie Hecox

          Jon-luke,  have  look at EHS(Enterprise Home Screen), this replacement launcher will accomplish what your looking for.

          Enterprise Home Screen (EHS)

          1 of 1 people found this helpful
            • Re: What is the recommended way for locking an Android device?
              Jon-Luke West

              At first glance it did not feel like it fit, but Kiosk mode might be what I am looking for.  In Kiosk mode can I programmatically switch applications, like through a service trigger, and keep the Home and Back button locked?

               

              Thanks.

                • Re: What is the recommended way for locking an Android device?
                  Billie Hecox

                  You can define the package you wish to be use for kiosk mode in the xml config file, if you wish to change the package, you would just need to programmatically modify the xml file.  When in kiosk mode, if the back button, or home button is pressed, EHS will just force the kiosk package back to the foreground.  You can also send an intent to tell EHS to disable/enable kiosk mode. 

                   

                  From your original post, I wasn't sure if you wanted a kiosk type setup, or just a home screen that only displayed the icon or icons you wanted a user to have access to.  In both cases, EHS can do it.

                    • Re: What is the recommended way for locking an Android device?
                      Jon-Luke West

                      I do not want a home screen with icons.  The model of having a home screen with multiple icons for the different apps does not meet our requirements unfortunately.  I am looking to have a single application package running at all times on the device, but under certain circumstances we will need to force a different application to the foreground and then use that as the only application until triggered back in a similar fashion.  By editing the XML Config file programmatically, will the changes automatically take or will I need to "restart" EHS in some way?

                       

                      321cfbbc-d63a-4ba3-b778-a43877905daa this might answer your question as well:

                      Ex.  Company A distributes Android handhelds to its employees for use while on shift.  These devices are completely locked down except for one application like a custom terminal emulation app.  They should not be able to leave this application at will except under very specific conditions; like a button that is used to start a different application that performs a very specific function outside of the terminal emulation.

                       

                      In my experience working with EHS, the back button and home button seems to cause a relaunch of the "home" application as if it was closed and then restarted.  I have been required to explicitly program to catch these button presses and not process them to circumvent this issue.  I can imagine that this might cause some problems with the application running in the foreground if it is relaunched when in the middle of a function.  Am I just configuring EHS incorrectly?

                       

                      Thanks.

                        • Re: What is the recommended way for locking an Android device?
                          Billie Hecox

                          Jon-Luke, It seems you have it configured correctly, thats just how EHS works.  When the user presses the home button while an app is in kiosk mode, EHS will Resume, check if it has a kiosk app defined, then check if kiosk mode is enabled, and if so relaunch the specified kiosk app.   The kiosk app would have to handle the lifecycle changes and restore the users work, if possible.

                           

                          For the back button,  this can be disabled with the standard android sdk, just  override OnBackPressed(), and do not call the super method or return anything.  Or for that matter do what you wish when the back button is pressed.

                           

                          @Override
                          public void onBackPressed() {
                          }

                           

                          For the home button, I need a little more info,  what device/devices are you developing for?  In some cases, such as the MC40, there is an intent to disable home.  In others the upcoming EMDK 3.1 Update1 release will expose a profile feature to remap keys, which would allow you to suppress home key.

                          1 of 1 people found this helpful
                            • Re: What is the recommended way for locking an Android device?
                              Jon-Luke West

                              Bill,

                               

                              You are saying that, when the Home button is pressed, the application is Paused (ie gets the OnPause() method called) and then Resumed (OnResume()) correct? or is the instance fully Destroyed with OnDestroy() and then Created again with OnCreate()?  This raises huge concerns for me; as it could interrupt an active connection or process that is occurring if the user accidentally, or intentionally, pressed the Home button when they shouldn't.  If a client/customer is being given these handhelds to use while they are, let's say, in a store shopping I imagine that they could just constantly restart the application by pressing the Home button repeatedly and risk causing issues with the rest of the system or lose an active session by accidentally pressing it and get aggravated with the solution.  I would prefer to intercept Home and Back button presses in order to guarantee that absolutely nothing happens; so it is looking like I will try to use EHS to lock the system down (remove the notification bar/swipe-down and disable the multi-tasking button) and the EMDK 3.1Update1 for intercepting remaining button presses.  Although, it would be much easier to be able to turn off the button bar at the bottom of most Android devices.  Is this something that we might expect in future EMDK releases?

                               

                              By editing the XML Config file programmatically, will the changes automatically take or will I need to "restart" EHS in some way before changes will take effect?

                               

                              I am currently doing work on an EAP Device right at this moment.  Please see this thread for details:

                              https://developer.motorolasolutions.com/thread/30437

                               

                              Thank you very much for your help with all of this.

                            • Re: What is the recommended way for locking an Android device?
                              Carlos Alberto Assuncao

                              Why not give specific function to the hardware key?

                              Search button = Telnet

                              PTT buttom =IE

                               

                              And so on?

                      • Re: What is the recommended way for locking an Android device?
                        Carlos Alberto Assuncao

                        Hi,

                         

                        What kind of application do you gonna use in the Android device, I've installed in a customer EHS 1.6.

                        They use Telnet from Wavelink and 2 shortcut of Chrome each one call a different link.

                         

                        Best Regards

                        Carlos de Assunção