Skip to main content

Info API


Description

Welcome to the first part of the documentation for working with the ZennoDroid API. Here, you'll find key information, the main methods for working with ZennoDroid objects, and C# code examples.

The main object for working with the ZennoDroid API

IDroidInstanceAPI DroidInstance

This object is basically a container for interfaces that let you interact with different aspects of Android, such as managing apps, sending input, settings, and so on.

With it, you can access the interaction object you need and then use its methods and properties for working with the API.

Information about the current device

IDroidInfoAPI Info

Gives you access to info about the current device. This interface is used to get various details about the connected device, but only after you've selected and connected to it using the IDroidActionAPI Action methods.

Properties

  • Device index
int Index { get; }

Duplicates the Index info from the Device Manager window.


  • Device title
string Title { get; }

Duplicates the Title info from the Device Manager window.


  • Device name (ADB)
string Name { get; }

This is the ADB device name, the same as the Device info in the Device Manager window.


  • Port shown in the instance window
int UiPort { get; }

This is only relevant when running a template in ZennoDroid.


  • Address for connecting via ADB
string AddressPort { get; }

This matches the Name property.


Example

var info = instance.DroidInstance.Info;

int index = info.Index;
string title = info.Title;
string Name = info.Name;
int uiPort = info.UiPort;
string addressPort = info.AddressPort;