Access to Android Devices in C #

I am using the MAD-Bee library (Managed ADB) to access ADB in C #. I'm just trying to get a list of devices connected to a PC. I get the list of devices properly when I use ADB from the command line, but I get 0 in my C # form.
Here is the code I tried -

    AndroidDebugBridge mADB;
    String mAdbPath;
    IList<Device> mDeviceList = null;
    public Form1()
    {
        InitializeComponent();
        mAdbPath = Environment.GetEnvironmentVariable("ANDROID_ROOT");
        mADB = AndroidDebugBridge.CreateBridge(mAdbPath + "\\platform-tools\\adb.exe", true);
        mADB.Start();

        var list = mADB.Devices;
        Console.WriteLine(""+list.Count);
    }

The problem is that MAD-bee does not have proper documentation or guidance on how to start with it. Any help on this?

+2
source share
2 answers

Woops found it now -

List<Device> devices = AdbHelper.Instance.GetDevices ( AndroidDebugBridge.SocketAddress );

Additional information is available in these tests -

MadBee Tests

+3
source

I would suggest you use a different library in C # for your application.

AndroidLib.dll XDA, #.

:

http://forum.xda-developers.com/showthread.php?t=1512685

GITHUB , GITHUB Visual Studio, , .

+2

All Articles