public string TakeScreenShot() { var task = m_client.GetFrameBufferAsync(m_deviceData, CancellationToken.None); task.Wait(); var image = task.Result; using (var stream = new FileStream("screenshot.png", FileMode.OpenOrCreate)) { image.Save(stream, ImageFormat.Png); } return(Path.GetFullPath("screenshot.png")); }
public Bitmap GetAdbScreen() { return((Bitmap)client.GetFrameBufferAsync(device, CancellationToken.None).Result); }