Shield AI Fundamentals: Developing an Android App for AI
Post written by Rommel Pesigan, Senior Staff Engineer — User Services and Experience, Android Lead
Android is an open-source, mobile operating system first announced by Google in 2007. Today, it enjoys 70-plus percent global market share, with more than three million Android apps available on the Google Play Store. Continued advances in machine learning and artificial intelligence also have introduced new user interaction patterns and new user behavior, influencing how apps are designed and implemented today. At Shield AI, we’re also at the forefront of advancing new technology: Machine Intelligence and Intelligent Systems. Simply stated, we are building robots with self-directed autonomy and intelligence which learn and adapt to the world around them. Our first autonomous robot, Nova, is an artificially intelligent system that protects service members and innocent civilians.
As an Android developer, designing an app for an intelligent system presents very unique challenges. Apps that are visually appealing or have a “cool” standalone feature do not suffice. Reliability, responsiveness, and simple intuitive user interfaces are what matter most. Abstracting the complexity of this intelligent system so that the user can easily interact with it becomes the primary goal in the app design. The app, in essence, becomes part of the intelligent system itself: an extension of a complex system with which users can reliably and confidently communicate.
Unlike many other connected devices that remain stationary, an intelligent machine such as Nova constantly adapts to the changing conditions of its environment. These robots are mobile and continuously collecting information from their surroundings. Couple this with a mission to protect lives and Nova becomes a very sophisticated, complex system. This makes it important for our team to develop interfaces that make Nova easy for a new user to navigate.
App communication with an intelligent system
Designing an app for intelligent systems is little different from developing any other mobile app. The app must always be reliable and responsive. This means a user should never see or experience an app crash or “Application Not Responding” (ANR) errors. Developers and app designers must always aim for a clean, straightforward, and intuitive user interface. Connecting the app with an intelligent system should be a very straightforward process, where technical understanding of how the operations work are not expected. Many app developers can get away with these occasional errors in their personal apps because the stakes when they occur are very low: the user can simply relaunch the app from their smartphone. This approach to design, however, changes when these intelligent systems are directed into missions where lives are at stake. Reliability and attention to detail is the rule at Shield AI given the stakes and the situations where our robots will be used. The Nova app is expected to present information clearly, concisely, and accurately. The video stream must correctly reflect the robot’s real-time environment. Coupled with its SLAM (Simultaneous Location and Mapping) map generation captured from its sensors, Nova’s location in its environment must also be accurately portrayed. Similarly, Nova’s current state and mode of operation (Is Nova correctly exploring all the rooms in the building? Is it navigating its expected paths correctly?), as well as system vitals such as battery life and radio signal strength are all crucial information that must be shared and communicated efficiently to the operator.
Command and control of Nova is also critically important. Although Nova is a self-directed autonomous machine, an operator, through the app, must be able to take over Nova when needed. This means that the app’s responsiveness to user commands and interactions must be very reliable at all times and across environments.
Design Approaches and Best Practices
Android developers at Shield AI, informed by the disciplines and processes of software engineering, adhere to Android design principles and best practices, and always ensure architectural considerations are sound and up-to-date. A few examples of these are:
When implementing feature components, the software should be robust and easily testable so that issues are quickly identified and promptly addressed.
Components with good test coverage and good unit and integration tests identify weaknesses in the code that can be refactored when necessary.
Inclusion of comprehensive user and behavior testing help identify frictions in the interface that can be improved on iteratively.
Industry-proven software engineering principles such as SOLID encourage developers to produce clean code, avoiding highly coupled design that prohibits feature extensions when new use cases from the intelligent system comes.
When implementing the app, we use the most up-to-date tools available. Nova Controller, the name of Shield AI’s Android application, is running on the latest Android target SDK level of 28 (Android Pie, the latest version of the operating system to date). We develop the Hivemind Controller on Android, using the Model-View-ViewModel (MVVM) design pattern (leveraging Kotlin and the latest components in the Android Jetpack library). Test development practices in TDD (Test Driven Development) and BDD (Behavior Driven Development) are highly visible and nightly app builds are generated with Continuous Integration (CI) systems in place. The architecture is designed with scalability and security in mind, ensuring rapid integration of new features as new requirements and features come into play. Rest assured that at Shield AI, we are focused on delivering a robust product that end users can and will trust in and rely upon.
Android has come a long way since its arrival more than a decade ago. As new technologies emerge and user behaviors evolve, so must the approach to developing mobile applications. The growing advances in machine intelligence, autonomy, and intelligent systems means there will be a growing dependence on highly intuitive and reliable apps. If you are an Android developer seeking a challenge, eager to push Android to its limits, eager to work on the latest tools and technology, and motivated to make the world a more secure place through technology and innovation, come work at Shield AI and discover how you can make a difference.
Stay tuned here for the next round of Shield AI Fundamentals.