0

For my company, I have access to an 'industrial' android phone, that needs to run some processes automatically. 'Industrial' in this sense simply means that the phone is physically more rugged than a regular one (Blackview BV6000s), along with the fact we seek to use it for automation purposes. However, in essence, it is still a regular smartphone aimed at consumers, with a regular os installed (android 7.0).

This phone ultimately requires the capability to constantly keep taking pictures and store them locally. A different script on a host pc, with which it is connected through USB, is then supposed to constantly copy these data and write to a local drive.

The idea is that this process takes place in a remote environment, where no wifi is available to our devices and no people are around to manually operate the phone. It is supposed to be installed once, and simply start running the automation process preferably directly when turning on, which then stays there for a couple of weeks.

Now I simply started out by writing an android .apk app in Android Studio. However, I can imagine that such an approach is prone to many errors. For example, when you first connect the device over USB, you need to manually set the right protocol (E.G. MTP for file transfer) within the phone. Also, you need to start the app manually for the first time. But if anything goes wrong during the process or if it crashes for whatever reason, then obviously the process stops where it requires a manual trigger again for it to start. (And there are likely more pitfalls than what I can come up with right now that obstructs it from working as intended.)

For these reasons, I can imagine that we may potentially need to use something more 'low-level' to the hardware API. I.e. an approach that allows us to enforce a certain behavior on the device, hence creating a more 'direct' connection to the API, without the phone worrying about 'consumer-targeted' concerns, like safety, privacy, permissions, etc.

I can imagine that for this purpose I may need to make changes to the phone, like rooting it or perhaps changing the operating system or perhaps simply using a different tool/software for programming the application?. Maybe write the app in a different language (C/C++)? Maybe a combination, or a different suggestion altogether? Perhaps what I want already exists in a tool or software?

So for conciseness, my general question reads:

What changes to an industrial (android) phone are required, such that it runs an intended automation process uninterruptedly?


Note that

  • Note that I posted this in softwarerecs.stackexhange.com since it concerns the choice of potentially selecting the right software to solve my problem. If instead this question fits better in a different site (because of maybe a different view of the problem), let me know where and why.
  • To prevent this question from being tagged 'overly broad' or 'mainly opinion based', let me clarify that I do not aim to ask "what is the best method...", rather I would request the answerers to focus more on "Are there any methods at all, and if so, what are they, and which ones seem to be (slightly opinion based here) robust against failure?
  • Is there a reason why you want to use Android that is not designed for such purpose rather than laptop or Raspberry Pi or other device designed for that? Note that for start Android is allowed to kill running apps at any time for any reason and developers are expected to write application in way that will handle it. – Mateusz Konieczny Aug 2 at 8:58
  • We are essentially using a computer on the other end like I mentioned above. The android phone idea came about because firstly it has a built-in camera (Which is essentially the main requirement of this task), and secondly because of the small form-factor. Bigger industrial cameras won't fit in the alotted space. – BlueRine S Aug 2 at 9:14
  • Raspberry Pi should be small enough - see projects.raspberrypi.org/en/projects/… Requires a bit more tinkering but it has OS allowing to have decent control over what happens. In case of Android phones my advice would be "write new OS" what is not going to be reasonable. Or "accept that OS may kill your app for inactivity, lack of user interaction or large memory use or just because" what goes against the question. – Mateusz Konieczny Aug 2 at 10:37
  • A raspberry pi by itself doesn't take pictures... Also the raspberry is supposed to be placed at a different enclosed location, whereas the camera should be rugged and exposed to the environment. – BlueRine S Aug 2 at 10:40
  • Yes, as mentioned on projects.raspberrypi.org/en/projects/… Raspberry Pi Camera Module is needed (though Pi + camera is likely to be less expensive than android phone). – Mateusz Konieczny Aug 2 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.