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?
source
share