How Vendor OS API works

How Vendor OS API works

Vendor OS Side

  1. Vendor Framework extension is just like an Android Standard Framework which was provided by Android Device partner. In our side, we will call this Vendor Framework extension by Class.forName(us.zoom.zr.vendoros.VendorOSManager) to get the instance.

  2. All the API call is synchronously, means all interfaces/apis can be called once we get VendorOSManager object. Our application code logic will like below snippet:

mVendorOSManager = new VendorOSManager(context);
if ((mVendorOSManager.getCapability() & VendorOSManager.ZRAPI_CAP_SYSTEM) != 0) {
    ISystemManager mSystemManager = mVendorOSManager.getSystemManager();
    ...
    ...
}

In vendor OS, AudioManager/SystemManger/... can just run as the system service. In VendorOSManager’s implementation, your code maybe like the below snippet:

public ISystemManager getSystemManager() {
    //Get your SystemManager service just like android standard service
    //For example when we need system DisplayManager, we just call
    //DisplayManager mDisplayManager =
    //(DisplayManager)mContext.getSystemService(Context.DISPLAY_SERVICE);
    return mContext.getSystemService(‘your system manager service name’);
}
  1. The Vendor Framework extension need contains all the classes and intefaces defined in Zoom Rooms Vendor API doc. If the OS does not support one feature, just disable the related capability flag and give empty implementation for related methods. For example, if OS does not support custom device name but support launch system settings and system logs: In ISystemManager's implement class
int getCapability() {
return ZRAPI_SYSTEM_CAP_SYSTEM_SETTINGS | ZRAPI_SYSTEM_CAP_SYSTEM_LOGS;
}

void launchSystemSettings(Context context) {
//Empty implementation
}

void prepareSystemLogs(String destPath, long maxSize) {
//Empty implementation
}

Zoom Rooms Application Side

  1. Zoom Rooms application use the classes in vendor OS Api doc as the provided library.(Only compile, not pack into the APK package.

  2. Need check if system has integrated Zoom Rooms vendor OS API by finding the class “us.zoom.zr.vendoros.VendorOSManager”

private final static String VENDOR_OS_MGR_CLZ_NAME = 	"us.zoom.zr.vendoros.VendorOSManager";
Class targetClz = Class.forName(VENDOR_OS_MGR_CLZ_NAME);
  1. If system has this class, ZR app will call VendorOSManger’s constructor and other public methods.
Last Updated: