App development and app stores

Introduction to Application Ecosystem

In order to make the development board ready to use out of the box, make it easy for users to use without barriers, enable developers to share their interesting applications, and provide effective channels for receiving feedback and even profits, we have launched a simple application framework, including:

  • App Store: Developers can upload and share applications, which users can download and use without needing to develop them. Developers can receive certain cash rewards (from MaixHub or user tips).
  • Pre-installed Apps: The official provides some commonly used applications, such as color block detection, AI object detection tracking, QR code scanning, face recognition, etc., which users can use directly or use as serial module.
  • MaixPy + MaixCDK Software Development Kit: Using MaixPy or MaixCDK, you can quickly develop embedded AI visual and audio applications in Python or C/C++, efficiently realizing your interesting ideas.
  • MaixVision Desktop Development Tool: A brand-new desktop code development tool for quick start, debugging, running, uploading code, installing applications to devices, one-click development, and even support for graphical block-based programming, making it easy for elementary school students to get started.

Everyone is welcome to pay attention to the App Store and share their applications in the store to build a vibrant community together.

Packaging Applications

Using MaixPy + MaixVison makes it easy to develop, package, and install applications:

  • Develop applications with MaixPy in MaixVision, which can be a single file or a project directory.
  • Connect the device.
  • Click the "Install" button at the bottom-left corner of MaixVision, fill in the basic information of the application in the popup window, where the ID is used to identify the application. A device cannot simultaneously install different applications with the same ID, so the ID should be different from the IDs of applications on MaixHub. The application name can be duplicated. You can also upload an icon.
  • Click "Package Application" to package the application into an installer. If you want to upload it to the MaixHub App Store, you can use this packaged file.
  • Click "Install Application" to install the packaged application on the device.
  • Disconnect from the device, and you will see your application in the device's app selection interface. Simply click on it to run the application.

If you develop with MaixCDK, you can use maixcdk release to package an application. Refer to the MaixCDK documentation for specifics.

Exiting Applications

If you have developed a relatively simple application without a user interface and a back button, you can exit the application by pressing the device's function button (usually labeled as USER, FUNC, or OK) or the back button (if available, MaixCAM does not have this button by default).

Installing Applications

  • Method 1: Use the App Store application on the device. Find the application on the App Store, connect the device to the internet, and scan the code to install.

  • Method 2: Install using a local installation package. Transfer the package to the device's file system, for example, to /root/my_app_v1.0.0.zip, and then run the following code. Make sure to modify the pkg_path variable to the correct path, you can also find this script in MaixPy's examples/tools/install_app.py:

import os

def install_app(pkg_path):
    if not os.path.exists(pkg_path):
        raise Exception(f"Package {pkg_path} not found")
    cmd = f"/maixapp/apps/app_store/app_store install {pkg_path}"
    err_code = os.system(cmd)
    if err_code != 0:
        print("[ERROR] Install failed, error code:", err_code)
    else:
        print(f"Install {pkg_path} success")

pkg_path = "/root/my_app_v1.0.0.zip"

install_app(pkg_path)
  • Method 3:
    • For applications developed using MaixPy, run maixtool deploy in the project root directory (which contains app.yaml and main.py). A QR code will be displayed. Keep the device and computer on the same local network, and use the App Store on the device to scan the QR code corresponding to the local network address for online installation.
    • For applications developed using MaixCDK, run maixcdk deploy in the project root directory. A QR code will be displayed. Keep the device and computer on the same local network, and use the App Store on the device to scan the QR code corresponding to the local network address for online installation.

Basic Guidelines for Application Development

  • Since touchscreens are standard, it is recommended to create a simple interface with touch interaction. You can refer to examples for implementation methods.
  • Avoid making interfaces and buttons too small, as MaixCAM default screen is 2.3 inches with 552x368 resolution and high PPI. Make sure fingers can easily tap without making mistakes.
  • Implement a simple serial interaction for the main functionality of each application based on the serial protocol (see example). This way, users can directly use it as a serial module. For instance, in a face detection application, you can output coordinates via serial port when a face is detected.