вызывает утилиту logcat на устройстве и отключает соединение с Adbkit-logcat, чистый Node.js logcat client. @DeviceFarmer/adbkit-logcat Документация. Я не знаю, как сделать эту работу.
Код: Выделить всё
import {DeviceClient} from "@devicefarmer/adbkit"
import Logcat = require("@devicefarmer/adbkit-logcat")
import {ReaderOptions} from "@devicefarmer/adbkit-logcat/lib/ReaderOptions";
import Reader from "@devicefarmer/adbkit-logcat/lib/logcat/reader";
import Priority from "@devicefarmer/adbkit-logcat/lib/logcat/priority";
export class LogcatReader {
private deviceClient: DeviceClient;
private logcat: Logcat;
private stream;
private readerOptions: ReaderOptions;
private reader: Reader;
constructor(deviceClient: DeviceClient) {
this.deviceClient = deviceClient;
this.logcat = this.deviceClient.openLogcat();
this.stream = /*Don't know how this should be retrieved*/;
this.readerOptions = {
priority: Priority.INFO
};
this.reader = Logcat.readStream(this.stream, this.readerOptions)
}
}
Поэтому я хотел бы знать, что я делаю неправильно. Или, может быть, если есть несколько простая альтернатива?
Подробнее здесь: https://stackoverflow.com/questions/796 ... at-library
Мобильная версия