Forum Xamarin Xamarin.Android

Persistant App?

Does anyone know how to create a persistant app using Xamarin? Basically I want something like this:

I am writing an app for a client which they want to fix on a wall and allow their employees to use the app but not be able to do anything else. So you would need a password to exit the app.

Any ideas?


  • JonathanPryorJonathanPryor USXamarin Team Xamurai

    An alternative idea is to do a "Home Screen" app -- the app which is launched when the Home button is pressed. This would allow you do The Outer Limits ("We will control the horizontal. We will control the vertical.")

    I believe I've seen others attempt to do so on the mailing list, so I assume this is possible...

  • Le-royStaines.7824Le-royStaines.7824 NZMember ✭✭✭

    It works but there is still a loophole whereas you cannot disable the applications running button. From there you can access the properties screen and remove the application.

    Also a swipe near the system soft buttons will launch a browser window which is also not ideal for our purpose.

    We have resulted to physically covering this area but it would be nice to have the control programatically.

  • Hello

    Your solution sound simple and promising
    Unfortunately the first step already gives me strange behavior

    If I define the OnKeyDown override,

    • First it doesn't seems to work always (sometime Key Back shut down the application)
    • Two : My application have a button to launch a scanner application (Datawedge) and get the feed-back from it
      it seems that in some condition when the OnKeyDown is handle as you describe the Scan stop to work (not always)
      But when the Scan Stop the only way to get it working back is to reset the device (Power off / Power on)
      I didn't investigate to much why and when it happen but I'm sure that without that OnKeyDown override it never happen !

    Any Idea ??

    // Disable Search / back key
            public override bool OnKeyDown(Keycode keyCode, KeyEvent e)
                switch (keyCode)
                    case Keycode.Back:
                        return false;
                return base.OnKeyDown(keyCode, e);
  • Le-royStaines.7824Le-royStaines.7824 NZMember ✭✭✭

    Sounds like it is more likely an issue with your scanner application than with the OnKeyDown override that you provided.

    Is this for private use? In the end we rooted our devices and removed the default launcher and replaced it with our own. But we had access to all the devices before they shipped.

Sign In or Register to comment.