What is the recommended way for locking an Android device?

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.

Carlos Alberto ...
Hi,What kind of application

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

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Jon-luke,  have  look at EHS

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

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Jon-Luke West
At first glance it did not

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.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
You can define the package

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.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jon-Luke West
I do not want a home screen

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?

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.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Carlos Alberto ...
Why not give specific

Why not give specific function to the hardware key?

Search button = Telnet

PTT buttom =IE

And so on?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jon-Luke West
Carlos,That will not meet our

Carlos,

That will not meet our requirements for user interaction.  That would allow the user to force themselves into another application while in the middle of a process that shouldn't be interrupted in the primary application; this will break our desired workflow and could result in orphaned transactions on a server if cleanup and restore are not handled appropriately.

Thank you though.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Carlos Alberto ...
Ok i see use Kiosk mode then

Ok i see use Kiosk mode then

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Jon-Luke, It seems you have

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.

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Jon-Luke West
Bill,You are saying that,


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.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Anonymous (not verified)
Jon-Luke - When the home

Jon-Luke - When the home button is pressed, the kiosk app will pause ( onPause()), EHS will push it back to the foreground, and the kiosk apps OnResume() should fire.  I don't believe OnCreate will run at that time. 

This thread has some details about modifying and making you EHS config changes take effect.

In order to intercept the home button, your app would need to be a home screen/launcher ( which would negate the need for EHS), which is not hard to accomplish.  The last post in this thread outlines the what you would need to make your app a home screen.

Then when the app needed to change, you could set a new default launcher with the EMDK

As of now I don't think disabling the "button bar" is on the roadmap for EMDK, but I'm not positive.  I can only think of two devices that expose that bar, the  MC18 and the CC5000.   In the case of the MC18, if the button bar was disabled, how would you power off/suspend the device?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jon-Luke West
That answers all of my

That answers all of my questions.

Thank you very much Bill.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments