Table of Contents

Constructor MaaAndroidNativeController

Namespace
MaaFramework.Binding
Assembly
MaaFramework.Binding.Native.dll

MaaAndroidNativeController(string, LinkOption, CheckStatusOption)

Creates a MaaFramework.Binding.MaaAndroidNativeController instance.

public MaaAndroidNativeController(string configJson, LinkOption link = LinkOption.Start, CheckStatusOption check = CheckStatusOption.ThrowIfNotSucceeded)

Parameters

configJson string

JSON config for the control unit.

Required fields:
- library_path: path to the Android native control unit library
- screen_resolution.width / screen_resolution.height: raw screenshot and touch resolution

Optional fields:
- display_id: target display id, defaults to 0
- force_stop: whether to force stop before start_app, defaults to false

link LinkOption

Executes MaaFramework.Binding.IMaaController.LinkStart if MaaFramework.Binding.LinkOption.Start; otherwise, not link.

check CheckStatusOption

Checks LinkStart().Wait() status if MaaFramework.Binding.CheckStatusOption.ThrowIfNotSucceeded; otherwise, not check.

Remarks

Wrapper of MaaFramework.Binding.Interop.Native.MaaController.MaaAndroidNativeControllerCreate(System.String).

This controller is only available on Android.

The configured screen_resolution must match the control unit's raw screenshot/touch coordinate space.

Exceptions

ArgumentException
MaaJobStatusException