0

I need to write app that controls other custom made hardware device by USB and/or Bluetooth. so I need to turn regular android tablet in to custom controller. That means:

  1. My app has to start up automatically when device is turned on.
  2. All other functions of the tablet has to be unavailable to user or password-protected.

well, basically I have to make sure that my app is the only app on the device that user can use.

Is there a way to achieve this functionality? Can anyone point my a link or an API that can do this stuff?

Thanks.

PauliusM
  • 171
  • 1
  • 11
  • 1
    This sounds more like your looking to build a custom Android ROM. – blad Jan 04 '15 at 20:31
  • and what is that? :) – PauliusM Jan 04 '15 at 20:32
  • A custom Android Version. Consider the Android version that comes on phones, most carriers customize an Android version to limit access or provide features specific to the carriers. Which sounds more along the lines of what you described. You may be looking for a custom rom that limits access outside the scope of an app. – blad Jan 04 '15 at 20:37
  • [Fork it](http://source.android.com/source/downloading.html)! – ChiefTwoPencils Jan 04 '15 at 20:39

1 Answers1

2
  1. Take a look at this Stack Overflow answer to have your app launch on device boot: How to start an Application on startup?

  2. Android Lollipop has a new screen pinning feature which you can call programatically with Activity.startLockTask(). It prevents the user from exiting the current app without the device passcode/pin. I haven't personally tried this, but it may be what you're looking for.

    UPDATE: In order for Activity.startLockTask() to immediately activate screen pinning without prompting the user, DevicePolicyManager.isLockTaskPermitted() must return true. An administrator must preconfigure this on the device in an admin app by using DevicePolicyManager.setLockTaskPackages(). See Device Administration for how to create the admin app.

Community
  • 1
  • 1
Spencer
  • 1,161
  • 12
  • 19
  • It sounds promising but OP might have to clarify the requirements further. The mechanisms used to use the lock task relies on the user accepting a device manager to allow it; IOW, the device owner. If they're not the device owner, the user must first accept the behavior through a dialogue. It's nice for digital menus or similar where a business doesn't want their users to go outside their app. Hopefully, that's what they're looking for. – ChiefTwoPencils Jan 04 '15 at 20:51
  • @ChiefTwoPencils Good point; I've updated my answer. – Spencer Jan 04 '15 at 21:31