Does Android support locking of a completely replaced interface?

What do you need? . This question is about how to take the Android modem and Android OS and turn it into an interface. This will be our own equipment, never leave the building and do not run any program that we create. Why? Android has built-in battery backup, theft detection (GPS) and an elegant touch screen and familiar programming interface.

What I want:

  • May I request that no matter what is pressed on the screen, the user never leaves my application?

    Are there instructions , is it officially supported , or do I need to start hacking ? (using the interface at the system level, removing voice activation (when the user holds the search button), disables automatic updates, etc.)

    Ideally, I want to just write one application that replaces the entire interface, and I want the application to be included in it, without additional work (rooting the phone and manually deleting some built-in applications).

  • I would also like to lock USB in "Charging Only" mode to prevent the installation of the file system without the approval of my application. I don’t care about the really decisive guy who opens the device and mounts the file system of the internal storage.

  • In the event of a failure, I would like to have a second application that decides whether to restart the first application.

Obviously, I do not want the phone to become unusable, even if it is just spare equipment.

+1
source share
4 answers

It is not possible to write an application simply. You will definitely need to do some tuning on the ROM. I do not know any official instructions to support this. However, it seems you have the right idea. Removing unnecessary applications and replacing the home screen with your application should get you pretty far. Depending on the ROM, you can also remove the system tray. You only need to do this with the correct ROM. If all this is not in one place, you will have to cook your own.

+2
source

Not really.

You can implement your application to get home settings, so when the device turns on or you click on the home key, it gets the intention. However, then you have the initial screen of the action and your application registered for these purposes, and the device user gets a decision which one will be the default handler.

For your third point, application crashes are handled by the OS in modern versions of Android. Perhaps this was possible in older versions, but nothing more.

This is the best you can do with Android. If you want to do more, you need to change the system itself. You also cannot control / restrict access to the USB port in the way you described without changing the kernel.

+2
source

I assume that Android can only work through Wi-Fi Internet access if I refuse to pay a wireless subscription. (this, of course, means the lack of a telephone service)

In general, the answer is yes. Some manufacturers / device operators simplify the work of other manufacturers. For example, it may try to automatically connect you to the phone’s registration system at boot, although it will always fail. He cannot stop trying. Therefore, you will have to cancel it every time the phone boots.

May I request that no matter what is pressed on the screen, the user never leaves my application?

No, fortunately.

Are there any instructions for this, are they officially supported, or do I need to start hacking?

It is not supported and, I hope, is 100% impossible on all devices that fell into the hands of consumers. Otherwise, we have big problems.

I think if the phone was "root-ed", then things like the voice activation application could be deleted, and the home screen could be replaced.

The device does not need to implement the initial replacement screen and set it to use by default. To remove things that are installed as system level applications (which is most likely a voice search), it must be rooted.

Even if you manage to get rid of voice search as a possible means to exit the application. The user can still press home and select another application from the list of recently launched ...

If you want to disable all the possible ways that a user can leave your application, you will almost certainly have to change the firmware to allow this. And then your application will only work on devices running your own version of the OS.

+1
source

I have implemented an application that has similar requirements to you, you can read my blog here Android update for Android automatic screen . Below are answers to some of your questions:

May I request that no matter what is pressed on the screen, the user never leaves my application?

Are there any instructions for this, are they officially supported, or do I need to start> hacking? (using the interface at the system level, removing voice activation (when the user holds> down the search button), disables automatic updates, etc.)

Ideally, I want to just write one application that replaces the entire interface, and I want> a way to connect the application, without a bunch of extra work (rooting the phone and manually), removing the built-in built-in built-in application).

As far as I know, there are two ways to do this: one uses the Homescreen application, and the other uses a "system warning window", and I think that you are familiar with both options.

I would also like to lock USB in "Charging Only" mode to prevent the installation of the file system without the approval of my application. I am not bothered by the really determined guy who> opens the device and mounts the internal file storage system.

I'm not sure if this is possible, but you can play with low-level Linux commands if you have a root phone with a loaded box installed. Sorry because you are not helping much here.

In case of failure, I would like to have a second application that decides whether> the first application needs to be restarted

Perhaps I believe, for example, if you look at existing android “crash reports” such as Acra , there you will see examples of crash handling, what you need to do is handle UncaughtExceptionHandler (these two methods are your friends Thread.getDefaultUncaughtExceptionHandler() and Thread.setDefaultUncaughtExceptionHandler(UncaughtExceptionHandler eh) ). After the handler is configured from there, you can decide what to do (do not forget to handle the exception without any problems, you must enable this so that Android can perform the necessary cleanup). Now, if your application is the default Homescreen, then in case of failure Android will automatically restart the application for you. If this is not a Homescreen application, you can run Intent to restart the application when a crash occurs.

Hope this helps.

+1
source

Source: https://habr.com/ru/post/910119/


All Articles